Manicore
Library to implement schemes on n-dimensionnal manifolds.
Public Member Functions | Static Public Attributes | List of all members
Manicore::dCell_map< dimension, d > Class Template Reference

Manage the geometry of a cell. More...

#include <dcell.hpp>

Inheritance diagram for Manicore::dCell_map< dimension, d >:
Inheritance graph
[legend]

Public Member Functions

 dCell_map (Eigen::Vector< double, dimension > const &center_mass, Eigen::Matrix< double, dimension, d > const &flat_map, double diam, std::vector< Simplex< d >> const &triangulation)
 Flat constructor. More...
 
 dCell_map (std::vector< std::unique_ptr< ParametrizedMap< dimension, d >>> &maps, std::vector< std::unique_ptr< ParametrizedDerivedMap< dimension, d >>> &pullback_maps, std::vector< Simplex< d >> const &triangulation)
 General constructor. More...
 
bool is_flat () const
 Is the cell flat. More...
 
std::vector< Simplex< d > > const & get_reference_elem () const
 Return the reference element as a collection of simplexes. More...
 
Eigen::Vector< double, dimension > evaluate_I (size_t rel_map_id, Eigen::Vector< double, d > const &x) const
 Evaluate the parametrization from the reference element to a chart. More...
 
Eigen::Vector< double, d > evaluate_J (size_t rel_map_id, Eigen::Vector< double, dimension > const &x) const
 Evaluate the inverse mapping from the chart to the reference element. More...
 
double evaluate_poly_on_ref (Eigen::Vector< double, d > const &x, size_t i_pbasis, int r) const
 Evaluate a scalar polynomial on the reference element. More...
 
double evaluate_poly_pullback (size_t rel_map_id, Eigen::Vector< double, dimension > const &x, size_t i_pbasis, int r) const
 Evaluate the pullback of a scalar polynomial on the chart. More...
 
Eigen::Matrix< double, dimension, d > evaluate_DI (size_t rel_map_id, Eigen::Vector< double, d > const &x) const
 Evaluate the differential of the parametrization. More...
 
Eigen::Matrix< double, d, dimension > evaluate_DJ (size_t rel_map_id, Eigen::Vector< double, dimension > const &x) const
 Evaluate the differential of the inverse mapping. More...
 
template<size_t l>
Eigen::Matrix< double, Dimension::ExtDim(l, d), Dimension::ExtDim(l, dimension)> evaluate_DI_p (size_t rel_map_id, Eigen::Vector< double, d > const &x) const
 Compute the action of the pullback of l-forms by the parametrization. More...
 
template<size_t l>
Eigen::Matrix< double, Dimension::ExtDim(l, dimension), Dimension::ExtDim(l, d)> evaluate_DJ_p (size_t rel_map_id, Eigen::Vector< double, dimension > const &x) const
 Compute the action of the pullback of l-forms by the inverse mapping. More...
 
int get_orientation (size_t rel_map_id, Eigen::Vector< double, dimension > const &x, Eigen::Matrix< double, dimension, d-1 > const &pM) const requires(d >1)
 Return the relative orientation. More...
 

Static Public Attributes

static constexpr size_t cell_dim = d
 Dimension of the cell More...
 

Detailed Description

template<size_t dimension, size_t d>
class Manicore::dCell_map< dimension, d >

Manage the geometry of a cell.

Template Parameters
dimensionDimension of the manifold
dDimension of the cell Hold the reference element, compute the mappings and pullback between the reference element and the charts.

The class is specialize to apply some optimization when dealing with flat cells.

Constructor & Destructor Documentation

◆ dCell_map() [1/2]

template<size_t dimension, size_t d>
Manicore::dCell_map< dimension, d >::dCell_map ( Eigen::Vector< double, dimension > const &  center_mass,
Eigen::Matrix< double, dimension, d > const &  flat_map,
double  diam,
std::vector< Simplex< d >> const &  triangulation 
)

Flat constructor.

Simplify the structure when dealing with flat cells. This must be a flat surface in a chart parametrized by an affine mapping, and all its boundary element must also be flat. As an additional restriction, a flat cell can only be in a single chart

Parameters
center_massCentroid
flat_mapBasis of the tangent space
diamScaling factor to apply
triangulationReference element given as a collection of simplexes

◆ dCell_map() [2/2]

template<size_t dimension, size_t d>
Manicore::dCell_map< dimension, d >::dCell_map ( std::vector< std::unique_ptr< ParametrizedMap< dimension, d >>> &  maps,
std::vector< std::unique_ptr< ParametrizedDerivedMap< dimension, d >>> &  pullback_maps,
std::vector< Simplex< d >> const &  triangulation 
)

General constructor.

Parameters
mapsList of the parametrization of this cell
pullback_mapsDifferentials of the parametrization of this cell
triangulationReference element given as a collection of simplexes

Member Function Documentation

◆ evaluate_DI()

template<size_t dimension, size_t d>
Eigen::Matrix< double, dimension, d > Manicore::dCell_map< dimension, d >::evaluate_DI ( size_t  rel_map_id,
Eigen::Vector< double, d > const &  x 
) const

Evaluate the differential of the parametrization.

Parameters
rel_map_idRelative id of the chart to use
xLocation on the reference element

◆ evaluate_DI_p()

template<size_t dimension, size_t d>
template<size_t l>
Eigen::Matrix< double, Dimension::ExtDim(l, d), Dimension::ExtDim(l, dimension)> Manicore::dCell_map< dimension, d >::evaluate_DI_p ( size_t  rel_map_id,
Eigen::Vector< double, d > const &  x 
) const

Compute the action of the pullback of l-forms by the parametrization.

 

Template Parameters
lForm degree
Parameters
rel_map_idRelative id of the chart to use
xLocation on the reference element

◆ evaluate_DJ()

template<size_t dimension, size_t d>
Eigen::Matrix< double, d, dimension > Manicore::dCell_map< dimension, d >::evaluate_DJ ( size_t  rel_map_id,
Eigen::Vector< double, dimension > const &  x 
) const

Evaluate the differential of the inverse mapping.

Parameters
rel_map_idRelative id of the chart to use
xLocation on the chart

◆ evaluate_DJ_p()

template<size_t dimension, size_t d>
template<size_t l>
Eigen::Matrix< double, Dimension::ExtDim(l, dimension), Dimension::ExtDim(l, d)> Manicore::dCell_map< dimension, d >::evaluate_DJ_p ( size_t  rel_map_id,
Eigen::Vector< double, dimension > const &  x 
) const

Compute the action of the pullback of l-forms by the inverse mapping.

 

Template Parameters
lForm degree
Parameters
rel_map_idRelative id of the chart to use
xLocation on the chart

◆ evaluate_I()

template<size_t dimension, size_t d>
Eigen::Vector< double, dimension > Manicore::dCell_map< dimension, d >::evaluate_I ( size_t  rel_map_id,
Eigen::Vector< double, d > const &  x 
) const

Evaluate the parametrization from the reference element to a chart.

Parameters
rel_map_idRelative id of the chart to use
xLocation on the reference element

◆ evaluate_J()

template<size_t dimension, size_t d>
Eigen::Vector< double, d > Manicore::dCell_map< dimension, d >::evaluate_J ( size_t  rel_map_id,
Eigen::Vector< double, dimension > const &  x 
) const

Evaluate the inverse mapping from the chart to the reference element.

Parameters
rel_map_idRelative id of the chart to use
xLocation on the chart

◆ evaluate_poly_on_ref()

template<size_t dimension, size_t d>
double Manicore::dCell_map< dimension, d >::evaluate_poly_on_ref ( Eigen::Vector< double, d > const &  x,
size_t  i_pbasis,
int  r 
) const

Evaluate a scalar polynomial on the reference element.


Parameters
xLocation on the reference element
i_pbasisIndex of the polynomial to evaluate
rPolynomial basis

◆ evaluate_poly_pullback()

template<size_t dimension, size_t d>
double Manicore::dCell_map< dimension, d >::evaluate_poly_pullback ( size_t  rel_map_id,
Eigen::Vector< double, dimension > const &  x,
size_t  i_pbasis,
int  r 
) const

Evaluate the pullback of a scalar polynomial on the chart.

Parameters
rel_map_idRelative id of the chart to use
xLocation on the chart
i_pbasisIndex of the polynomial to evaluate
rPolynomial basis

◆ get_orientation()

template<size_t dimension, size_t d>
int Manicore::dCell_map< dimension, d >::get_orientation ( size_t  rel_map_id,
Eigen::Vector< double, dimension > const &  x,
Eigen::Matrix< double, dimension, d-1 > const &  pM 
) const

Return the relative orientation.

Given a point on the boundary x, it attempt to find which simplex of the reference element S contains x, then compute a outward normal vector subtracting the center of S to x. The outward normal is then compared with a basis of the tangent space of the boundary to get the orientation of the boundary.

Warning
This can fail in some corner case, for example when taking x to be a vertices, or if the internal tolerance differs too much from the scaling of the element.
Parameters
rel_map_idRelative id of the chart to use
xAny point on the boundary in the chart (avoid vertices)
pMMatrix of a vector basis of the tangent space of the boundary

◆ get_reference_elem()

template<size_t dimension, size_t d>
std::vector<Simplex<d> > const& Manicore::dCell_map< dimension, d >::get_reference_elem ( ) const
inline

Return the reference element as a collection of simplexes.

◆ is_flat()

template<size_t dimension, size_t d>
bool Manicore::dCell_map< dimension, d >::is_flat ( ) const
inline

Is the cell flat.

Only check that the cell was constructed with the flat constructor, does not check if the parametrization is flat

Member Data Documentation

◆ cell_dim

template<size_t dimension, size_t d>
constexpr size_t Manicore::dCell_map< dimension, d >::cell_dim = d
staticconstexpr

Dimension of the cell


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