Replied to most comments by Wolfgang.
Fixed constness of sub_manifold in ManifoldChart, fixed a few comments.
Fixed constness in a few places.
Removed references for simple doubles, and removed empty lines.
Added back references to quad when they are arguments of get_new_point
Made get_default_quadrature query itself the manifold when vertices are not available on subobjects.
Fixed instatiations for invalid Triangulations.
Fixed last reference, and failing test.
Some changes to the documentation.
* derived from the Manifold and Boundary base classes describe the
* geometry of a domain. One can then attach an object of a class
* derived from this base classes to the Triangulation object using
- * the Triangulation::set_boundary() (the old, deprecated function)
- * or Triangulation::set_manifold() functions, and the Triangulation
+ * the Triangulation::set_boundary() or
+ * Triangulation::set_manifold() functions, and the Triangulation
* will ask the manifold object where a new vertex should be located
* upon mesh refinement. Several classes already exist to support
* the boundary of the most common geometries, e.g.,
- * CylinderBoundary, HyperBallBoundary, or HyperShellBoundary.
+ * CylinderBoundary, HyperBallBoundary, or HyperShellBoundary.
*
* <li> Integration: When using higher order finite element methods,
* it is often necessary to compute cell terms (like cell
* The behavior of the Triangulation class w.r.t. geometry
* descriptions is the following: Triangulation::set_boundary() and
* Triangulation::set_manifold() do the exact same thing: they attach
- * a manifold descriptor to the specified id. The first function is
- * maintained for backward compatibility, but will be deprecated in
- * future releases.
+ * a manifold descriptor to the specified id. The first function
+ * expects a Boundary descriptor (which is a specialization of a
+ * Manifold description) and is provided mainly for backward
+ * compatibility, while the second class expects a Manifold
+ * descriptor. Notice that the Triangulation class only uses the
+ * Manifold interface, and you could describe both the interior and
+ * the boundary of the domain using the same object. The additional
+ * information contained in the Boundary interface is related to the
+ * computation of the exact normals.
*
- * Whenever a new vertex is needed in an object that supports
- * geometry dependent refinement (i.e., a face on the boundary, an
- * interior face, or a cell in codimension one), the Triangulation
- * queries the manifold_id of the object which needs refinement. If the
- * manifold_id is set to numbers::invalid_manifold_id, then the
+ * Whenever a new vertex is needed in an object, the Triangulation
+ * queries the manifold_id of the object which needs refinement. If
+ * the manifold_id is set to numbers::invalid_manifold_id, then the
* Triangulation queries the boundary_id (if the face is on the
* boundary) or the material_id (if the Triangulation is of
* codimension one and the object is a cell). If the previous queries
*
* </ul>
*
- * In deal.II, a Manifold is seen as a collection of points, together with a
- * notion of distance between points (on the manifold). New points are
- * typically obtained by providing a local coordinate system on the manifold,
- * identifying existing points in the local coordinate system (pulling them
- * back using the local map to obtain their local coordinates), find the new
- * point in the local coordinate system by weighted sums of the existing
- * points, and transforming back the point in the real space (pushing it
- * forward using the local map). (However, this pull back and push forward
- * only happens in classes that implement manifolds, and your own class can
- * also choose other ways of figuring out where a new point should be
- * located.)
+ * In deal.II, a Manifold is seen as a collection of points, together
+ * with a notion of distance between points (on the manifold). New
+ * points are typically obtained by providing a local coordinate
+ * system on the manifold, identifying existing points in the local
+ * coordinate system (pulling them back using the local map to obtain
+ * their local coordinates), find the new point in the local
+ * coordinate system by weighted sums of the existing points, and
+ * transforming back the point in the real space (pushing it forward
+ * using the local map). The main class that implements this mechanism
+ * is the ManifoldChart class, and this is the class that users will
+ * likely overload for complex geometries.
*
* While this process is non trivial in most cases of interest, for
* most of the trivial geometries, like cylinders, spheres or shells,
- * we provide reasonable implementations.
+ * we provide reasonable implementations.
+ *
+ * The Boundary of a Triangulation is a special case of Manifold, for
+ * which additional informations can be useful in user codes, such as
+ * normal to surfaces or to curves. If your coarse mesh is reasonably
+ * shaped, you might be interested in only attaching a manifold
+ * description to boundary portion of your domain. This can be done
+ * using the set_boundary class, which take as arguments a Boundary
+ * object (derived from Manifold). Notice that Triangulation uses only
+ * the Manifold interface, not the Boundary interface. Other tools,
+ * however, might need to compute exact normals at quadrature points,
+ * and therefore a wrapper to query Boundary objects is provided.
*
* @see @ref GlossManifoldIndicator "Glossary entry on manifold
* indicators"
<ol>
+
+ <li> New: Added support for curved interior cells for all Triangulation
+ dimensions.
+ <br>
+ A new Manifold<dim,spacedim> class was introduced which only contains the
+ interface needed by Triangulation to refine objects, leaving all boundary
+ related functions in the class Boundary<dim,spacedim>, which was made
+ derived from Manifold<dim,spacedim>. <br>
+ This new construction allows for curved interior cells, and custom refinement
+ strategies. At the moment the following Manifolds are supported:
+ <ul>
+ <li> FlatManifold<dim,spacedim>: This class replaces the old
+ StraightBoundary<dim,spacedim>, and it adds support for periodic
+ manifolds. This is the simplest class one can use to create new Manifold classes;
+ </li>
+ <li> ManifoldChart<dim,spacedim,chartdim>: This is one of the most general Manifold
+ one can think of. The user can overload the functions ManifoldChart::pull_back() and
+ ManifoldChart::push_forward(), to obtain a very general curved geometry, following
+ concepts typical of elasticity;
+ </li>
+ <li> SphericalManifold<dim,spacedim>: A simple implementation of spherical coordinates
+ transformations. This manifold allows hyper shells with curved interior cells which
+ follow the natural shape of the shell;
+ </li>
+ </ul>
+ <br>
+ The functions
+ Triangulation::set_boundary() and Triangulation::get_boundary() can still be used to
+ set and get Boundary objects instead of Manifold ones. For the get function, an exception
+ is thrown if a conversion to a valid Boundary class cannot be made on the fly.
+ <br>
+ (Luca Heltai, 2014/08/06)
+ </li>
+
<li> Ported: The build system now supports CMake 3.0.
<br>
(Matthias Maier, 2014/07/15)
template <int dim, int space_dim> class Triangulation;
-/** We collect here some helper functions used in the
- Manifold<dim,spacedim> classes.
+/**
+ * We collect here some helper functions used in the
+ * Manifold<dim,spacedim> classes.
*/
-namespace Manifolds {
- /** Given a hex iterator, construct a quadrature with the Laplace
- weigths, and all relevant points of the hex: vertices, line
- centers and face centers, which can be called when creating
- middle vertices in the manifold routines.*/
- void get_default_quadrature(const TriaIterator<CellAccessor<3, 3> >& hex,
- Quadrature<3> &quad);
+namespace Manifolds
+{
+ /**
+ * Given a hex iterator, construct a quadrature with the Laplace
+ * weigths, and all relevant points of the hex: vertices, line
+ * centers and face centers, which can be called when creating
+ * middle vertices in the manifold routines.
+ */
+ Quadrature<3>
+ get_default_quadrature(const TriaIterator<CellAccessor<3, 3> >& hex);
- /** Given a general mesh iterator, construct a quadrature with the
- Laplace weigths or with uniform weights according the parameter
- @p with_laplace, and with all relevant points of the iterator:
- vertices, line centers and/or face centers, which can be called
- when creating new vertices in the manifold routines.*/
+ /**
+ * Given a general mesh iterator, construct a quadrature with the
+ * Laplace weights or with uniform weights according the parameter
+ * @p with_laplace, and with all relevant points of the iterator:
+ * vertices, line centers and/or face centers, which can be called
+ * when creating new vertices in the manifold routines.
+ */
template <typename OBJECT, int spacedim>
- void get_default_quadrature(const OBJECT& obj,
- Quadrature<spacedim> &quad,
- bool with_laplace = false);
+ Quadrature<spacedim>
+ get_default_quadrature(const OBJECT& obj, bool with_laplace = false);
}
* @endcode
* @p quadrature is a Quadrature<spacedim> object, which contains a
* collection of points in @p spacedim dimension, and a collection of
- * weights.
+ * weights (Note that unlike almost all other cases in the library,
+ * we here interpret the points in the quadrature object to be in
+ * real space, not on the reference cell.)
*
- * Internally, the get_new_point() function calls the
+ * Internaly, the get_new_point() function calls the
* project_to_manifold() function after computing the weighted
- * average of the quadrature poitns. This allows end users to only
+ * average of the quadrature points. This allows end users to only
* overload project_to_manifold() for simple situations.
*
* Should a finer control be necessary, then get_new_point() can be
- * overloaded. For backward compatibility, this function also
- * offers an interface which is compatible with
- * Boundary<dim,spacedim>, which are all derived from
- * FlatManifold<dim,spacedim>, allowing old user codes to keep using
- * their boundary descriptors as Manifold<dim,spacedim> objects.
- *
- * The default behavior of these backward compatible interfaces is
- * to construct a Quadrature<spacedim> object containting the
- * vertices, midpoints of lines, and midpoints of quads with the
- * correct weight, and call get_new_point() with this quadrature. If
- * you need finer tuning for lines, quads or hexes, you can overload
- * any of the get_new_point_on_* functions.
+ * overloaded.
*
* FlatManifold is the specialization from which StraigthBoundary is
* derived, where the project_to_manifold() function is the identity.
* points together with appropriate weights.
*
* In its default implementation it calls internally the function
- * project to manifold. User classes can get away by simply
+ * project_to_manifold. User classes can get away by simply
* implementing that method.
*/
virtual
{
public:
/**
- * Default constructor.The optional argument can be used to specify
+ * Default constructor. The optional argument can be used to specify
* the periodicity of the spacedim-dimensional manifold (one period
- * per direction). A peridicity value of zero means that along that
- * direction there is no peridicity. By default no periodicity is
+ * per direction). A periodicity value of zero means that along that
+ * direction there is no periodicity. By default no periodicity is
* assumed.
*
* Periodicity affects the way a middle point is computed. It is
* project_to_manifold. The reason why we do it this way, is to
* allow lazy programmers to implement only the project_to_manifold
* function for their own Manifold classes which are small (or
- * trivial) perturbations of a flat manifold. For most simple
- * geometries, it is possible to get reasonable results by deriving
- * your own Manifold class from FlatManifold, and write a new
- * interface only for the project_to_manifold function.
+ * trivial) perturbations of a flat manifold. This is the case
+ * whenever the coarse mesh is a decent approximation of the
+ * manifold geometry. In this case, the middle point of a cell is
+ * close to true middle point of the manifold, and a projection may
+ * suffice.
+ *
+ * For most simple geometries, it is possible to get reasonable
+ * results by deriving your own Manifold class from FlatManifold,
+ * and write a new interface only for the project_to_manifold
+ * function. You will have good approximations also with large
+ * deformations, as long as in the coarsest mesh size you are trying
+ * to refine, the middle point is not too far from the manifold mid
+ * point, i.e., as long as the coarse mesh size is small enough.
*/
virtual Point<spacedim>
get_new_point(const Quadrature<spacedim> &quad) const;
* Manifold<dim,spacedim>. This object specializes a Manifold of
* dimension chartdim embedded in a manifold of dimension spacedim,
* for which you have explicit pull_back and push_forward
- * transformations. This object only makes sense when chartdim <=
- * dim, and the constructor throws an exception if this is not the
- * case.
+ * transformations.
*
* This is an helper class which is useful when you have an explicit
- * map from an Euclidean space of dimension dim to an Euclidean
+ * map from an Euclidean space of dimension chartdim to an Euclidean
* space of dimension spacedim which represents your manifold, i.e.,
* when your manifold \f$\mathcal{M}\f$ can be represented by a map
* \f[
* Derived classes are required to implement the push_forward() and
* the pull_back() methods.
*
+ * Notice that the dimenisions #chartdim and #spacedim can be
+ * arbitrary, as long as the transformation from $\mathcal{B}$ to
+ * $\mathcal{M}$ is invertible.
+ *
* @ingroup manifold
*
* @author Luca Heltai, 2013
/**
* Constructor. The optional argument can be used to specify the
* periodicity of the chartdim-dimensional manifold (one period per
- * direction). A peridicity value of zero means that along that
- * direction there is no peridicity. By default no periodicity is
+ * direction). A periodicity value of zero means that along that
+ * direction there is no periodicity. By default no periodicity is
* assumed.
*
* Periodicity affects the way a middle point is computed. It is
get_new_point(const Quadrature<spacedim> &quad) const;
/**
- * Pull back the given point in spacedim to the Euclidean dim
+ * Pull back the given point in spacedim to the Euclidean chartdim
* dimensional space.
*
* Refer to the general documentation of this class for more
pull_back(const Point<spacedim> &space_point) const = 0;
/**
- * Given a point in the dim dimensianal Euclidean space, this
+ * Given a point in the chartdim dimensional Euclidean space, this
* method returns a point on the manifold embedded in the spacedim
* Euclidean space.
*
* The sub_manifold object is used to compute the average of the
* points in the chart coordinates system.
*/
- FlatManifold<dim,chartdim> sub_manifold;
+ const FlatManifold<dim,chartdim> sub_manifold;
};
Manifold<3,3>::
get_new_point_on_hex (const Triangulation<3,3>::hex_iterator &) const;
+/*---Templated functions---*/
+
+namespace Manifolds {
+
+ template <typename OBJECT, int spacedim>
+ Quadrature<spacedim>
+ get_default_quadrature(const OBJECT& obj, bool with_laplace)
+ {
+ std::vector<Point<spacedim> > sp;
+ std::vector<double> wp;
+
+ const int dim = OBJECT::AccessorType::structure_dimension;
+
+ // note that the exact weights are chosen such as to minimize the
+ // distortion of the four new quads from the optimal shape; their
+ // derivation and values is copied over from the
+ // @p{MappingQ::set_laplace_on_vector} function
+ AssertDimension(spacedim, OBJECT::AccessorType::space_dimension);
+ switch(dim)
+ {
+ case 1:
+ sp.resize(2);
+ wp.resize(2);
+ sp[0] = obj->vertex(0); wp[0] = .5;
+ sp[1] = obj->vertex(1); wp[1] = .5;
+ break;
+ case 2:
+ sp.resize(8);
+ wp.resize(8);
+ sp[0] = obj->vertex(0);
+ sp[1] = obj->vertex(1);
+ sp[2] = obj->vertex(2);
+ sp[3] = obj->vertex(3);
+
+ sp[4] = obj->line(0)->has_children() ?
+ obj->line(0)->child(0)->vertex(1) :
+ obj->line(0)->get_manifold().get_new_point_on_line(obj->line(0));
+ sp[5] = obj->line(1)->has_children() ?
+ obj->line(1)->child(0)->vertex(1) :
+ obj->line(1)->get_manifold().get_new_point_on_line(obj->line(1));
+ sp[6] = obj->line(2)->has_children() ?
+ obj->line(2)->child(0)->vertex(1) :
+ obj->line(2)->get_manifold().get_new_point_on_line(obj->line(2));
+ sp[7] = obj->line(3)->has_children() ?
+ obj->line(3)->child(0)->vertex(1) :
+ obj->line(3)->get_manifold().get_new_point_on_line(obj->line(3));
+ if(with_laplace)
+ {
+ std::fill(wp.begin(), wp.begin()+4, 1.0/16.0);
+ std::fill(wp.begin()+4, wp.end(), 3.0/16.0);
+ }
+ else
+ std::fill(wp.begin(), wp.end(), 1.0/8.0);
+ break;
+ default:
+ Assert(false, ExcInternalError());
+ break;
+ }
+ return Quadrature<spacedim>(sp,wp);
+ }
+}
+
#endif // DOXYGEN
DEAL_II_NAMESPACE_CLOSE
* The two dimensional implementation of this class works by
* transforming points to spherical coordinates, taking the average in
* that coordinate system, and then transforming back the point to
- * cartesian coordinates. For the three dimensional case, we use a
+ * Cartesian coordinates. For the three dimensional case, we use a
* simpler approach: we take the average of the norm of the points,
* and use this value to shift the average point along the radial
* direction. In order for this manifold to work correctly, it cannot
/**
* The Constructor takes the center of the spherical coordinates
* system. This class uses the pull_back and push_forward mechanism
- * to transform from cartesian to spherical coordinate systems,
+ * to transform from Cartesian to spherical coordinate systems,
* taking into account the periodicity of base Manifold in two
* dimensions, while in three dimensions it takes the middle point,
* and project it along the radius using the average radius of the
// -------------------------------------------------------------------
-
-
+// Explicit invalid things...
+template <>
+const Manifold<2,1> & Triangulation<2, 1>::get_manifold(const types::manifold_id) const;
+template <>
+const Manifold<3,1> & Triangulation<3, 1>::get_manifold(const types::manifold_id) const;
+template <>
+const Manifold<3,2> & Triangulation<3, 2>::get_manifold(const types::manifold_id) const;
#endif // DOXYGEN
DEAL_II_NAMESPACE_OPEN
-
namespace Manifolds {
- void get_default_quadrature(const TriaIterator<CellAccessor<3, 3> >& obj,
- Quadrature<3> &quad)
+ Quadrature<3>
+ get_default_quadrature(const TriaIterator<CellAccessor<3, 3> >& obj)
{
std::vector<Point<3> > sp;
std::vector<double> wp;
const int dim = 3;
- int np = GeometryInfo<dim>::vertices_per_cell+
- GeometryInfo<dim>::lines_per_cell+
- GeometryInfo<dim>::faces_per_cell;
+ const unsigned int np =
+ GeometryInfo<dim>::vertices_per_cell+
+ GeometryInfo<dim>::lines_per_cell+
+ GeometryInfo<dim>::faces_per_cell;
+
sp.resize(np);
wp.resize(np);
unsigned int j=0;
+
+ // note that the exact weights are chosen such as to minimize the
+ // distortion of the eight new hexes from the optimal shape; their
+ // derivation and values is copied over from the
+ // @p{MappingQ::set_laplace_on_vector} function
for(unsigned int i=0; i<GeometryInfo<dim>::vertices_per_cell; ++i, ++j)
{
sp[j] = obj->vertex(i);
for(unsigned int i=0; i<GeometryInfo<dim>::lines_per_cell; ++i, ++j)
{
sp[j] = (obj->line(i)->has_children() ? obj->line(i)->child(0)->vertex(1) :
- obj->line(i)->center());
+ obj->line(i)->get_manifold().get_new_point_on_line(obj->line(i)));
wp[j] = 7.0/192.0;
}
for(unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i, ++j)
{
sp[j] = (obj->face(i)->has_children() ? obj->face(i)->isotropic_child(0)->vertex(3) :
- obj->face(i)->center());
+ obj->face(i)->get_manifold().get_new_point_on_face(obj->face(i)));
wp[j] = 1.0/12.0;
}
- quad = Quadrature<3>(sp,wp);
- }
-
-
- template <typename OBJECT, int spacedim>
- void get_default_quadrature(const OBJECT& obj,
- Quadrature<spacedim> &quad, bool with_laplace)
- {
- std::vector<Point<spacedim> > sp;
- std::vector<double> wp;
-
- const int dim = OBJECT::AccessorType::structure_dimension;
-
- AssertDimension(spacedim, OBJECT::AccessorType::space_dimension);
- switch(dim)
- {
- case 1:
- sp.resize(2);
- wp.resize(2);
- sp[0] = obj->vertex(0); wp[0] = .5;
- sp[1] = obj->vertex(1); wp[1] = .5;
- break;
- case 2:
- sp.resize(8);
- wp.resize(8);
- sp[0] = obj->vertex(0);
- sp[1] = obj->vertex(1);
- sp[2] = obj->vertex(2);
- sp[3] = obj->vertex(3);
-
- sp[4] = obj->line(0)->has_children() ?
- obj->line(0)->child(0)->vertex(1) :
- obj->line(0)->center();
- sp[5] = obj->line(1)->has_children() ?
- obj->line(1)->child(0)->vertex(1) :
- obj->line(1)->center();
- sp[6] = obj->line(2)->has_children() ?
- obj->line(2)->child(0)->vertex(1) :
- obj->line(2)->center();
- sp[7] = obj->line(3)->has_children() ?
- obj->line(3)->child(0)->vertex(1) :
- obj->line(3)->center();
- if(with_laplace)
- {
- std::fill(wp.begin(), wp.begin()+4, 1.0/16.0);
- std::fill(wp.begin()+4, wp.end(), 3.0/16.0);
- }
- else
- std::fill(wp.begin(), wp.end(), 1.0/8.0);
- break;
- default:
- Assert(false, ExcInternalError());
- break;
- }
- quad = Quadrature<spacedim>(sp,wp);
+ return Quadrature<3>(sp,wp);
}
+
}
using namespace Manifolds;
Manifold<dim, spacedim>::
get_new_point_on_line (const typename Triangulation<dim, spacedim>::line_iterator &line) const
{
- Quadrature<spacedim> quadrature;
- get_default_quadrature(line, quadrature);
- return get_new_point(quadrature);
+ return get_new_point
+ (get_default_quadrature<const typename Triangulation<dim, spacedim>::line_iterator,
+ spacedim>(line, false));
}
Manifold<dim, spacedim>::
get_new_point_on_quad (const typename Triangulation<dim, spacedim>::quad_iterator &quad) const
{
- Quadrature<spacedim> quadrature;
- get_default_quadrature(quad, quadrature);
- return get_new_point(quadrature);
+ return get_new_point
+ (get_default_quadrature<const typename Triangulation<dim, spacedim>::quad_iterator,
+ spacedim>(quad, false));
}
Point<3>
Manifold<3,3>::
get_new_point_on_hex (const typename Triangulation<3, 3>::hex_iterator &hex) const{
- Quadrature<3> quadrature;
- get_default_quadrature(hex, quadrature);
- return get_new_point(quadrature);
+ return get_new_point(get_default_quadrature(hex));
}
Point<spacedim> p;
Point<spacedim> dp;
Point<spacedim> minP = periodicity;
- bool check_period = (periodicity.norm() > tolerance);
+ const bool check_period = (periodicity.norm() > tolerance);
if(check_period)
for(unsigned int i=0; i<surrounding_points.size(); ++i)
for(unsigned int d=0; d<spacedim; ++d) {
for(unsigned int i=0; i<surrounding_points.size(); ++i)
chart_points[i] = pull_back(surrounding_points[i]);
- Quadrature<chartdim> chart_quad(chart_points, weights);
- Point<chartdim> p_chart = sub_manifold.get_new_point(chart_quad);
+ const Quadrature<chartdim> chart_quad(chart_points, weights);
+ const Point<chartdim> p_chart = sub_manifold.get_new_point(chart_quad);
return push_forward(p_chart);
}
SphericalManifold<dim,spacedim>::push_forward(const Point<spacedim> &spherical_point) const {
Assert(spherical_point[0] >=0.0,
ExcMessage("Negative radius for given point."));
- const double &rho = spherical_point[0];
- const double &theta = spherical_point[1];
+ const double rho = spherical_point[0];
+ const double theta = spherical_point[1];
Point<spacedim> p;
if(rho > 1e-10)
SphericalManifold<dim,spacedim>::pull_back(const Point<spacedim> &space_point) const {
const Point<spacedim> R = space_point-center;
const double rho = R.norm();
- const double &x = R[0];
- const double &y = R[1];
+ const double x = R[0];
+ const double y = R[1];
Point<spacedim> p;
p[0] = rho;
break;
case 3:
{
- const double &z = R[2];
+ const double z = R[2];
p[2] = atan2(y,x); // phi
if(p[2] < 0)
p[2] += 2*numbers::PI; // phi is periodic
p[1] = atan2(sqrt(x*x+y*y),z); // theta
- // if(p[1] < 0)
- // p[1] += 2*numbers::PI;
}
break;
default:
// boundary object
if (dim == spacedim)
{
- // in a first step, compute the location of central
- // vertex as the average of the 8 surrounding
- // vertices, using Manifolds helper functions
- Quadrature<spacedim> quadrature;
- Manifolds::get_default_quadrature(cell,quadrature);
-
// triangulation.vertices[next_unused_vertex] = new_point;
triangulation.vertices[next_unused_vertex] =
- cell->get_manifold().get_new_point(quadrature);
+ cell->get_manifold().get_new_point
+ (Manifolds::get_default_quadrature
+ <typename Triangulation<dim,spacedim>::active_cell_iterator,
+ spacedim>(cell));
// if the user_flag is set, i.e. if the
// cell is at the boundary, use a
// derivation and values is copied over from
// the @p{MappingQ::set_laplace_on_vector}
// function
- Quadrature<spacedim> qs;
- Manifolds::get_default_quadrature(quad, qs, true);
triangulation.vertices[next_unused_vertex] =
- quad->get_manifold().get_new_point (qs);
+ quad->get_manifold().get_new_point
+ (Manifolds::get_default_quadrature
+ <typename Triangulation<dim,spacedim>::quad_iterator,
+ spacedim>(quad, true));
}
triangulation.vertices_used[next_unused_vertex] = true;
// now that we created the right point, make up
refinement_listener_map.erase (refinement_listener_map.find (&listener));
}
+template <>
+const Manifold<2,1> & Triangulation<2, 1>::get_manifold(const types::manifold_id) const {
+ Assert(false, ExcImpossibleInDim(1));
+ static FlatManifold<2,1> flat;
+ return flat;
+}
+
+template <>
+const Manifold<3,1> & Triangulation<3, 1>::get_manifold(const types::manifold_id) const {
+ Assert(false, ExcImpossibleInDim(1));
+ static FlatManifold<3,1> flat;
+ return flat;
+}
+template <>
+const Manifold<3,2> & Triangulation<3, 2>::get_manifold(const types::manifold_id) const {
+ Assert(false, ExcImpossibleInDim(2));
+ static FlatManifold<3,2> flat;
+ return flat;
+}
// explicit instantiations
#include "tria.inst"
GridOut gridout;
gridout.write_msh(tria, deallog.get_file_stream());
-
}
int main ()
deallog << "Testing dim " << dim
<< ", spacedim " << spacedim << std::endl;
- MINE::SphericalManifold<dim,spacedim> manifold;
+ SphericalManifold<dim,spacedim> manifold;
Triangulation<dim,spacedim> tria;
GridGenerator::hyper_shell (tria, Point<spacedim>(), .3, .6, 12);
26 0.00000 0.600000 0.00000
27 0.00000 0.00000 -0.600000
28 0.00000 0.00000 0.600000
-29 -0.264143 -0.109412 -0.0908716
+29 -0.266422 -0.0975173 -0.0975173
30 -0.259808 -0.259808 -0.259808
-31 0.264143 -0.109412 -0.0908716
-32 0.109412 -0.264143 -0.0908716
-33 0.127412 -0.0527760 -0.266422
+31 0.266422 -0.0975173 -0.0975173
+32 0.0975173 -0.266422 -0.0975173
+33 0.0975173 -0.0975173 -0.266422
34 0.259808 -0.259808 -0.259808
-35 -0.264143 0.109412 -0.0908716
-36 -0.109412 0.264143 -0.0908716
+35 -0.266422 0.0975173 -0.0975173
+36 -0.0975173 0.266422 -0.0975173
37 -0.259808 0.259808 -0.259808
-38 0.109412 0.264143 -0.0908716
+38 0.0975173 0.266422 -0.0975173
39 0.259808 0.259808 -0.259808
-40 -0.264143 -0.109412 0.0908716
-41 0.0527760 -0.127412 0.266422
+40 -0.266422 -0.0975173 0.0975173
+41 -0.0975173 -0.0975173 0.266422
42 -0.259808 -0.259808 0.259808
-43 0.127412 -0.0527760 0.266422
+43 0.0975173 -0.0975173 0.266422
44 0.259808 -0.259808 0.259808
45 -0.259808 0.259808 0.259808
-46 0.109412 0.264143 0.0908716
-47 0.127412 0.0527760 0.266422
+46 0.0975173 0.266422 0.0975173
+47 0.0975173 0.0975173 0.266422
48 0.259808 0.259808 0.259808
-49 -0.264143 0.109412 0.0908716
-50 -0.450000 5.51091e-17 2.75546e-17
-51 0.264143 0.109412 -0.0908716
-52 0.264143 -0.109412 0.0908716
-53 0.264143 0.109412 0.0908716
-54 0.450000 0.00000 2.75546e-17
-55 -0.109412 -0.264143 -0.0908716
-56 -0.109412 -0.264143 0.0908716
-57 0.109412 -0.264143 0.0908716
-58 -8.26637e-17 -0.450000 2.75546e-17
-59 -0.109412 0.264143 0.0908716
-60 2.75546e-17 0.450000 2.75546e-17
-61 0.0527760 -0.127412 -0.266422
-62 0.0527760 0.127412 -0.266422
-63 0.127412 0.0527760 -0.266422
-64 5.51091e-17 0.00000 -0.450000
-65 0.0527760 0.127412 0.266422
+49 -0.266422 0.0975173 0.0975173
+50 -0.450000 0.00000 0.00000
+51 0.266422 0.0975173 -0.0975173
+52 0.266422 -0.0975173 0.0975173
+53 0.266422 0.0975173 0.0975173
+54 0.450000 0.00000 0.00000
+55 -0.0975173 -0.266422 -0.0975173
+56 -0.0975173 -0.266422 0.0975173
+57 0.0975173 -0.266422 0.0975173
+58 0.00000 -0.450000 0.00000
+59 -0.0975173 0.266422 0.0975173
+60 0.00000 0.450000 0.00000
+61 -0.0975173 -0.0975173 -0.266422
+62 -0.0975173 0.0975173 -0.266422
+63 0.0975173 0.0975173 -0.266422
+64 0.00000 0.00000 -0.450000
+65 -0.0975173 0.0975173 0.266422
66 0.00000 0.00000 0.450000
-67 -0.528286 -0.218823 -0.181743
-68 0.528286 -0.218823 -0.181743
-69 0.218823 -0.528286 -0.181743
-70 0.254825 -0.105552 -0.532844
-71 -0.528286 0.218823 -0.181743
-72 -0.218823 0.528286 -0.181743
-73 0.218823 0.528286 -0.181743
-74 -0.528286 -0.218823 0.181743
-75 0.105552 -0.254825 0.532844
-76 0.254825 -0.105552 0.532844
-77 0.218823 0.528286 0.181743
-78 0.254825 0.105552 0.532844
-79 -0.528286 0.218823 0.181743
-80 0.528286 0.218823 -0.181743
-81 0.528286 -0.218823 0.181743
-82 0.528286 0.218823 0.181743
-83 -0.218823 -0.528286 -0.181743
-84 -0.218823 -0.528286 0.181743
-85 0.218823 -0.528286 0.181743
-86 -0.218823 0.528286 0.181743
-87 0.105552 -0.254825 -0.532844
-88 0.105552 0.254825 -0.532844
-89 0.254825 0.105552 -0.532844
-90 0.105552 0.254825 0.532844
-91 -0.396214 -0.164117 -0.136307
-92 0.229368 -5.61789e-17 -0.193366
-93 0.396214 -0.164117 -0.136307
-94 0.212132 -0.212132 1.83697e-17
-95 0.0877753 -0.211908 -0.193366
-96 0.191119 -0.0791640 -0.399633
-97 0.164117 -0.396214 -0.136307
-98 -0.396214 0.164117 -0.136307
-99 -0.212132 0.212132 1.83697e-17
-100 -0.164117 0.396214 -0.136307
-101 0.164117 0.396214 -0.136307
-102 0.211908 0.0877753 0.193366
-103 0.0791640 -0.191119 0.399633
-104 -0.396214 -0.164117 0.136307
-105 0.191119 -0.0791640 0.399633
-106 0.164117 0.396214 0.136307
-107 0.0877753 0.211908 0.193366
-108 0.191119 0.0791640 0.399633
-109 -0.396214 0.164117 0.136307
-110 0.396214 0.164117 -0.136307
-111 0.229368 -5.61789e-17 0.193366
-112 0.212132 0.212132 1.83697e-17
-113 0.396214 0.164117 0.136307
-114 0.396214 -0.164117 0.136307
-115 -0.212132 -0.212132 1.83697e-17
-116 0.0877753 -0.211908 0.193366
-117 -0.164117 -0.396214 0.136307
-118 0.164117 -0.396214 0.136307
-119 -0.164117 -0.396214 -0.136307
-120 -0.164117 0.396214 0.136307
-121 0.0791640 -0.191119 -0.399633
-122 0.211908 0.0877753 -0.193366
-123 0.0791640 0.191119 -0.399633
-124 0.0877753 0.211908 -0.193366
-125 0.191119 0.0791640 -0.399633
-126 0.0791640 0.191119 0.399633
-127 0.458736 -1.12358e-16 -0.386732
-128 0.424264 -0.424264 3.67394e-17
-129 0.175551 -0.423816 -0.386732
-130 -0.424264 0.424264 3.67394e-17
-131 0.423816 0.175551 0.386732
-132 0.175551 0.423816 0.386732
-133 0.458736 -1.12358e-16 0.386732
-134 0.424264 0.424264 3.67394e-17
-135 -0.424264 -0.424264 3.67394e-17
-136 0.175551 -0.423816 0.386732
-137 0.423816 0.175551 -0.386732
-138 0.175551 0.423816 -0.386732
-139 -0.318198 -0.318198 -1.72286e-16
-140 0.335064 0.0781260 0.290049
-141 0.131663 -0.317862 0.290049
-142 0.318198 -0.318198 -1.72286e-16
-143 0.344052 -8.42684e-17 0.290049
-144 0.131663 0.317862 0.290049
-145 0.318198 0.318198 2.75546e-17
-146 0.344052 -8.42684e-17 -0.290049
-147 0.131663 0.317862 -0.290049
-148 -0.318198 0.318198 -1.72286e-16
-149 0.335064 0.0781260 -0.290049
-150 0.131663 -0.317862 -0.290049
+67 -0.532844 -0.195035 -0.195035
+68 0.532844 -0.195035 -0.195035
+69 0.195035 -0.532844 -0.195035
+70 0.195035 -0.195035 -0.532844
+71 -0.532844 0.195035 -0.195035
+72 -0.195035 0.532844 -0.195035
+73 0.195035 0.532844 -0.195035
+74 -0.532844 -0.195035 0.195035
+75 -0.195035 -0.195035 0.532844
+76 0.195035 -0.195035 0.532844
+77 0.195035 0.532844 0.195035
+78 0.195035 0.195035 0.532844
+79 -0.532844 0.195035 0.195035
+80 0.532844 0.195035 -0.195035
+81 0.532844 -0.195035 0.195035
+82 0.532844 0.195035 0.195035
+83 -0.195035 -0.532844 -0.195035
+84 -0.195035 -0.532844 0.195035
+85 0.195035 -0.532844 0.195035
+86 -0.195035 0.532844 0.195035
+87 -0.195035 -0.195035 -0.532844
+88 -0.195035 0.195035 -0.532844
+89 0.195035 0.195035 -0.532844
+90 -0.195035 0.195035 0.532844
+91 -0.399633 -0.146276 -0.146276
+92 0.212132 0.00000 -0.212132
+93 0.399633 -0.146276 -0.146276
+94 0.212132 -0.212132 0.00000
+95 0.00000 -0.212132 -0.212132
+96 0.146276 -0.146276 -0.399633
+97 0.146276 -0.399633 -0.146276
+98 -0.399633 0.146276 -0.146276
+99 -0.212132 0.212132 0.00000
+100 -0.146276 0.399633 -0.146276
+101 0.146276 0.399633 -0.146276
+102 -0.212132 0.00000 0.212132
+103 -0.146276 -0.146276 0.399633
+104 -0.399633 -0.146276 0.146276
+105 0.146276 -0.146276 0.399633
+106 0.146276 0.399633 0.146276
+107 0.00000 0.212132 0.212132
+108 0.146276 0.146276 0.399633
+109 -0.399633 0.146276 0.146276
+110 0.399633 0.146276 -0.146276
+111 0.212132 0.00000 0.212132
+112 0.212132 0.212132 0.00000
+113 0.399633 0.146276 0.146276
+114 0.399633 -0.146276 0.146276
+115 -0.212132 -0.212132 0.00000
+116 0.00000 -0.212132 0.212132
+117 -0.146276 -0.399633 0.146276
+118 0.146276 -0.399633 0.146276
+119 -0.146276 -0.399633 -0.146276
+120 -0.146276 0.399633 0.146276
+121 -0.146276 -0.146276 -0.399633
+122 -0.212132 0.00000 -0.212132
+123 -0.146276 0.146276 -0.399633
+124 0.00000 0.212132 -0.212132
+125 0.146276 0.146276 -0.399633
+126 -0.146276 0.146276 0.399633
+127 0.424264 0.00000 -0.424264
+128 0.424264 -0.424264 0.00000
+129 0.00000 -0.424264 -0.424264
+130 -0.424264 0.424264 0.00000
+131 -0.424264 0.00000 0.424264
+132 0.00000 0.424264 0.424264
+133 0.424264 0.00000 0.424264
+134 0.424264 0.424264 0.00000
+135 -0.424264 -0.424264 0.00000
+136 0.00000 -0.424264 0.424264
+137 -0.424264 0.00000 -0.424264
+138 0.00000 0.424264 -0.424264
+139 -0.318198 -0.318198 0.00000
+140 -0.318198 0.00000 0.318198
+141 0.00000 -0.318198 0.318198
+142 0.318198 -0.318198 0.00000
+143 0.318198 0.00000 0.318198
+144 0.00000 0.318198 0.318198
+145 0.318198 0.318198 0.00000
+146 0.318198 0.00000 -0.318198
+147 0.00000 0.318198 -0.318198
+148 -0.318198 0.318198 0.00000
+149 -0.318198 0.00000 -0.318198
+150 0.00000 -0.318198 -0.318198
$ENDNOD
$ELM
96