* <tt>result[level][component]</tt>).
*/
template <int dim>
- static void count_dofs_per_component (const MGDoFHandler<dim> &mg_dof,
- std::vector<std::vector<unsigned int> > &result,
- std::vector<unsigned int> target_component
- = std::vector<unsigned int>());
+ static void count_dofs_per_component (
+ const MGDoFHandler<dim> &mg_dof,
+ std::vector<std::vector<unsigned int> > &result,
+ const bool only_once = false,
+ std::vector<unsigned int> target_component = std::vector<unsigned int>());
/**
MGTools::count_dofs_per_component (
const MGDoFHandler<dim> &dof_handler,
std::vector<std::vector<unsigned int> > &result,
+ bool only_once,
std::vector<unsigned int> target_component)
{
+ const FiniteElement<dim>& 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);
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<n_components; ++i)
- result[l][target_component[i]]
- += std::count(dofs_in_component[i].begin(),
- dofs_in_component[i].end(),
- true);
-
+ unsigned int component = 0;
+ for (unsigned int b=0;b<fe.n_base_elements();++b)
+ {
+ const FiniteElement<dim>& base = fe.base_element(b);
+ // Dimension of base element
+ unsigned int d = base.n_components();
+
+ for (unsigned int m=0;m<fe.element_multiplicity(b);++m)
+ {
+ for (unsigned int dd=0;dd<d;++dd)
+ {
+ if (base.is_primitive() || (!only_once || dd==0))
+ result[l][target_component[component]]
+ += std::count(dofs_in_component[component].begin(),
+ dofs_in_component[component].end(),
+ true);
+ ++component;
+ }
+ }
+ }
// finally sanity check
Assert (!dof_handler.get_fe().is_primitive()
||
ndofs(mg_dof.get_tria().n_levels(),
std::vector<unsigned int>(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)
new_dofs(mg_dof.get_tria().n_levels(),
std::vector<unsigned int>(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();
template void MGTools::count_dofs_per_component<deal_II_dimension> (
const MGDoFHandler<deal_II_dimension>&,
std::vector<std::vector<unsigned int> >&,
+ bool,
std::vector<unsigned int>);
// 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(),
// 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.
const MGDoFHandler<deal_II_dimension>&,
BlockVector<double>&,
const MGLevelObject<Vector<double> >&) const;
-
-
-
<html>
<head>
<link href="screen.css" rel="StyleSheet" media="screen">
- <title>Contributors to deal.II</title>
+ <title>Credits for deal.II</title>
<meta name="author" content="the deal.II authors <authors@dealii.org>">
+ <meta name="copyright" content="Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors">
+ <meta name="date" content="$Date$">
<meta name="keywords" content="deal.II">
<meta name="CVS_ID" content="$Id$">
</head>
<body>
-<h2>Contributors to <acronym>deal.II</acronym></h2>
+<h1>Credits for deal.II</h1>
-The library is maintained and mostly written by the
-<acronym>deal.II</acronym> authors:
+<h2>The deal.II authors</h2>
- <dl>
- <dt><a href="http://www.ices.utexas.edu/~bangerth"
+<p>
+<ul>
+ <li>
+ <a href="http://www.ices.utexas.edu/~bangerth"
target="_top">Wolfgang Bangerth</a>
+ </li>
- <dd> started the original design and coding
- of <acronym>deal.II</acronym> in early 1998 and keeps maintaining
- and improving the library.
-
- <dt><a href="http://gaia.iwr.uni-heidelberg.de/~kanschat/"
- target="_top">Guido Kanschat</a>
-
- <dd> contributed experience from earlier object-oriented finite
- element software projects from the beginning and joined in coding
- later.
-
- <dt><a href="http://ganymed.iwr.uni-heidelberg.de/~hartmann/"
+ <li>
+ <a href="http://ganymed.iwr.uni-heidelberg.de/~hartmann/"
target="_top">Ralf Hartmann</a>
+ </li>
- <dd> started contributing code in 1999 while in Heidelberg and joined in
- maintaining the library.
- </dl>
+ <li>
+ <a href="http://kanschat.dgfem.net"
+ target="_top">Guido Kanschat</a>
+ </li>
+</ul>
+</p>
- <p>
+<h2>The deal.II contributors</h2>
+<p>
The following people contributed major parts of the library (in
alphabetical order):
<ul>
<li><em>Franz-Theo Suttmeier:</em>
Initial parts of the linear algebra.
</ul>
+</p>
+
+<h2>The deal.II mailing list members</h2>
- <p>
- Furthermore, we thank the numerous people sending in comments,
- patches and even single functions, but who are not listed above.
- </p>
+<p>
+ We thank the numerous people sending questions, suggestions, bug reports, bug
+ fixes and improvements. deal.II would be much less without their contribution.
+</p>
</body>
</html>
\ No newline at end of file
<ol>
- <li> <p>Improved: The function <code class="class">DoFTools</code>::<code
- class="member">count_dofs_per_component</code> 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 <tt>target_component</tt> in order to make
- use of default arguments more efficiently.
- <br> (GK 2005/06/17)
- </p>
-
<li> <p>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
<h3>deal.II</h3>
<ol>
+ <li> <p>Improved: The function <code class="class">DoFTools</code>::<code
+ class="member">count_dofs_per_component</code> and its counterpart
+ in <code class="class">MGTools</code> 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 <tt>target_component</tt> in order to make
+ use of default arguments more efficiently. The old order of
+ arguments can still be used through a wrapper function.
+ <br> (GK 2005/06/22)
+ </p>
+
<li> <p>
Improved: The <code class="class">GeometryInfo</code>::<code
class="member">child_cell_on_face</code>, <code