From: Wolfgang Bangerth Date: Thu, 23 Feb 2006 01:23:56 +0000 (+0000) Subject: Remove single_mapping mode, since the hp::FEValues classes are now smart X-Git-Tag: v8.0.0~12216 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e19d522982debb4fcf570aba489e8f5829434de;p=dealii.git Remove single_mapping mode, since the hp::FEValues classes are now smart enough to detect these cases themselves. git-svn-id: https://svn.dealii.org/trunk@12466 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/fe/mapping_collection.h b/deal.II/deal.II/include/fe/mapping_collection.h index 80f972f37d..93ed6bdbb9 100644 --- a/deal.II/deal.II/include/fe/mapping_collection.h +++ b/deal.II/deal.II/include/fe/mapping_collection.h @@ -31,14 +31,17 @@ namespace hp * It implements the concepts stated in the @ref hpcollection module described * in the doxygen documentation. * - * Although it is recommended to supply an appropriate mapping for each finite - * element kind used in a hp-computation, the MappingCollection class - * implements a conversion constructor from a single mapping. Therefore it is - * possible to offer only a single mapping to the hp::FEValues class instead of - * a hp::MappingCollection. This is for the convenience of the user, as many - * simple geometries do not require different mappings along the boundary to - * achieve optimal convergence rates. Hence providing a single mapping object - * will usually suffice. + * Although it is recommended to supply an appropriate mapping for + * each finite element kind used in a hp-computation, the + * MappingCollection class implements a conversion constructor from a + * single mapping. Therefore it is possible to offer only a single + * mapping to the hp::FEValues class instead of a + * hp::MappingCollection. This is for the convenience of the user, as + * many simple geometries do not require different mappings along the + * boundary to achieve optimal convergence rates. Hence providing a + * single mapping object will usually suffice. See the hp::FEValues + * class for the rules which mapping will be selected for a given + * cell. * * @ingroup hp hpcollection * @@ -56,11 +59,14 @@ namespace hp /** * Conversion constructor. This - * constructor creates a MappingCollection - * from a single mapping. In - * the newly created MappingCollection, this - * mapping is used for all active_fe - * indices. + * constructor creates a + * MappingCollection from a + * single mapping. More + * mappings can be added with + * push_back(), if desired, + * though it would probably be + * clearer to add all mappings + * the same way. */ MappingCollection (const Mapping &mapping); @@ -109,20 +115,6 @@ namespace hp unsigned int memory_consumption () const; private: - /** - * Upon construction of a - * MappingCollection the later - * functionality of the class is - * specified. Either it is a real - * collection, which provides different - * mappings for each active_fe_index or - * its a "unreal" collection, which - * returns a the same mapping for all - * active_fe_indices. This boolean - * remembers which type this object is. - */ - const bool single_mapping; - /** * The real container, which stores * pointers to the different Mapping diff --git a/deal.II/deal.II/source/fe/mapping_collection.cc b/deal.II/deal.II/source/fe/mapping_collection.cc index 055c746d00..19456a5b95 100644 --- a/deal.II/deal.II/source/fe/mapping_collection.cc +++ b/deal.II/deal.II/source/fe/mapping_collection.cc @@ -19,16 +19,13 @@ namespace hp { template - MappingCollection::MappingCollection () : - single_mapping (false) + MappingCollection::MappingCollection () { } template MappingCollection::MappingCollection (const Mapping &mapping) - : - single_mapping (true) { mappings .push_back (boost::shared_ptr >(mapping.clone())); @@ -40,14 +37,9 @@ namespace hp const Mapping & MappingCollection::operator[] (const unsigned int index) const { - if (single_mapping) - return *mappings[0]; - else - { - Assert (index < mappings.size (), - ExcIndexRange (index, 0, mappings.size ())); - return *mappings[index]; - } + Assert (index < mappings.size (), + ExcIndexRange (index, 0, mappings.size ())); + return *mappings[index]; } @@ -64,12 +56,6 @@ namespace hp void MappingCollection::push_back (const Mapping &new_mapping) { - // A MappingCollection, which was - // initialized as single - // MappingCollection cannot administrate - // other Mappings. - Assert (!single_mapping, ExcNotInitialized ()); - mappings .push_back (boost::shared_ptr >(new_mapping.clone())); }