17 #include <deal.II/base/memory_consumption.h> 18 #include <deal.II/hp/fe_collection.h> 20 DEAL_II_NAMESPACE_OPEN
24 template <
int dim,
int spacedim>
41 std::set<unsigned int> candidate_fes;
44 for (
unsigned int cur_fe = 0; cur_fe < fe_collection.
size(); cur_fe++)
48 for (std::set<unsigned int>::const_iterator it = fes.begin();
52 ExcIndexRangeType<unsigned int> (*it, 0, fe_collection.
size()));
53 domination = domination &
54 fe_collection[cur_fe].compare_for_face_domination
61 candidate_fes.insert(cur_fe);
66 if (candidate_fes.size() == 1)
68 return *candidate_fes.begin();
71 for (std::set<unsigned int>::const_iterator it = candidate_fes.begin(); it!=candidate_fes.end(); ++it)
74 for (std::set<unsigned int>::const_iterator ito = candidate_fes.begin(); ito!=candidate_fes.end(); ++ito)
77 domination = domination &
78 fe_collection[*it].compare_for_face_domination(fe_collection[*ito]);
89 template <
int dim,
int spacedim>
95 template <
int dim,
int spacedim>
103 template <
int dim,
int spacedim>
113 template <
int dim,
int spacedim>
125 template <
int dim,
int spacedim>
139 template <
int dim,
int spacedim>
155 template <
int dim,
int spacedim>
160 ExcMessage (
"Need to pass at least one finite element."));
162 for (
unsigned int i = 0; i < fes.size(); ++i)
168 template <
int dim,
int spacedim>
184 finite_elements (fe_collection.finite_elements)
189 template <
int dim,
int spacedim>
197 if (finite_elements.size() != 0)
199 ExcMessage (
"All elements inside a collection need to have the " 200 "same number of vector components!"));
208 template <
int dim,
int spacedim>
214 ExcMessage (
"This collection contains no finite element."));
221 for (
unsigned int c=1; c<size(); ++c)
229 template <
int dim,
int spacedim>
235 ExcMessage (
"This collection contains no finite element."));
242 for (
unsigned int c=1; c<size(); ++c)
250 template <
int dim,
int spacedim>
256 ExcMessage (
"This collection contains no finite element."));
263 for (
unsigned int c=1; c<size(); ++c)
271 template <
int dim,
int spacedim>
277 ExcMessage (
"This collection contains no finite element."));
284 for (
unsigned int c=1; c<size(); ++c)
286 ExcMessage (
"Not all elements of this collection agree on what " 287 "the appropriate mask should be."));
293 template <
int dim,
int spacedim>
299 ExcMessage (
"This collection contains no finite element."));
306 for (
unsigned int c=1; c<size(); ++c)
308 ExcMessage (
"Not all elements of this collection agree on what " 309 "the appropriate mask should be."));
315 template <
int dim,
int spacedim>
321 ExcMessage (
"This collection contains no finite element."));
328 for (
unsigned int c=1; c<size(); ++c)
330 ExcMessage (
"Not all elements of this collection agree on what " 331 "the appropriate mask should be."));
337 template <
int dim,
int spacedim>
343 ExcMessage (
"This collection contains no finite element."));
350 for (
unsigned int c=1; c<size(); ++c)
352 ExcMessage (
"Not all elements of this collection agree on what " 353 "the appropriate mask should be."));
360 template <
int dim,
int spacedim>
366 ExcMessage (
"This collection contains no finite element."));
373 for (
unsigned int c=1; c<size(); ++c)
375 ExcMessage (
"Not all elements of this collection agree on what " 376 "the appropriate mask should be."));
383 template <
int dim,
int spacedim>
387 Assert (finite_elements.size () > 0, ExcNoFiniteElements());
389 const unsigned int nb = finite_elements[0]->n_blocks ();
390 for (
unsigned int i=1; i<finite_elements.size(); ++i)
391 Assert (finite_elements[i]->n_blocks() == nb,
392 ExcMessage (
"Not all finite elements in this collection have " 393 "the same number of components."));
400 template <
int dim,
int spacedim>
407 for (
unsigned int i=0; i<finite_elements.size(); ++i)
408 mem += finite_elements[i]->memory_consumption();
417 #include "fe_collection.inst" 420 DEAL_II_NAMESPACE_CLOSE
static const unsigned int invalid_unsigned_int
unsigned int find_least_face_dominating_fe(const std::set< unsigned int > &fes) const
std::vector< bool > component_mask
unsigned int size() const
static ::ExceptionBase & ExcMessage(std::string arg1)
#define Assert(cond, exc)
std_cxx11::enable_if< std_cxx11::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
std::vector< bool > block_mask
unsigned int n_components() const
virtual FiniteElement< dim, spacedim > * clone() const =0
static ::ExceptionBase & ExcInternalError()