HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
HHOSpace

Classes defining the HHO method (scalar and vector-valued) More...

Classes

class  HArDCore2D::HHOSpace
 Class definition: polynomial bases and operators. More...
 
struct  HArDCore2D::HHOSpace::CellBases
 Structure to store element bases. More...
 
struct  HArDCore2D::HHOSpace::EdgeBases
 Structure to store edge bases. More...
 
struct  HArDCore2D::HHOSpace::LocalOperators
 A structure to store local operators (gradient, potential, stabilisation) More...
 
class  HArDCore2D::VHHOSpace
 Class definition: polynomial bases and operators. More...
 
struct  HArDCore2D::VHHOSpace::CellBases
 Structure to store element bases. More...
 
struct  HArDCore2D::VHHOSpace::EdgeBases
 Structure to store edge bases. More...
 
struct  HArDCore2D::VHHOSpace::LocalOperators
 A structure to store local operators (gradient, potential, stabilisation) More...
 

Typedefs

typedef Family< MonomialScalarBasisCellHArDCore2D::HHOSpace::PolyBasisCellType
 
typedef TensorizedVectorFamily< PolyBasisCellType, dimspaceHArDCore2D::HHOSpace::PolydBasisCellType
 
typedef Family< MonomialScalarBasisEdgeHArDCore2D::HHOSpace::PolyBasisEdgeType
 
typedef std::function< double(const VectorRd &)> HArDCore2D::HHOSpace::FunctionType
 
typedef Cell HArDCore2D::HHOSpace::CellBases::GeometricSupport
 Geometric support.
 
typedef Edge HArDCore2D::HHOSpace::EdgeBases::GeometricSupport
 Geometric support.
 
typedef std::function< bool(const Cell &)> HArDCore2D::CellSelection
 
typedef Family< MonomialScalarBasisCellHArDCore2D::VHHOSpace::PolyBasisCellType
 
typedef TensorizedVectorFamily< PolyBasisCellType, dimspaceHArDCore2D::VHHOSpace::PolydBasisCellType
 
typedef MatrixFamily< PolyBasisCellType, dimspaceHArDCore2D::VHHOSpace::PolydxdBasisCellType
 
typedef Family< PolydxdBasisCellTypeHArDCore2D::VHHOSpace::PolySymdxdBasisCellType
 
typedef Family< MonomialScalarBasisEdgeHArDCore2D::VHHOSpace::PolyBasisEdgeType
 
typedef Family< TensorizedVectorFamily< PolyBasisEdgeType, dimspace > > HArDCore2D::VHHOSpace::PolydBasisEdgeType
 
typedef std::function< VectorRd(const VectorRd &)> HArDCore2D::VHHOSpace::FunctionType
 
typedef std::function< MatrixRd(const VectorRd &)> HArDCore2D::VHHOSpace::GradientType
 
typedef Cell HArDCore2D::VHHOSpace::CellBases::GeometricSupport
 Geometric support.
 
typedef Edge HArDCore2D::VHHOSpace::EdgeBases::GeometricSupport
 Geometric support.
 

Functions

 HArDCore2D::HHOSpace::LocalOperators::LocalOperators (const Eigen::MatrixXd &_gradient, const Eigen::MatrixXd &_potential, const Eigen::MatrixXd &_stabilisation)
 
 HArDCore2D::HHOSpace::HHOSpace (const Mesh &mesh, size_t K, bool use_threads=true, std::ostream &output=std::cout)
 Constructor.
 
const MeshHArDCore2D::HHOSpace::mesh () const
 Return a const reference to the mesh.
 
const size_t & HArDCore2D::HHOSpace::degree () const
 Return the polynomial degree (common edge and elements)
 
Eigen::VectorXd HArDCore2D::HHOSpace::interpolate (const FunctionType &q, const int doe_cell=-1, const int doe_edge=-1) const
 Interpolator of a continuous function.
 
const CellBasesHArDCore2D::HHOSpace::cellBases (size_t iT) const
 Return cell bases for element iT.
 
const CellBasesHArDCore2D::HHOSpace::cellBases (const Cell &T) const
 Return cell bases for cell T.
 
const EdgeBasesHArDCore2D::HHOSpace::edgeBases (size_t iE) const
 Return edge bases for edge iE.
 
const EdgeBasesHArDCore2D::HHOSpace::edgeBases (const Edge &E) const
 Return cell bases for edge E.
 
const LocalOperatorsHArDCore2D::HHOSpace::operators (size_t iT) const
 Return operators for the cell of index iT.
 
const LocalOperatorsHArDCore2D::HHOSpace::operators (const Cell &T) const
 Return cell operators for cell T.
 
std::vector< std::pair< double, double > > HArDCore2D::HHOSpace::computeNorms (const std::vector< Eigen::VectorXd > &list_dofs) const
 Computes the discrete L2 (cell unknowns only) and H1 norms of a list of vectors.
 
Eigen::VectorXd HArDCore2D::HHOSpace::computeVertexValues (const Eigen::VectorXd &u) const
 Computes the values of the potential reconstruction at the mesh vertices.
 
 HArDCore2D::VHHOSpace::LocalOperators::LocalOperators (const Eigen::MatrixXd &_gradient, const Eigen::MatrixXd &_symmetric_gradient, const Eigen::MatrixXd &_potential, const Eigen::MatrixXd &_potential_sym, const Eigen::MatrixXd &_stabilisation, const Eigen::MatrixXd &_difference)
 
 HArDCore2D::VHHOSpace::VHHOSpace (const Mesh &mesh, size_t K, const CellSelection &BoundaryStab, bool use_threads=true, std::ostream &output=std::cout)
 Constructor (with function to select cells in which boundary faces are used in the stabilisation)
 
 HArDCore2D::VHHOSpace::VHHOSpace (const Mesh &mesh, size_t K, bool use_threads=true, std::ostream &output=std::cout)
 Overloaded constructor when the selection of boundary stabilisation is not entered (all boundary faces are then used)
 
const MeshHArDCore2D::VHHOSpace::mesh () const
 Return a const reference to the mesh.
 
const size_t & HArDCore2D::VHHOSpace::degree () const
 Return the polynomial degree (common face and elements)
 
const CellSelectionHArDCore2D::VHHOSpace::boundaryStab () const
 Return the function to select the cells with boundary stabilisation.
 
Eigen::VectorXd HArDCore2D::VHHOSpace::interpolate (const FunctionType &q, const int doe_cell=-1, const int doe_face=-1) const
 Interpolator of a continuous function.
 
Eigen::VectorXd HArDCore2D::VHHOSpace::local_interpolate (size_t iT, const FunctionType &q, const int doe_cell=-1, const int doe_face=-1) const
 Local Interpolator of a continuous function on the element iT.
 
Eigen::VectorXd HArDCore2D::VHHOSpace::components (size_t iT, const FunctionType &q, const int doe=-1) const
 Discrete components of continuous function in [P^k(T)]^d TODO more general function, with as input the basis space.
 
Eigen::VectorXd HArDCore2D::VHHOSpace::components (size_t iT, const GradientType &q, const int doe=-1) const
 Discrete components of continuous function in [P^k(T;Symm)]^dxd TODO more general function, with as input the basis space.
 
const CellBasesHArDCore2D::VHHOSpace::cellBases (size_t iT) const
 Return cell bases for element iT.
 
const CellBasesHArDCore2D::VHHOSpace::cellBases (const Cell &T) const
 Return cell bases for cell T.
 
const EdgeBasesHArDCore2D::VHHOSpace::edgeBases (size_t iE) const
 Return edge bases for edge iE.
 
const EdgeBasesHArDCore2D::VHHOSpace::edgeBases (const Edge &E) const
 Return cell bases for edge E.
 
const LocalOperatorsHArDCore2D::VHHOSpace::operators (size_t iT) const
 Return operators for the cell of index iT.
 
const LocalOperatorsHArDCore2D::VHHOSpace::operators (const Cell &T) const
 Return cell operators for cell T.
 
std::vector< std::pair< double, double > > HArDCore2D::VHHOSpace::computeNorms (const std::vector< Eigen::VectorXd > &list_dofs) const
 Computes the discrete L2 (cell unknowns only) and H1 norms of a list of vectors.
 
std::vector< Eigen::VectorXd > HArDCore2D::VHHOSpace::computeVertexValues (const Eigen::VectorXd &u) const
 

Variables

std::unique_ptr< PolyBasisCellTypeHArDCore2D::HHOSpace::CellBases::Polykpo
 
std::unique_ptr< PolyBasisCellTypeHArDCore2D::HHOSpace::CellBases::Polyk
 
std::unique_ptr< PolydBasisCellTypeHArDCore2D::HHOSpace::CellBases::Polykd
 
std::unique_ptr< PolyBasisEdgeTypeHArDCore2D::HHOSpace::EdgeBases::Polyk
 
Eigen::MatrixXd HArDCore2D::HHOSpace::LocalOperators::gradient
 
Eigen::MatrixXd HArDCore2D::HHOSpace::LocalOperators::potential
 
Eigen::MatrixXd HArDCore2D::HHOSpace::LocalOperators::stabilisation
 
static const CellSelection HArDCore2D::allcells = [](const Cell &)->bool {return true;}
 
std::unique_ptr< PolyBasisCellTypeHArDCore2D::VHHOSpace::CellBases::Polykpo
 
std::unique_ptr< PolyBasisCellTypeHArDCore2D::VHHOSpace::CellBases::Polyk
 
std::unique_ptr< PolydBasisCellTypeHArDCore2D::VHHOSpace::CellBases::Polykpod
 
std::unique_ptr< PolydBasisCellTypeHArDCore2D::VHHOSpace::CellBases::Polykd
 
std::unique_ptr< PolydxdBasisCellTypeHArDCore2D::VHHOSpace::CellBases::Polykdxd
 
std::unique_ptr< PolySymdxdBasisCellTypeHArDCore2D::VHHOSpace::CellBases::PolySymkdxd
 
std::unique_ptr< PolyBasisEdgeTypeHArDCore2D::VHHOSpace::EdgeBases::Polyk
 
std::unique_ptr< PolydBasisEdgeTypeHArDCore2D::VHHOSpace::EdgeBases::Polykd
 
Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::gradient
 
Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::symmetric_gradient
 
Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::potential
 
Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::potential_sym
 
Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::stabilisation
 
Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::difference
 

Detailed Description

Classes defining the HHO method (scalar and vector-valued)

Typedef Documentation

◆ CellSelection

typedef std::function<bool(const Cell &)> HArDCore2D::CellSelection

◆ FunctionType [1/2]

typedef std::function<double(const VectorRd &)> HArDCore2D::HHOSpace::FunctionType

◆ FunctionType [2/2]

typedef std::function<VectorRd(const VectorRd &)> HArDCore2D::VHHOSpace::FunctionType

◆ GeometricSupport [1/4]

Geometric support.

◆ GeometricSupport [2/4]

Geometric support.

◆ GeometricSupport [3/4]

Geometric support.

◆ GeometricSupport [4/4]

Geometric support.

◆ GradientType

typedef std::function<MatrixRd(const VectorRd &)> HArDCore2D::VHHOSpace::GradientType

◆ PolyBasisCellType [1/2]

◆ PolyBasisCellType [2/2]

◆ PolyBasisEdgeType [1/2]

◆ PolyBasisEdgeType [2/2]

◆ PolydBasisCellType [1/2]

◆ PolydBasisCellType [2/2]

◆ PolydBasisEdgeType

◆ PolydxdBasisCellType

◆ PolySymdxdBasisCellType

Function Documentation

◆ boundaryStab()

const CellSelection & HArDCore2D::VHHOSpace::boundaryStab ( ) const
inline

Return the function to select the cells with boundary stabilisation.

◆ cellBases() [1/4]

const CellBases & HArDCore2D::HHOSpace::cellBases ( const Cell &  T) const
inline

Return cell bases for cell T.

◆ cellBases() [2/4]

const CellBases & HArDCore2D::VHHOSpace::cellBases ( const Cell &  T) const
inline

Return cell bases for cell T.

◆ cellBases() [3/4]

const CellBases & HArDCore2D::HHOSpace::cellBases ( size_t  iT) const
inline

Return cell bases for element iT.

◆ cellBases() [4/4]

const CellBases & HArDCore2D::VHHOSpace::cellBases ( size_t  iT) const
inline

Return cell bases for element iT.

◆ components() [1/2]

Eigen::VectorXd VHHOSpace::components ( size_t  iT,
const FunctionType q,
const int  doe = -1 
) const

Discrete components of continuous function in [P^k(T)]^d TODO more general function, with as input the basis space.

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

◆ components() [2/2]

Eigen::VectorXd VHHOSpace::components ( size_t  iT,
const GradientType q,
const int  doe = -1 
) const

Discrete components of continuous function in [P^k(T;Symm)]^dxd TODO more general function, with as input the basis space.

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

◆ computeNorms() [1/2]

std::vector< std::pair< double, double > > HHOSpace::computeNorms ( const std::vector< Eigen::VectorXd > &  list_dofs) const

Computes the discrete L2 (cell unknowns only) and H1 norms of a list of vectors.

Parameters
list_dofsThe list of vectors representing the dofs

◆ computeNorms() [2/2]

std::vector< std::pair< double, double > > VHHOSpace::computeNorms ( const std::vector< Eigen::VectorXd > &  list_dofs) const

Computes the discrete L2 (cell unknowns only) and H1 norms of a list of vectors.

Parameters
list_dofsThe list of vectors representing the dofs

◆ computeVertexValues() [1/2]

Eigen::VectorXd HHOSpace::computeVertexValues ( const Eigen::VectorXd &  u) const

Computes the values of the potential reconstruction at the mesh vertices.

Parameters
uDOFs in the discrete space

◆ computeVertexValues() [2/2]

std::vector< Eigen::VectorXd > VHHOSpace::computeVertexValues ( const Eigen::VectorXd &  u) const

Computes the values of the potential reconstruction at the mesh vertices and stores them in a way that is compatible with vtu_writer

Parameters
uDOFs in the discrete space

◆ degree() [1/2]

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

Return the polynomial degree (common edge and elements)

◆ degree() [2/2]

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

Return the polynomial degree (common face and elements)

◆ edgeBases() [1/4]

const EdgeBases & HArDCore2D::HHOSpace::edgeBases ( const Edge &  E) const
inline

Return cell bases for edge E.

◆ edgeBases() [2/4]

const EdgeBases & HArDCore2D::VHHOSpace::edgeBases ( const Edge &  E) const
inline

Return cell bases for edge E.

◆ edgeBases() [3/4]

const EdgeBases & HArDCore2D::HHOSpace::edgeBases ( size_t  iE) const
inline

Return edge bases for edge iE.

◆ edgeBases() [4/4]

const EdgeBases & HArDCore2D::VHHOSpace::edgeBases ( size_t  iE) const
inline

Return edge bases for edge iE.

◆ HHOSpace()

HHOSpace::HHOSpace ( const Mesh mesh,
size_t  K,
bool  use_threads = true,
std::ostream &  output = std::cout 
)

Constructor.

◆ interpolate() [1/2]

Eigen::VectorXd HHOSpace::interpolate ( const FunctionType q,
const int  doe_cell = -1,
const int  doe_edge = -1 
) const

Interpolator of a continuous function.

Parameters
qThe function to interpolate
doe_cellThe optional degre of cell quadrature rules to compute the interpolate. If negative, then 2*degree()+3 will be used.
doe_edgeThe optional degre of edge quadrature rules to compute the interpolate. If negative, then 2*degree()+3 will be used.

◆ interpolate() [2/2]

Eigen::VectorXd VHHOSpace::interpolate ( const FunctionType q,
const int  doe_cell = -1,
const int  doe_face = -1 
) const

Interpolator of a continuous function.

Parameters
qThe function to interpolate
doe_cellThe optional degre of cell quadrature rules to compute the interpolate. If negative, then 2*degree()+3 will be used.
doe_faceThe optional degre of face quadrature rules to compute the interpolate. If negative, then 2*degree()+3 will be used.

◆ local_interpolate()

Eigen::VectorXd VHHOSpace::local_interpolate ( size_t  iT,
const FunctionType q,
const int  doe_cell = -1,
const int  doe_face = -1 
) const

Local Interpolator of a continuous function on the element iT.

Parameters
iTThe element of the local interpolator
qThe function to interpolate
doe_cellThe optional degre of cell quadrature rules to compute the interpolate. If negative, then 2*degree()+3 will be used.
doe_faceThe optional degre of face quadrature rules to compute the interpolate. If negative, then 2*degree()+3 will be used.

◆ LocalOperators() [1/2]

HArDCore2D::HHOSpace::LocalOperators::LocalOperators ( const Eigen::MatrixXd &  _gradient,
const Eigen::MatrixXd &  _potential,
const Eigen::MatrixXd &  _stabilisation 
)
inline
Parameters
_gradientGradient operator
_potentialPotential operator
_stabilisationStabilisation bilinear form

◆ LocalOperators() [2/2]

HArDCore2D::VHHOSpace::LocalOperators::LocalOperators ( const Eigen::MatrixXd &  _gradient,
const Eigen::MatrixXd &  _symmetric_gradient,
const Eigen::MatrixXd &  _potential,
const Eigen::MatrixXd &  _potential_sym,
const Eigen::MatrixXd &  _stabilisation,
const Eigen::MatrixXd &  _difference 
)
inline
Parameters
_gradientGradient operator
_symmetric_gradientSymmetric Gradient
_potentialHHO Potential operator
_stabilisationH1 Stabilisation bilinear form associated to the HHO potential

◆ mesh() [1/2]

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

Return a const reference to the mesh.

◆ mesh() [2/2]

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

Return a const reference to the mesh.

◆ operators() [1/4]

const LocalOperators & HArDCore2D::HHOSpace::operators ( const Cell &  T) const
inline

Return cell operators for cell T.

◆ operators() [2/4]

const LocalOperators & HArDCore2D::VHHOSpace::operators ( const Cell &  T) const
inline

Return cell operators for cell T.

◆ operators() [3/4]

const LocalOperators & HArDCore2D::HHOSpace::operators ( size_t  iT) const
inline

Return operators for the cell of index iT.

◆ operators() [4/4]

const LocalOperators & HArDCore2D::VHHOSpace::operators ( size_t  iT) const
inline

Return operators for the cell of index iT.

◆ VHHOSpace() [1/2]

HArDCore2D::VHHOSpace::VHHOSpace ( const Mesh mesh,
size_t  K,
bool  use_threads = true,
std::ostream &  output = std::cout 
)
inline

Overloaded constructor when the selection of boundary stabilisation is not entered (all boundary faces are then used)

◆ VHHOSpace() [2/2]

VHHOSpace::VHHOSpace ( const Mesh mesh,
size_t  K,
const CellSelection BoundaryStab,
bool  use_threads = true,
std::ostream &  output = std::cout 
)

Constructor (with function to select cells in which boundary faces are used in the stabilisation)

Variable Documentation

◆ allcells

const CellSelection HArDCore2D::allcells = [](const Cell &)->bool {return true;}
static

◆ difference

Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::difference

◆ gradient [1/2]

Eigen::MatrixXd HArDCore2D::HHOSpace::LocalOperators::gradient

◆ gradient [2/2]

Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::gradient

◆ Polyk [1/4]

std::unique_ptr<PolyBasisCellType> HArDCore2D::HHOSpace::CellBases::Polyk

◆ Polyk [2/4]

std::unique_ptr<PolyBasisEdgeType> HArDCore2D::HHOSpace::EdgeBases::Polyk

◆ Polyk [3/4]

std::unique_ptr<PolyBasisCellType> HArDCore2D::VHHOSpace::CellBases::Polyk

◆ Polyk [4/4]

std::unique_ptr<PolyBasisEdgeType> HArDCore2D::VHHOSpace::EdgeBases::Polyk

◆ Polykd [1/3]

std::unique_ptr<PolydBasisCellType> HArDCore2D::HHOSpace::CellBases::Polykd

◆ Polykd [2/3]

std::unique_ptr<PolydBasisCellType> HArDCore2D::VHHOSpace::CellBases::Polykd

◆ Polykd [3/3]

std::unique_ptr<PolydBasisEdgeType> HArDCore2D::VHHOSpace::EdgeBases::Polykd

◆ Polykdxd

std::unique_ptr<PolydxdBasisCellType> HArDCore2D::VHHOSpace::CellBases::Polykdxd

◆ Polykpo [1/2]

std::unique_ptr<PolyBasisCellType> HArDCore2D::HHOSpace::CellBases::Polykpo

◆ Polykpo [2/2]

std::unique_ptr<PolyBasisCellType> HArDCore2D::VHHOSpace::CellBases::Polykpo

◆ Polykpod

std::unique_ptr<PolydBasisCellType> HArDCore2D::VHHOSpace::CellBases::Polykpod

◆ PolySymkdxd

std::unique_ptr<PolySymdxdBasisCellType> HArDCore2D::VHHOSpace::CellBases::PolySymkdxd

◆ potential [1/2]

Eigen::MatrixXd HArDCore2D::HHOSpace::LocalOperators::potential

◆ potential [2/2]

Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::potential

◆ potential_sym

Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::potential_sym

◆ stabilisation [1/2]

Eigen::MatrixXd HArDCore2D::HHOSpace::LocalOperators::stabilisation

◆ stabilisation [2/2]

Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::stabilisation

◆ symmetric_gradient

Eigen::MatrixXd HArDCore2D::VHHOSpace::LocalOperators::symmetric_gradient