From: Luca Heltai Date: Sat, 14 Apr 2018 14:46:57 +0000 (+0000) Subject: Deprecated set_manifold. Added reset_all_manifolds. X-Git-Tag: v9.0.0-rc1~178^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=842971a2897face06fc2c98ca01962edfee299f5;p=dealii.git Deprecated set_manifold. Added reset_all_manifolds. --- diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 2879e2c2c1..ab771267cd 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -1732,7 +1732,7 @@ public: * @ingroup boundary * * @deprecated This method has been deprecated. Use - * Triangulation::set_manifold() instead. + * Triangulation::reset_manifold() instead. * * @see * @ref GlossBoundaryIndicator "Glossary entry on boundary indicators" @@ -1755,8 +1755,7 @@ public: * It is possible to remove or replace the boundary object during the * lifetime of a non-empty triangulation. Usually, this is done before the * first refinement and is dangerous afterwards. Removal of a manifold - * object is done by set_manifold(number), i.e. the function of - * same name but only one argument. This operation then replaces the + * object is done by reset_manifold(). This operation then replaces the * manifold object given before by a straight manifold approximation. * * @ingroup manifold @@ -1769,18 +1768,48 @@ public: /** - * Reset those parts of the triangulation with the given manifold_id to use - * a FlatManifold object. This is the default state of a triangulation, and - * undoes assignment of a different Manifold object by the function of same - * name and two arguments. + * Reset those parts of the triangulation with the given manifold_id + * to use a FlatManifold object. This is the default state of a + * non-curved triangulation, and undoes assignment of a different + * Manifold object by the function of same name and two arguments. * * @ingroup manifold * + * @deprecated This method has been deprecated. Use + * Triangulation::reset_manifold() instead. + * * @see * @ref GlossManifoldIndicator "Glossary entry on manifold indicators" */ + DEAL_II_DEPRECATED void set_manifold (const types::manifold_id number); + /** + * Reset those parts of the triangulation with the given manifold_id + * to use a FlatManifold object. This is the default state of a + * non-curved triangulation, and undoes assignment of a different + * Manifold object by the function Triangulation::set_manifold() + * + * @ingroup manifold + * + * @see + * @ref GlossManifoldIndicator "Glossary entry on manifold indicators" + */ + void reset_manifold (const types::manifold_id number); + + /** + * Reset all parts of the trianuglation, regardless of their + * manifold_id, to use a FlatManifold object. This undoes assignment + * of all Manifold objects by the function + * Triangulation::set_manifold() + * + * @ingroup manifold + * + * @see + * @ref GlossManifoldIndicator "Glossary entry on manifold indicators" + */ + void reset_all_manifolds (); + /** * Set the manifold_id of all cells and faces to the given argument. * diff --git a/source/grid/tria.cc b/source/grid/tria.cc index dd31de1966..693d00d854 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -8973,6 +8973,13 @@ Triangulation::set_boundary (const types::manifold_id m_number) template void Triangulation::set_manifold (const types::manifold_id m_number) +{ + reset_manifold(m_number); +} + + +template +void Triangulation::reset_manifold(const types::manifold_id m_number) { Assert(m_number < numbers::invalid_manifold_id, ExcIndexRange(m_number,0,numbers::invalid_manifold_id)); @@ -8981,6 +8988,14 @@ Triangulation::set_manifold (const types::manifold_id m_number) manifold.erase(m_number); } + +template +void Triangulation::reset_all_manifolds() +{ + manifold.clear(); +} + + template void Triangulation::set_all_manifold_ids (const types::manifold_id m_number)