From: guido Date: Thu, 23 Jun 2005 21:05:36 +0000 (+0000) Subject: new version of MGTools::count_dofs_per_component X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2dbe2319e4962e41b7b9cd3acb34c6c921d47d59;p=dealii-svn.git new version of MGTools::count_dofs_per_component git-svn-id: https://svn.dealii.org/trunk@10933 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/multigrid/mg_tools.h b/deal.II/deal.II/include/multigrid/mg_tools.h index 6be53cc6c1..dc9fdd925d 100644 --- a/deal.II/deal.II/include/multigrid/mg_tools.h +++ b/deal.II/deal.II/include/multigrid/mg_tools.h @@ -149,10 +149,11 @@ class MGTools * result[level][component]). */ template - static void count_dofs_per_component (const MGDoFHandler &mg_dof, - std::vector > &result, - std::vector target_component - = std::vector()); + static void count_dofs_per_component ( + const MGDoFHandler &mg_dof, + std::vector > &result, + const bool only_once = false, + std::vector target_component = std::vector()); /** diff --git a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc index 39e716efff..ea7cbfd480 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_tools.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_tools.cc @@ -449,15 +449,16 @@ void MGTools::count_dofs_per_component ( const MGDoFHandler &dof_handler, std::vector > &result, + bool only_once, std::vector target_component) { + const FiniteElement& fe = dof_handler.get_fe(); + const unsigned int n_components = fe.n_components(); const unsigned int nlevels = dof_handler.get_tria().n_levels(); Assert (result.size() == nlevels, ExcDimensionMismatch(result.size(), nlevels)); - - const unsigned int n_components = dof_handler.get_fe().n_components(); - + if (target_component.size() == 0) { target_component.resize(n_components); @@ -502,16 +503,30 @@ MGTools::count_dofs_per_component ( component_select[i][i] = true; threads += Threads::spawn (fun_ptr)(l, dof_handler, component_select[i], dofs_in_component[i]); - }; + } threads.join_all(); // next count what we got - for (unsigned int i=0; i& base = fe.base_element(b); + // Dimension of base element + unsigned int d = base.n_components(); + + for (unsigned int m=0;m &mg_dof, ndofs(mg_dof.get_tria().n_levels(), std::vector(target_component.size())); - count_dofs_per_component (mg_dof, ndofs, target_component); + count_dofs_per_component (mg_dof, ndofs, true, target_component); for (unsigned int level=v.get_minlevel(); level<=v.get_maxlevel();++level) @@ -640,7 +655,7 @@ MGTools::reinit_vector (const MGDoFHandler &mg_dof, new_dofs(mg_dof.get_tria().n_levels(), std::vector(target_component.size())); std::swap(ndofs, new_dofs); - count_dofs_per_component (mg_dof, ndofs, target_component); + count_dofs_per_component (mg_dof, ndofs, true, target_component); } for (unsigned int level=v.get_minlevel(); @@ -710,4 +725,5 @@ template void MGTools::reinit_vector ( template void MGTools::count_dofs_per_component ( const MGDoFHandler&, std::vector >&, + bool, std::vector); diff --git a/deal.II/deal.II/source/multigrid/mg_transfer_block.cc b/deal.II/deal.II/source/multigrid/mg_transfer_block.cc index c7d9aac3f4..aba3ca141d 100644 --- a/deal.II/deal.II/source/multigrid/mg_transfer_block.cc +++ b/deal.II/deal.II/source/multigrid/mg_transfer_block.cc @@ -85,7 +85,7 @@ void MGTransferBlockBase::build_matrices ( // vector don't have holes. const unsigned int n_components = *std::max_element(mg_target_component.begin(), mg_target_component.end()) + 1; - const unsigned int dofs_per_cell = fe.dofs_per_cell; + const unsigned int dofs_per_cell = fe.dofs_per_cell; const unsigned int n_levels = mg_dof.get_tria().n_levels(); Assert (mg_selected.size() == fe.n_components(), @@ -93,7 +93,7 @@ void MGTransferBlockBase::build_matrices ( // Compute the lengths of all blocks sizes.resize(n_levels); - MGTools::count_dofs_per_component(mg_dof, sizes, mg_target_component); + MGTools::count_dofs_per_component(mg_dof, sizes, true, mg_target_component); // Fill some index vectors // for later use. @@ -597,6 +597,3 @@ MGTransferSelect::copy_from_mg_add ( const MGDoFHandler&, BlockVector&, const MGLevelObject >&) const; - - - diff --git a/deal.II/doc/authors.html b/deal.II/doc/authors.html index 1ed9e3c6b6..92913d3c10 100644 --- a/deal.II/doc/authors.html +++ b/deal.II/doc/authors.html @@ -3,42 +3,41 @@ - Contributors to deal.II + Credits for deal.II + + -

Contributors to deal.II

+

Credits for deal.II

-The library is maintained and mostly written by the -deal.II authors: +

The deal.II authors

-
-
+
    +
  • + Wolfgang Bangerth +
  • -
    started the original design and coding - of deal.II in early 1998 and keeps maintaining - and improving the library. - -
    Guido Kanschat - -
    contributed experience from earlier object-oriented finite - element software projects from the beginning and joined in coding - later. - -
    + Ralf Hartmann + -
    started contributing code in 1999 while in Heidelberg and joined in - maintaining the library. -
+
  • + Guido Kanschat +
  • + +

    -

    +

    The deal.II contributors

    +

    The following people contributed major parts of the library (in alphabetical order):

      @@ -94,11 +93,14 @@ The library is maintained and mostly written by the
    • Franz-Theo Suttmeier: Initial parts of the linear algebra.
    +

    + +

    The deal.II mailing list members

    -

    - Furthermore, we thank the numerous people sending in comments, - patches and even single functions, but who are not listed above. -

    +

    + We thank the numerous people sending questions, suggestions, bug reports, bug + fixes and improvements. deal.II would be much less without their contribution. +

    \ No newline at end of file diff --git a/deal.II/doc/news/changes.html b/deal.II/doc/news/changes.html index 63680978ce..fd969d6553 100644 --- a/deal.II/doc/news/changes.html +++ b/deal.II/doc/news/changes.html @@ -42,16 +42,6 @@ inconvenience this causes.
      -
    1. Improved: The function DoFTools::count_dofs_per_component got an additional - argument. This argument allows to count the degrees of freedom of - nonprimitive vector valued elements only once, instead of in every component. - Although this argument defaults to the previous behavior, it had to be put - into the argument list ahead of target_component in order to make - use of default arguments more efficiently. -
      (GK 2005/06/17) -

      -
    2. Changed: The way boundary constraints were handled in the step-17 tutorial program was conceptually flawed. We tried to eliminate boundary nodes locally on the cell level, and hanging node constraints subsequently @@ -438,6 +428,18 @@ inconvenience this causes.

      deal.II

        +
      1. Improved: The function DoFTools::count_dofs_per_component and its counterpart + in MGTools got an additional + argument. This argument allows to count the degrees of freedom of + nonprimitive vector valued elements only once, instead of in every component. + Although this argument defaults to the previous behavior, it had to be put + into the argument list ahead of target_component in order to make + use of default arguments more efficiently. The old order of + arguments can still be used through a wrapper function. +
        (GK 2005/06/22) +

        +
      2. Improved: The GeometryInfo::child_cell_on_face,