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

Convert between local and global data. More...

#include <dofspace.hpp>

Public Member Functions

 DOFSpace ()
 Empty space. More...
 
 DOFSpace (Mesh< dimension > const *mesh, std::array< size_t, dimension+1 > nb_local_dof)
 
size_t numLocalDofs (size_t d) const
 Return the number of Degree Of Freedoms on a d-cell. More...
 
size_t dimensionMesh () const
 Return the total number of Degree Of Freedoms. More...
 
size_t dimensionCell (size_t d, size_t i_cell) const
 Return the number of Degree Of Freedoms of the unknown attached the i-th cell of dimension d (including its boundary). More...
 
size_t localOffset (size_t d, size_t i_cell) const
 Return the local offset of the unknown attached the i-th cell of dimension d. More...
 
size_t localOffset (size_t d_boundary, size_t d, size_t i_bd_rel, size_t i_cell) const
 Return the local offset of the unknown attached the i_bd_rel-th cell of dimension d_boundary with respect to the i_cell-th cell of dimension d. More...
 
size_t globalOffset (size_t d, size_t i_cell) const
 Return the global offset of the unknown attached the i-th cell of dimension d. More...
 
Eigen::VectorXd restrict (size_t d, size_t i_cell, const Eigen::VectorXd &vh) const
 Restrict the vector vh to the i-th cell of dimension d (including its boundary). More...
 
Eigen::MatrixXd extendOperator (size_t d_boundary, size_t d, size_t i_bd_global, size_t i_cell, const Eigen::MatrixXd &op) const
 Extend operator op from a cell on the boundary to the i_cell-th cell. More...
 

Detailed Description

template<size_t dimension>
class Manicore::DOFSpace< dimension >

Convert between local and global data.

Template Parameters
dimensionDimension of the manifold
Warning
This does not take ownership of the mesh but keep a pointer of it. Ensure that the mesh survives this class.

Constructor & Destructor Documentation

◆ DOFSpace() [1/2]

template<size_t dimension>
Manicore::DOFSpace< dimension >::DOFSpace ( )
inline

Empty space.

◆ DOFSpace() [2/2]

template<size_t dimension>
Manicore::DOFSpace< dimension >::DOFSpace ( Mesh< dimension > const *  mesh,
std::array< size_t, dimension+1 >  nb_local_dof 
)
inline
Warning
Ensure that the mesh survives this class
Parameters
meshMesh to use
nb_local_dofNumber of degree of freedom on cell of each dimension

Member Function Documentation

◆ dimensionCell()

template<size_t dimension>
size_t Manicore::DOFSpace< dimension >::dimensionCell ( size_t  d,
size_t  i_cell 
) const

Return the number of Degree Of Freedoms of the unknown attached the i-th cell of dimension d (including its boundary).

Parameters
dDimension of the cell
i_cellIndex of the cell

◆ dimensionMesh()

template<size_t dimension>
size_t Manicore::DOFSpace< dimension >::dimensionMesh

Return the total number of Degree Of Freedoms.

◆ extendOperator()

template<size_t dimension>
Eigen::MatrixXd DOFSpace::extendOperator ( size_t  d_boundary,
size_t  d,
size_t  i_bd_global,
size_t  i_cell,
const Eigen::MatrixXd &  op 
) const

Extend operator op from a cell on the boundary to the i_cell-th cell.

Returns
Matrix of size [ DOFSpace::dimensionCell (d,i_cell), n]
Parameters
d_boundaryDimension of the boundary cell
dDimension of the cell
i_bd_globalGlobal index of the boundary cell
i_cellIndex of the cell
opMatrix of size [ DOFSpace::dimensionCell (d_boundary,i_bd_global), n]

◆ globalOffset()

template<size_t dimension>
size_t Manicore::DOFSpace< dimension >::globalOffset ( size_t  d,
size_t  i_cell 
) const

Return the global offset of the unknown attached the i-th cell of dimension d.

Parameters
dDimension of the cell
i_cellIndex of the cell

◆ localOffset() [1/2]

template<size_t dimension>
size_t Manicore::DOFSpace< dimension >::localOffset ( size_t  d,
size_t  i_cell 
) const

Return the local offset of the unknown attached the i-th cell of dimension d.

Return the index of the first unknown attached to the cell itself, or equivalently, the number of unknown attached to the boundary of the cell

Parameters
dDimension of the cell
i_cellIndex of the cell

◆ localOffset() [2/2]

template<size_t dimension>
size_t Manicore::DOFSpace< dimension >::localOffset ( size_t  d_boundary,
size_t  d,
size_t  i_bd_rel,
size_t  i_cell 
) const

Return the local offset of the unknown attached the i_bd_rel-th cell of dimension d_boundary with respect to the i_cell-th cell of dimension d.

Example: localOffset (1,3,0,231) return the offset of the first edge (1-cell) of the 3-cell numbered 231 in the mesh

Parameters
d_boundaryDimension of the cell on the boundary
dDimension of the cell
i_bd_relRelative index of the boundary cell
i_cellIndex of the cell

◆ numLocalDofs()

template<size_t dimension>
size_t Manicore::DOFSpace< dimension >::numLocalDofs ( size_t  d) const
inline

Return the number of Degree Of Freedoms on a d-cell.

Parameters
dDimension of the cell

◆ restrict()

template<size_t dimension>
Eigen::VectorXd DOFSpace::restrict ( size_t  d,
size_t  i_cell,
const Eigen::VectorXd &  vh 
) const

Restrict the vector vh to the i-th cell of dimension d (including its boundary).

Returns
VectorXd of size DOFSpace::dimensionCell (d,i_cell)
Parameters
dDimension of the cell
i_cellIndex of the cell
vhVector of global degree of freedom of size DOFSpace::dimensionMesh

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