HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
HArDCore2D::XHess Class Reference

Discrete H2 space: local operators, L2 product and global interpolator. More...

#include <xhess.hpp>

Inheritance diagram for HArDCore2D::XHess:
Inheritance graph
[legend]
Collaboration diagram for HArDCore2D::XHess:
Collaboration graph
[legend]

Classes

struct  LocalOperators
 A structure to store local operators (gradient and potential) More...
 
struct  TransferOperators
 

Public Types

typedef std::function< double(const Eigen::Vector2d &)> FunctionType
 
typedef std::function< Eigen::Vector2d(const Eigen::Vector2d &)> GradFunctionType
 
typedef std::function< double(const Eigen::Vector2d &)> FunctionType
 
typedef std::function< Eigen::Vector2d(const Eigen::Vector2d &)> GradFunctionType
 

Public Member Functions

 XHess (const DDRCore &ddr_core, const SerendipityProblem &ser_pro, bool use_threads=true, std::ostream &output=std::cout)
 Constructor.
 
const Meshmesh () const
 Return the mesh.
 
const size_tdegree () const
 Return the polynomial degree.
 
Eigen::VectorXd interpolate (const FunctionType &q, const GradFunctionType &Dq, const int deg_quad=-1) const
 Interpolator of a continuous function.
 
const Eigen::MatrixXd & SgradCell (size_t iT) const
 Return the serendipity reconstruction for the cell of index iT.
 
const Eigen::MatrixXd & SgradCell (const Cell &T) const
 Return the serendipity reconstruction for cell T.
 
const TransferOperatorsTcellOperators (size_t iT) const
 Return cell operators for the cell of index iT.
 
const TransferOperatorsTcellOperators (const Cell &T) const
 Return cell operators for cell T.
 
const LocalOperatorsedgeOperators (size_t iE) const
 Return edge operators for the edge of index iE.
 
const LocalOperatorsedgeOperators (const Edge &E) const
 Return edge operators for edge E.
 
const LocalOperatorscellOperators (size_t iT) const
 Return cell operators for the cell of index iT.
 
const LocalOperatorscellOperators (const Cell &T) const
 Return cell operators for cell T.
 
const DDRCore::CellBasescellBases (size_t iT) const
 Return cell bases for the cell of index iT.
 
const DDRCore::CellBasescellBases (const Cell &T) const
 Return cell bases for cell T.
 
const DDRCore::EdgeBasesedgeBases (size_t iE) const
 Return edge bases for the edge of index iE.
 
const DDRCore::EdgeBasesedgeBases (const Edge &E) const
 Return edge bases for edge E.
 
Eigen::MatrixXd computeStabilisation (const size_t iT, const double &penalty_factor=1., const Eigen::MatrixXd &mass_Pkpo_T=Eigen::MatrixXd::Zero(1, 1), const IntegralWeight &weight=IntegralWeight(1.)) const
 Compute the matrix of the (weighted) L2-product for the cell of index iT.
 
Eigen::MatrixXd computeL2Product (const size_t iT, const double &penalty_factor=1., const Eigen::MatrixXd &mass_Pkpo_T=Eigen::MatrixXd::Zero(1, 1), const IntegralWeight &weight=IntegralWeight(1.)) const
 
Eigen::MatrixXd computeGradientFull (const size_t iT, const VSXGrad &vsx_grad) const
 
double evaluatePotential (const size_t iT, const Eigen::VectorXd &vT, const VectorRd &x) const
 Evaluate the value of the potential at a point x.
 
double computeL2Norm (const Eigen::VectorXd &v) const
 Compute the L2-norm of a vector of the space.
 
Eigen::MatrixXd SerExtension (size_t iT) const
 
 XHess (const DDRCore &ddr_core, const SerendipityProblem &ser_pro, bool use_threads=true, std::ostream &output=std::cout)
 Constructor.
 
const Meshmesh () const
 Return the mesh.
 
const size_tdegree () const
 Return the polynomial degree.
 
Eigen::VectorXd interpolate (const FunctionType &q, const GradFunctionType &Dq, const int deg_quad=-1) const
 Interpolator of a continuous function.
 
const Eigen::MatrixXd & SgradCell (size_t iT) const
 Return the serendipity reconstruction for the cell of index iT.
 
const Eigen::MatrixXd & SgradCell (const Cell &T) const
 Return the serendipity reconstruction for cell T.
 
const Eigen::MatrixXd & EgradCell (size_t iT) const
 
const Eigen::MatrixXd & EgradCell (const Cell &T) const
 Return the serendipity reconstruction for cell T.
 
const TransferOperatorsTcellOperators (size_t iT) const
 Return cell operators for the cell of index iT.
 
const TransferOperatorsTcellOperators (const Cell &T) const
 Return cell operators for cell T.
 
const LocalOperatorsedgeOperators (size_t iE) const
 Return edge operators for the edge of index iE.
 
const LocalOperatorsedgeOperators (const Edge &E) const
 Return edge operators for edge E.
 
const LocalOperatorscellOperators (size_t iT) const
 Return cell operators for the cell of index iT.
 
const LocalOperatorscellOperators (const Cell &T) const
 Return cell operators for cell T.
 
const DDRCore::CellBasescellBases (size_t iT) const
 Return cell bases for the cell of index iT.
 
const DDRCore::CellBasescellBases (const Cell &T) const
 Return cell bases for cell T.
 
const DDRCore::EdgeBasesedgeBases (size_t iE) const
 Return edge bases for the edge of index iE.
 
const DDRCore::EdgeBasesedgeBases (const Edge &E) const
 Return edge bases for edge E.
 
Eigen::MatrixXd computeStabilisation (const size_t iT, const double &penalty_factor=1., const Eigen::MatrixXd &mass_Pkpo_T=Eigen::MatrixXd::Zero(1, 1), const IntegralWeight &weight=IntegralWeight(1.)) const
 Compute the matrix of the (weighted) L2-product for the cell of index iT.
 
Eigen::MatrixXd computeL2Product (const size_t iT, const double &penalty_factor=1., const Eigen::MatrixXd &mass_Pkpo_T=Eigen::MatrixXd::Zero(1, 1), const IntegralWeight &weight=IntegralWeight(1.)) const
 
Eigen::MatrixXd computeGradientFull (const size_t iT, const VSXGrad &vsx_grad) const
 
Eigen::MatrixXd potential2 (const size_t iT, const VSXGrad &vsx_grad) const
 
double evaluatePotential (const size_t iT, const Eigen::VectorXd &vT, const VectorRd &x) const
 Evaluate the value of the potential at a point x.
 
double computeL2Norm (const Eigen::VectorXd &v) const
 Compute the L2-norm of a vector of the space.
 
- Public Member Functions inherited from HArDCore2D::GlobalDOFSpace
 GlobalDOFSpace (const Mesh &mesh, size_t n_local_vertex_dofs, size_t n_local_edge_dofs, size_t n_local_cell_dofs)
 Constructor.
 
size_t globalOffset (const Vertex &V) const
 Return the global offset for the unknowns on the vertex V.
 
size_t globalOffset (const Edge &E) const
 Return the global offset for the unknowns on the edge E.
 
size_t globalOffset (const Cell &T) const
 Return the global offset for the unknowns on the cell T.
 
Eigen::VectorXd restrictEdge (size_t iE, const Eigen::VectorXd &vh) const
 Restrict to the edge (including its vertices) of index iE.
 
Eigen::VectorXd restrictCell (size_t iT, const Eigen::VectorXd &vh) const
 Restrict to the cell (including vertices and edges) of index iT.
 
Eigen::VectorXd restrict (const Edge &E, const Eigen::VectorXd vh) const
 Restrict to an edge.
 
Eigen::VectorXd restrict (const Cell &T, const Eigen::VectorXd vh) const
 Restrict to a cell.
 
Eigen::MatrixXd extendOperator (const Cell &T, const Edge &E, const Eigen::MatrixXd &opE) const
 Extend an edge operator to a cell.
 
std::vector< size_tglobalDOFIndices (const Cell &T) const
 
void setLabelDOF (const size_t i, const int label)
 Set a label to the DOF number i (default label is -1)
 
int getLabelDOF (const size_t i)
 Get label of DOF number i.
 
- Public Member Functions inherited from HArDCore2D::LocalDOFSpace
 LocalDOFSpace (const Mesh &mesh, size_t n_local_vertex_dofs, size_t n_local_edge_dofs, size_t n_local_cell_dofs)
 Constructor.
 
const Meshmesh () const
 Returns the mesh.
 
size_t numLocalDofsVertex () const
 Returns the number of local vertex DOFs.
 
size_t numLocalDofsEdge () const
 Returns the number of local edge DOFs.
 
size_t numLocalDofsCell () const
 Returns the number of local cell DOFs.
 
size_t dimension () const
 Returns the dimension of the global space (all DOFs for all geometric entities)
 
size_t numTotalDofsVertices () const
 Returns the total number of vertex DOFs.
 
size_t numTotalDofsEdges () const
 Returns the total number of vertex DOFs.
 
size_t numTotalDofsCells () const
 Returns the total number of vertex DOFs.
 
size_t dimensionVertex (const Vertex &V) const
 Returns the dimension of the local space on the vertex V.
 
size_t dimensionVertex (size_t iV) const
 Returns the dimension of the local space on the vertex of index iV.
 
size_t dimensionEdge (const Edge &E) const
 Returns the dimension of the local space on the edge E (including vertices)
 
size_t dimensionEdge (size_t iE) const
 Returns the dimension of the local space on the edge of index iE (including vertices)
 
size_t dimensionCell (const Cell &T) const
 Returns the dimension of the local space on the cell T (including faces, edges and vertices)
 
size_t dimensionCellBoundary (const Cell &T) const
 Returns the dimension of the local space on the boundary of T.
 
size_t dimensionCell (size_t iT) const
 Returns the dimension of the local space on the cell of index iT (including faces, edges and vertices)
 
size_t dimensionCellBoundary (size_t iT) const
 Returns the dimension of the local space on the boundary of T.
 
size_t localOffset (const Edge &E, const Vertex &V) const
 Returns the local offset of the vertex V with respect to the edge E.
 
size_t localOffset (const Edge &E) const
 Returns the local offset of the unknowns attached to the edge E.
 
size_t localOffset (const Cell &T, const Vertex &V) const
 Returns the local offset of the vertex V with respect to the cell T.
 
size_t localOffset (const Cell &T, const Edge &E) const
 Returns the local offset of the edge E with respect to the cell T.
 
size_t localOffset (const Cell &T) const
 Returns the local offset of the unknowns attached to the element T.
 

Additional Inherited Members

- Protected Attributes inherited from HArDCore2D::LocalDOFSpace
const Meshm_mesh
 
size_t m_n_local_vertex_dofs
 
size_t m_n_local_edge_dofs
 
size_t m_n_local_cell_dofs
 

Detailed Description

Discrete H2 space: local operators, L2 product and global interpolator.

Constructor & Destructor Documentation

◆ XHess()

HArDCore2D::XHess::XHess ( const DDRCore ddr_core,
const SerendipityProblem ser_pro,
bool  use_threads = true,
std::ostream &  output = std::cout 
)

Constructor.

Member Function Documentation

◆ cellBases() [1/2]

const DDRCore::CellBases & HArDCore2D::XHess::cellBases ( const Cell &  T) const
inline

Return cell bases for cell T.

◆ cellBases() [2/2]

const DDRCore::CellBases & HArDCore2D::XHess::cellBases ( size_t  iT) const
inline

Return cell bases for the cell of index iT.

◆ cellOperators() [1/2]

const LocalOperators & HArDCore2D::XHess::cellOperators ( const Cell &  T) const
inline

Return cell operators for cell T.

◆ cellOperators() [2/2]

const LocalOperators & HArDCore2D::XHess::cellOperators ( size_t  iT) const
inline

Return cell operators for the cell of index iT.

◆ computeGradientFull()

Eigen::MatrixXd HArDCore2D::XHess::computeGradientFull ( const size_t  iT,
const VSXGrad vsx_grad 
) const
Parameters
iTindex of the cell

◆ computeL2Norm()

double HArDCore2D::XHess::computeL2Norm ( const Eigen::VectorXd &  v) const

Compute the L2-norm of a vector of the space.

◆ computeL2Product()

Eigen::MatrixXd HArDCore2D::XHess::computeL2Product ( const size_t  iT,
const double penalty_factor = 1.,
const Eigen::MatrixXd &  mass_Pkpo_T = Eigen::MatrixXd::Zero(1, 1),
const IntegralWeight weight = IntegralWeight(1.) 
) const
Parameters
iTindex of the cell
penalty_factorpre-factor for stabilisation term
mass_Pkpo_Tif pre-computed, the mass matrix of P^{k+1}(T); if none is pre-computed, passing Eigen::MatrixXd::Zero(1,1) will force the calculation
weightweight function in the L2 product, defaults to 1

◆ computeStabilisation()

Eigen::MatrixXd HArDCore2D::XHess::computeStabilisation ( const size_t  iT,
const double penalty_factor = 1.,
const Eigen::MatrixXd &  mass_Pkpo_T = Eigen::MatrixXd::Zero(1, 1),
const IntegralWeight weight = IntegralWeight(1.) 
) const

Compute the matrix of the (weighted) L2-product for the cell of index iT.

Parameters
iTindex of the cell
penalty_factorpre-factor for stabilisation term
mass_Pkpo_Tif pre-computed, the mass matrix of P^{k+1}(T); if none is pre-computed, passing Eigen::MatrixXd::Zero(1,1) will force the calculation
weightweight function in the L2 product, defaults to 1

◆ degree()

const size_t & HArDCore2D::XHess::degree ( ) const
inline

Return the polynomial degree.

◆ edgeBases() [1/2]

const DDRCore::EdgeBases & HArDCore2D::XHess::edgeBases ( const Edge &  E) const
inline

Return edge bases for edge E.

◆ edgeBases() [2/2]

const DDRCore::EdgeBases & HArDCore2D::XHess::edgeBases ( size_t  iE) const
inline

Return edge bases for the edge of index iE.

◆ edgeOperators() [1/2]

const LocalOperators & HArDCore2D::XHess::edgeOperators ( const Edge &  E) const
inline

Return edge operators for edge E.

◆ edgeOperators() [2/2]

const LocalOperators & HArDCore2D::XHess::edgeOperators ( size_t  iE) const
inline

Return edge operators for the edge of index iE.

◆ evaluatePotential()

double HArDCore2D::XHess::evaluatePotential ( const size_t  iT,
const Eigen::VectorXd &  vT,
const VectorRd x 
) const

Evaluate the value of the potential at a point x.

Parameters
iTindex of the cell in which to take the potential
vTvector of local DOFs
xpoint at which to evaluate the potential

◆ interpolate()

Eigen::VectorXd HArDCore2D::XHess::interpolate ( const FunctionType q,
const GradFunctionType Dq,
const int  deg_quad = -1 
) const

Interpolator of a continuous function.

Parameters
qThe function to interpolate
DqThe gradient of the function
deg_quadThe optional degre of quadrature rules to compute the interpolate. If negative, then 2*degree()+3 will be used.

◆ mesh()

const Mesh & HArDCore2D::XHess::mesh ( ) const
inline

Return the mesh.

◆ SgradCell() [1/2]

const Eigen::MatrixXd & HArDCore2D::XHess::SgradCell ( const Cell &  T) const
inline

Return the serendipity reconstruction for cell T.

◆ SgradCell() [2/2]

const Eigen::MatrixXd & HArDCore2D::XHess::SgradCell ( size_t  iT) const
inline

Return the serendipity reconstruction for the cell of index iT.

◆ TcellOperators() [1/2]

const TransferOperators & HArDCore2D::XHess::TcellOperators ( const Cell &  T) const
inline

Return cell operators for cell T.

◆ TcellOperators() [2/2]

const TransferOperators & HArDCore2D::XHess::TcellOperators ( size_t  iT) const
inline

Return cell operators for the cell of index iT.


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