deal.II version GIT relicensing-2169-gec1b43f35b 2024-11-22 07:10:00+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CylindricalManifold< dim, spacedim > Class Template Referenceabstract

#include <deal.II/grid/manifold_lib.h>

Inheritance diagram for CylindricalManifold< dim, spacedim >:
Inheritance graph
[legend]

Public Types

using FaceVertexNormals = std::array< Tensor< 1, spacedim >, GeometryInfo< dim >::vertices_per_face >
 

Public Member Functions

 CylindricalManifold (const unsigned int axis=0, const double tolerance=1e-10)
 
 CylindricalManifold (const Tensor< 1, spacedim > &direction, const Point< spacedim > &point_on_axis, const double tolerance=1e-10)
 
virtual std::unique_ptr< Manifold< dim, spacedim > > clone () const override
 
virtual Point< 3 > pull_back (const Point< spacedim > &space_point) const override
 
virtual Point< spacedim > push_forward (const Point< 3 > &chart_point) const override
 
virtual DerivativeForm< 1, 3, spacedim > push_forward_gradient (const Point< 3 > &chart_point) const override
 
virtual Point< spacedim > get_new_point (const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const override
 
const Tensor< 1, spacedim > & get_direction () const
 
const Point< spacedim > & get_point_on_axis () const
 
double get_tolerance () const
 
virtual Point< spacedim > get_intermediate_point (const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) const override
 
virtual void get_new_points (const ArrayView< const Point< spacedim > > &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim > > new_points) const override
 
virtual Point< spacedim > push_forward (const Point< chartdim > &chart_point) const =0
 
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient (const Point< chartdim > &chart_point) const
 
virtual Tensor< 1, spacedim > get_tangent_vector (const Point< spacedim > &x1, const Point< spacedim > &x2) const override
 
const Tensor< 1, chartdim > & get_periodicity () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
Computing the location of points.
virtual Point< spacedim > project_to_manifold (const ArrayView< const Point< spacedim > > &surrounding_points, const Point< spacedim > &candidate) const
 
virtual Point< spacedim > get_new_point_on_line (const typename Triangulation< dim, spacedim >::line_iterator &line) const
 
virtual Point< spacedim > get_new_point_on_quad (const typename Triangulation< dim, spacedim >::quad_iterator &quad) const
 
virtual Point< spacedim > get_new_point_on_hex (const typename Triangulation< dim, spacedim >::hex_iterator &hex) const
 
Point< spacedim > get_new_point_on_face (const typename Triangulation< dim, spacedim >::face_iterator &face) const
 
Point< spacedim > get_new_point_on_cell (const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
 
Computing normal vectors
virtual Tensor< 1, spacedim > normal_vector (const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const
 
virtual void get_normals_at_vertices (const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const
 
EnableObserverPointer functionality

Classes derived from EnableObserverPointer provide a facility to subscribe to this object. This is mostly used by the ObserverPointer class.

void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 

Static Public Member Functions

static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Private Types

using map_value_type = decltype(counter_map)::value_type
 
using map_iterator = decltype(counter_map)::iterator
 

Private Member Functions

void check_no_subscribers () const noexcept
 

Private Attributes

const Tensor< 1, spacedim > normal_direction
 
const Tensor< 1, spacedim > direction
 
const Point< spacedim > point_on_axis
 
const double tolerance
 
const Tensor< 1, spacedim > dxn
 
const FlatManifold< chartdim, chartdim > sub_manifold
 
std::atomic< unsigned intcounter
 
std::map< std::string, unsigned intcounter_map
 
std::vector< std::atomic< bool > * > validity_pointers
 
const std::type_info * object_info
 

Static Private Attributes

static std::mutex mutex
 

Detailed Description

template<int dim, int spacedim = dim>
class CylindricalManifold< dim, spacedim >

Cylindrical Manifold description. In three dimensions, points are transformed using a cylindrical coordinate system along the x-, y- or z-axis (when using the first constructor of this class), or an arbitrarily oriented cylinder described by the direction of its axis and a point located on the axis.

This class was developed to be used in conjunction with the cylinder or cylinder_shell functions of GridGenerator. This function will throw a run time exception whenever spacedim is not equal to three.

Definition at line 419 of file manifold_lib.h.

Member Typedef Documentation

◆ FaceVertexNormals

template<int dim, int spacedim = dim>
using Manifold< dim, spacedim >::FaceVertexNormals = std::array<Tensor<1, spacedim>, GeometryInfo<dim>::vertices_per_face>
inherited

Type keeping information about the normals at the vertices of a face of a cell. Thus, there are GeometryInfo<dim>::vertices_per_face normal vectors, that define the tangent spaces of the boundary at the vertices. Note that the vectors stored in this object are not required to be normalized, nor to actually point outward, as one often will only want to check for orthogonality to define the tangent plane; if a function requires the normals to be normalized, then it must do so itself.

For obvious reasons, this type is not useful in 1d.

Definition at line 305 of file manifold.h.

◆ map_value_type

using EnableObserverPointer::map_value_type = decltype(counter_map)::value_type
privateinherited

The data type used in counter_map.

Definition at line 238 of file enable_observer_pointer.h.

◆ map_iterator

using EnableObserverPointer::map_iterator = decltype(counter_map)::iterator
privateinherited

The iterator type used in counter_map.

Definition at line 243 of file enable_observer_pointer.h.

Constructor & Destructor Documentation

◆ CylindricalManifold() [1/2]

template<int dim, int spacedim>
CylindricalManifold< dim, spacedim >::CylindricalManifold ( const unsigned int  axis = 0,
const double  tolerance = 1e-10 
)

Constructor. Using default values for the constructor arguments yields a cylinder along the x-axis (axis=0). Choose axis=1 or axis=2 for a tube along the y- or z-axis, respectively. The tolerance value is used to determine if a point is on the axis.

Definition at line 1009 of file manifold_lib.cc.

◆ CylindricalManifold() [2/2]

template<int dim, int spacedim>
CylindricalManifold< dim, spacedim >::CylindricalManifold ( const Tensor< 1, spacedim > &  direction,
const Point< spacedim > &  point_on_axis,
const double  tolerance = 1e-10 
)

Constructor. If constructed with this constructor, the manifold described is a cylinder with an axis that points in direction direction and goes through the given point_on_axis. The direction may be arbitrarily scaled, and the given point may be any point on the axis. The tolerance value is used to determine if a point is on the axis.

Definition at line 1024 of file manifold_lib.cc.

Member Function Documentation

◆ clone()

template<int dim, int spacedim>
std::unique_ptr< Manifold< dim, spacedim > > CylindricalManifold< dim, spacedim >::clone ( ) const
overridevirtual

Make a clone of this Manifold object.

Implements Manifold< dim, spacedim >.

Definition at line 1045 of file manifold_lib.cc.

◆ pull_back()

template<int dim, int spacedim>
Point< 3 > CylindricalManifold< dim, spacedim >::pull_back ( const Point< spacedim > &  space_point) const
overridevirtual

Compute the cylindrical coordinates \((r, \phi, \lambda)\) for the given space point where \(r\) denotes the distance from the axis, \(\phi\) the angle between the given point and the computed normal direction, and \(\lambda\) the axial position.

Implements ChartManifold< dim, spacedim, chartdim >.

Definition at line 1083 of file manifold_lib.cc.

◆ push_forward() [1/2]

template<int dim, int spacedim>
Point< spacedim > CylindricalManifold< dim, spacedim >::push_forward ( const Point< 3 > &  chart_point) const
overridevirtual

Compute the Cartesian coordinates for a chart point given in cylindrical coordinates \((r, \phi, \lambda)\), where \(r\) denotes the distance from the axis, \(\phi\) the angle between the given point and the computed normal direction, and \(\lambda\) the axial position.

Definition at line 1109 of file manifold_lib.cc.

◆ push_forward_gradient() [1/2]

template<int dim, int spacedim>
DerivativeForm< 1, 3, spacedim > CylindricalManifold< dim, spacedim >::push_forward_gradient ( const Point< 3 > &  chart_point) const
overridevirtual

Compute the derivatives of the mapping from cylindrical coordinates \((r, \phi, \lambda)\) to cartesian coordinates where \(r\) denotes the distance from the axis, \(\phi\) the angle between the given point and the computed normal direction, and \(\lambda\) the axial position.

Definition at line 1129 of file manifold_lib.cc.

◆ get_new_point()

template<int dim, int spacedim>
Point< spacedim > CylindricalManifold< dim, spacedim >::get_new_point ( const ArrayView< const Point< spacedim > > &  surrounding_points,
const ArrayView< const double > &  weights 
) const
overridevirtual

Compute new points on the CylindricalManifold. See the documentation of the base class for a detailed description of what this function does.

Reimplemented from ChartManifold< dim, spacedim, chartdim >.

Definition at line 1054 of file manifold_lib.cc.

◆ get_direction()

template<int dim, int spacedim>
const Tensor< 1, spacedim > & CylindricalManifold< dim, spacedim >::get_direction ( ) const
inline

Get the Tensor parallel to the cylinder's axis.

Definition at line 1275 of file manifold_lib.h.

◆ get_point_on_axis()

template<int dim, int spacedim>
const Point< spacedim > & CylindricalManifold< dim, spacedim >::get_point_on_axis ( ) const
inline

Get a point on the Cylinder's axis.

Note
This argument, like get_direction() and get_tolerance(), just returns the arguments set in the three-argument constructor.

Definition at line 1284 of file manifold_lib.h.

◆ get_tolerance()

template<int dim, int spacedim>
double CylindricalManifold< dim, spacedim >::get_tolerance ( ) const
inline

Get the tolerance which determines if a point is on the Cylinder's axis.

Definition at line 1293 of file manifold_lib.h.

◆ get_intermediate_point()

template<int dim, int spacedim, int chartdim>
Point< spacedim > ChartManifold< dim, spacedim, chartdim >::get_intermediate_point ( const Point< spacedim > &  p1,
const Point< spacedim > &  p2,
const double  w 
) const
overridevirtualinherited

Refer to the general documentation of this class and the documentation of the base class for more information.

Reimplemented from Manifold< dim, spacedim >.

Definition at line 1013 of file manifold.cc.

◆ get_new_points()

template<int dim, int spacedim, int chartdim>
void ChartManifold< dim, spacedim, chartdim >::get_new_points ( const ArrayView< const Point< spacedim > > &  surrounding_points,
const Table< 2, double > &  weights,
ArrayView< Point< spacedim > >  new_points 
) const
overridevirtualinherited

Compute a new set of points that interpolate between the given points surrounding_points. weights is a table with as many columns as surrounding_points.size(). The number of rows in weights must match the length of new_points.

The implementation of this function first transforms the surrounding_points to the chart space by calling pull_back(). Then, new points are computed on the chart by usual interpolation according to the given weights, which are finally transformed to the image space by push_forward().

This implementation can be much more efficient for computing multiple new points from the same surrounding points than separate calls to get_new_point() in case the pull_back() operation is expensive. This is because pull_back() is only called once for the surrounding points and the interpolation is done for all given weights using this set of points. Often, pull_back() is also more expensive than push_forward() because the former might involve some kind of Newton iteration in non-trivial manifolds.

Reimplemented from Manifold< dim, spacedim >.

Definition at line 1048 of file manifold.cc.

◆ push_forward() [2/2]

template<int dim, int spacedim = dim, int chartdim = dim>
virtual Point< spacedim > ChartManifold< dim, spacedim, chartdim >::push_forward ( const Point< chartdim > &  chart_point) const
pure virtualinherited

Given a point in the chartdim dimensional Euclidean space, this method returns a point on the manifold embedded in the spacedim Euclidean space.

Refer to the general documentation of this class for more information.

Implemented in CompositionManifold< dim, spacedim, chartdim, intermediate_dim, dim1, dim2 >, FunctionManifold< dim, spacedim, chartdim >, and TensorProductManifold< dim, dim_A, spacedim_A, chartdim_A, dim_B, spacedim_B, chartdim_B >.

◆ push_forward_gradient() [2/2]

template<int dim, int spacedim, int chartdim>
DerivativeForm< 1, chartdim, spacedim > ChartManifold< dim, spacedim, chartdim >::push_forward_gradient ( const Point< chartdim > &  chart_point) const
virtualinherited

Given a point in the chartdim dimensional Euclidean space, this method returns the derivatives of the function \(F\) that maps from the chartdim-dimensional to the spacedim-dimensional space. In other words, it is a matrix of size \(\text{spacedim}\times\text{chartdim}\).

This function is used in the computations required by the get_tangent_vector() function. Since not all users of the Manifold class interface will require calling that function, the current function is implemented but will trigger an exception whenever called. This allows derived classes to avoid implementing the push_forward_gradient function if this functionality is not needed in the user program.

Refer to the general documentation of this class for more information.

Reimplemented in CompositionManifold< dim, spacedim, chartdim, intermediate_dim, dim1, dim2 >, FunctionManifold< dim, spacedim, chartdim >, and TensorProductManifold< dim, dim_A, spacedim_A, chartdim_A, dim_B, spacedim_B, chartdim_B >.

Definition at line 1074 of file manifold.cc.

◆ get_tangent_vector()

template<int dim, int spacedim, int chartdim>
Tensor< 1, spacedim > ChartManifold< dim, spacedim, chartdim >::get_tangent_vector ( const Point< spacedim > &  x1,
const Point< spacedim > &  x2 
) const
overridevirtualinherited

Return a vector that, at \(\mathbf x_1\), is tangential to the geodesic that connects two points \(\mathbf x_1,\mathbf x_2\). See the documentation of the Manifold class and of Manifold::get_tangent_vector() for a more detailed description.

For the current class, we assume that this geodesic is the image under the push_forward() operation of a straight line of the pre-images of x1 and x2 (where pre-images are computed by pulling back the locations x1 and x2). In other words, if these preimages are \(\xi_1=F^{-1}(\mathbf x_1), \xi_2=F^{-1}(\mathbf x_2)\), then the geodesic in preimage (the chartdim-dimensional Euclidean) space is

\begin{align*} \zeta(t) &= \xi_1 + t (\xi_2-\xi_1) \\ &= F^{-1}(\mathbf x_1) + t\left[F^{-1}(\mathbf x_2) -F^{-1}(\mathbf x_1)\right] \end{align*}

In image space, i.e., in the space in which we operate, this leads to the curve

\begin{align*} \mathbf s(t) &= F(\zeta(t)) \\ &= F(\xi_1 + t (\xi_2-\xi_1)) \\ &= F\left(F^{-1}(\mathbf x_1) + t\left[F^{-1}(\mathbf x_2) -F^{-1}(\mathbf x_1)\right]\right). \end{align*}

What the current function is supposed to return is \(\mathbf s'(0)\). By the chain rule, this is equal to

\begin{align*} \mathbf s'(0) &= \frac{d}{dt}\left. F\left(F^{-1}(\mathbf x_1) + t\left[F^{-1}(\mathbf x_2) -F^{-1}(\mathbf x_1)\right]\right) \right|_{t=0} \\ &= \nabla_\xi F\left(F^{-1}(\mathbf x_1)\right) \left[F^{-1}(\mathbf x_2) -F^{-1}(\mathbf x_1)\right]. \end{align*}

This formula may then have to be slightly modified by considering any periodicity that was assumed in the call to the constructor.

Thus, the computation of tangent vectors also requires the implementation of derivatives \(\nabla_\xi F(\xi)\) of the push-forward mapping. Here, \(F^{-1}(\mathbf x_2)-F^{-1}(\mathbf x_1)\) is a chartdim-dimensional vector, and \(\nabla_\xi F\left(F^{-1}(\mathbf x_1)\right) = \nabla_\xi F\left(\xi_1\right)\) is a spacedim-times-chartdim-dimensional matrix. Consequently, and as desired, the operation results in a spacedim-dimensional vector.

Parameters
x1The first point that describes the geodesic, and the one at which the "direction" is to be evaluated.
x2The second point that describes the geodesic.
Returns
A "direction" vector tangential to the geodesic.

Reimplemented from Manifold< dim, spacedim >.

Definition at line 1087 of file manifold.cc.

◆ get_periodicity()

template<int dim, int spacedim, int chartdim>
const Tensor< 1, chartdim > & ChartManifold< dim, spacedim, chartdim >::get_periodicity ( ) const
inherited

Return the periodicity associated with the submanifold.

Definition at line 1119 of file manifold.cc.

◆ project_to_manifold()

template<int dim, int spacedim = dim>
virtual Point< spacedim > Manifold< dim, spacedim >::project_to_manifold ( const ArrayView< const Point< spacedim > > &  surrounding_points,
const Point< spacedim > &  candidate 
) const
virtualinherited

Given a point which lies close to the given manifold, it modifies it and projects it to manifold itself.

This class is used by the default implementation of the function get_new_point() and should be implemented by derived classes. The default implementation simply throws an exception if called.

If your manifold is simple, you could implement this function only, and the default behavior should work out of the box.

Reimplemented in FlatManifold< dim, spacedim >, FlatManifold< chartdim, chartdim >, FlatManifold< dim, dim >, FlatManifold< dim, spacedim >, OpenCASCADE::NormalProjectionManifold< dim, spacedim >, OpenCASCADE::DirectionalProjectionManifold< dim, spacedim >, and OpenCASCADE::NormalToMeshProjectionManifold< dim, spacedim >.

◆ get_new_point_on_line()

template<int dim, int spacedim = dim>
virtual Point< spacedim > Manifold< dim, spacedim >::get_new_point_on_line ( const typename Triangulation< dim, spacedim >::line_iterator &  line) const
virtualinherited

Backward compatibility interface. Return the point which shall become the new middle vertex of the two children of a regular line. In 2d, this line is a line at the boundary, while in 3d, it is bounding a face at the boundary (the lines therefore is also on the boundary).

The default implementation of this function passes its argument to the Manifolds::get_default_points_and_weights() function, and then calls the Manifold<dim,spacedim>::get_new_point() function. User derived classes can overload Manifold<dim,spacedim>::get_new_point() or Manifold<dim,spacedim>::project_to_manifold(), which is called by the default implementation of Manifold<dim,spacedim>::get_new_point().

◆ get_new_point_on_quad()

template<int dim, int spacedim = dim>
virtual Point< spacedim > Manifold< dim, spacedim >::get_new_point_on_quad ( const typename Triangulation< dim, spacedim >::quad_iterator &  quad) const
virtualinherited

Backward compatibility interface. Return the point which shall become the common point of the four children of a quad at the boundary in three or more spatial dimensions. This function therefore is only useful in at least three dimensions and should not be called for lower dimensions.

This function is called after the four lines bounding the given quad are refined, so you may want to use the information provided by quad->line(i)->child(j), i=0...3, j=0,1.

The default implementation of this function passes its argument to the Manifolds::get_default_points_and_weights() function, and then calls the Manifold<dim,spacedim>::get_new_point() function. User derived classes can overload Manifold<dim,spacedim>::get_new_point() or Manifold<dim,spacedim>::project_to_manifold(), which is called by the default implementation of Manifold<dim,spacedim>::get_new_point().

◆ get_new_point_on_hex()

template<int dim, int spacedim = dim>
virtual Point< spacedim > Manifold< dim, spacedim >::get_new_point_on_hex ( const typename Triangulation< dim, spacedim >::hex_iterator &  hex) const
virtualinherited

Backward compatibility interface. Return the point which shall become the common point of the eight children of a hex in three or spatial dimensions. This function therefore is only useful in at least three dimensions and should not be called for lower dimensions.

This function is called after the all the bounding objects of the given hex are refined, so you may want to use the information provided by hex->quad(i)->line(j)->child(k), i=0...5, j=0...3, k=0,1.

The default implementation of this function passes its argument to the Manifolds::get_default_points_and_weights() function, and then calls the Manifold<dim,spacedim>::get_new_point() function. User derived classes can overload Manifold<dim,spacedim>::get_new_point() or Manifold<dim,spacedim>::project_to_manifold(), which is called by the default implementation of Manifold<dim,spacedim>::get_new_point().

◆ get_new_point_on_face()

template<int dim, int spacedim = dim>
Point< spacedim > Manifold< dim, spacedim >::get_new_point_on_face ( const typename Triangulation< dim, spacedim >::face_iterator &  face) const
inherited

Backward compatibility interface. Depending on dim=2 or dim=3 this function calls the get_new_point_on_line or the get_new_point_on_quad function. It throws an exception for dim=1. This wrapper allows dimension independent programming.

◆ get_new_point_on_cell()

template<int dim, int spacedim = dim>
Point< spacedim > Manifold< dim, spacedim >::get_new_point_on_cell ( const typename Triangulation< dim, spacedim >::cell_iterator &  cell) const
inherited

Backward compatibility interface. Depending on dim=1, dim=2 or dim=3 this function calls the get_new_point_on_line, get_new_point_on_quad or the get_new_point_on_hex function. This wrapper allows dimension independent programming.

◆ normal_vector()

template<int dim, int spacedim = dim>
virtual Tensor< 1, spacedim > Manifold< dim, spacedim >::normal_vector ( const typename Triangulation< dim, spacedim >::face_iterator &  face,
const Point< spacedim > &  p 
) const
virtualinherited

Return the normal vector to a face embedded in this manifold, at the point p. It is not required that the normals actually point outward from the domain even if the face iterator given points to a face on the boundary of the domain. If p is not in fact on the surface, but only close-by, try to return something reasonable, for example the normal vector at the surface point closest to p. (The point p will in fact not normally lie on the actual surface, but rather be a quadrature point mapped by some polynomial mapping; the mapped surface, however, will not usually coincide with the actual surface.)

This function only makes sense if dim==spacedim because otherwise there is no unique normal vector but in fact a (spacedim-dim+1)-dimensional tangent space of vectors that are all both normal to the face and normal to the dim-dimensional surface that lives in spacedim-dimensional space. For example, think of a two-dimensional mesh that covers a two-dimensional surface in three-dimensional space. In that case, each face (edge) is one-dimensional, and there are two linearly independent vectors that are both normal to the edge: one is normal to the edge and tangent to the surface (intuitively, that would be the one that points from the current cell to the neighboring one, if the surface was locally flat), and the other one is rooted in the edge but points perpendicular to the surface (which is also perpendicular to the edge that lives within the surface). Thus, because there are no obviously correct semantics for this function if spacedim is greater than dim, the function will simply throw an error in that situation.

The face iterator gives an indication which face this function is supposed to compute the normal vector for. This is useful if the boundary of the domain is composed of different nondifferential pieces (for example when using the FlatManifold class to approximate a geometry that is completely described by the coarse mesh, with piecewise (bi-)linear components between the vertices, but where the boundary may have a kink at the vertices itself).

Note
In 2d, the default implementation of this function computes the normal vector by taking the tangent direction from p to the further one of the two vertices that make up an edge, and then rotates it outward (with respect to the coordinate system of the edge) by 90 degrees. In 3d, the default implementation is more complicated, aiming at avoiding problems with numerical round-off for points close to one of the vertices, and avoiding tangent directions that are linearly dependent.

Reimplemented in FlatManifold< dim, spacedim >, FlatManifold< chartdim, chartdim >, FlatManifold< dim, dim >, FlatManifold< dim, spacedim >, PolarManifold< dim, spacedim >, and SphericalManifold< dim, spacedim >.

◆ get_normals_at_vertices()

template<int dim, int spacedim = dim>
virtual void Manifold< dim, spacedim >::get_normals_at_vertices ( const typename Triangulation< dim, spacedim >::face_iterator &  face,
FaceVertexNormals face_vertex_normals 
) const
virtualinherited

Compute the normal vectors to the boundary at each vertex of the given face embedded in the Manifold. It is not required that the normal vectors be normed somehow. Neither is it required that the normals actually point outward.

This function is needed to compute data for C1 mappings. The default implementation calls normal_vector() on each vertex.

Note that when computing normal vectors at a vertex where the boundary is not differentiable, you have to make sure that you compute the one-sided limits, i.e. limit with respect to points inside the given face.

◆ subscribe()

void EnableObserverPointer::subscribe ( std::atomic< bool > *const  validity,
const std::string &  identifier = "" 
) const
inherited

Subscribes a user of the object by storing the pointer validity. The subscriber may be identified by text supplied as identifier.

Definition at line 131 of file enable_observer_pointer.cc.

◆ unsubscribe()

void EnableObserverPointer::unsubscribe ( std::atomic< bool > *const  validity,
const std::string &  identifier = "" 
) const
inherited

Unsubscribes a user from the object.

Note
The identifier and the validity pointer must be the same as the one supplied to subscribe().

Definition at line 151 of file enable_observer_pointer.cc.

◆ n_subscriptions()

unsigned int EnableObserverPointer::n_subscriptions ( ) const
inlineinherited

Return the present number of subscriptions to this object. This allows to use this class for reference counted lifetime determination where the last one to unsubscribe also deletes the object.

Definition at line 322 of file enable_observer_pointer.h.

◆ list_subscribers() [1/2]

template<typename StreamType >
void EnableObserverPointer::list_subscribers ( StreamType &  stream) const
inlineinherited

List the subscribers to the input stream.

Definition at line 339 of file enable_observer_pointer.h.

◆ list_subscribers() [2/2]

void EnableObserverPointer::list_subscribers ( ) const
inherited

List the subscribers to deallog.

Definition at line 199 of file enable_observer_pointer.cc.

◆ serialize()

template<class Archive >
void EnableObserverPointer::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineinherited

Read or write the data of this object to or from a stream for the purpose of serialization using the BOOST serialization library.

This function does not actually serialize any of the member variables of this class. The reason is that what this class stores is only who subscribes to this object, but who does so at the time of storing the contents of this object does not necessarily have anything to do with who subscribes to the object when it is restored. Consequently, we do not want to overwrite the subscribers at the time of restoring, and then there is no reason to write the subscribers out in the first place.

Definition at line 331 of file enable_observer_pointer.h.

◆ check_no_subscribers()

void EnableObserverPointer::check_no_subscribers ( ) const
privatenoexceptinherited

Check that there are no objects subscribing to this object. If this check passes then it is safe to destroy the current object. It this check fails then this function will either abort or print an error message to deallog (by using the AssertNothrow mechanism), but will not throw an exception.

Note
Since this function is just a consistency check it does nothing in release mode.
If this function is called when there is an uncaught exception then, rather than aborting, this function prints an error message to the standard error stream and returns.

Definition at line 53 of file enable_observer_pointer.cc.

Member Data Documentation

◆ normal_direction

template<int dim, int spacedim = dim>
const Tensor<1, spacedim> CylindricalManifold< dim, spacedim >::normal_direction
private

A vector orthogonal to the normal direction.

Definition at line 508 of file manifold_lib.h.

◆ direction

template<int dim, int spacedim = dim>
const Tensor<1, spacedim> CylindricalManifold< dim, spacedim >::direction
private

The direction vector of the axis.

Definition at line 513 of file manifold_lib.h.

◆ point_on_axis

template<int dim, int spacedim = dim>
const Point<spacedim> CylindricalManifold< dim, spacedim >::point_on_axis
private

An arbitrary point on the axis.

Definition at line 518 of file manifold_lib.h.

◆ tolerance

template<int dim, int spacedim = dim>
const double CylindricalManifold< dim, spacedim >::tolerance
private

Relative tolerance to measure zero distances.

Definition at line 523 of file manifold_lib.h.

◆ dxn

template<int dim, int spacedim = dim>
const Tensor<1, spacedim> CylindricalManifold< dim, spacedim >::dxn
private

The direction vector perpendicular to both direction and normal_direction.

Definition at line 528 of file manifold_lib.h.

◆ sub_manifold

template<int dim, int spacedim = dim, int chartdim = dim>
const FlatManifold<chartdim, chartdim> ChartManifold< dim, spacedim, chartdim >::sub_manifold
privateinherited

The sub_manifold object is used to compute the average of the points in the chart coordinates system.

In an ideal world, it would have type FlatManifold<dim,chartdim>. However, this would instantiate cases where dim>spacedim, which leads to invalid situations. We instead use <chartdim,chartdim>, which is (i) always valid, and (ii) does not matter at all since the first (dim) argument of manifolds is, in fact, ignored as far as manifold functionality is concerned.

Definition at line 1093 of file manifold.h.

◆ counter

std::atomic<unsigned int> EnableObserverPointer::counter
mutableprivateinherited

Store the number of objects which subscribed to this object. Initially, this number is zero, and upon destruction it shall be zero again (i.e. all objects which subscribed should have unsubscribed again).

The creator (and owner) of an object is counted in the map below if HE manages to supply identification.

We use the mutable keyword in order to allow subscription to constant objects also.

This counter may be read from and written to concurrently in multithreaded code: hence we use the std::atomic class template.

Definition at line 227 of file enable_observer_pointer.h.

◆ counter_map

std::map<std::string, unsigned int> EnableObserverPointer::counter_map
mutableprivateinherited

In this map, we count subscriptions for each different identification string supplied to subscribe().

Definition at line 233 of file enable_observer_pointer.h.

◆ validity_pointers

std::vector<std::atomic<bool> *> EnableObserverPointer::validity_pointers
mutableprivateinherited

In this vector, we store pointers to the validity bool in the ObserverPointer objects that subscribe to this class.

Definition at line 249 of file enable_observer_pointer.h.

◆ object_info

const std::type_info* EnableObserverPointer::object_info
mutableprivateinherited

Pointer to the typeinfo object of this object, from which we can later deduce the class name. Since this information on the derived class is neither available in the destructor, nor in the constructor, we obtain it in between and store it here.

Definition at line 257 of file enable_observer_pointer.h.

◆ mutex

std::mutex EnableObserverPointer::mutex
staticprivateinherited

A mutex used to ensure data consistency when accessing the mutable members of this class. This lock is used in the subscribe() and unsubscribe() functions, as well as in list_subscribers().

Definition at line 280 of file enable_observer_pointer.h.


The documentation for this class was generated from the following files: