HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
|
#include <hybridcore.hpp>
Public Types | |
typedef Family< MonomialScalarBasisCell > | PolyCellBasisType |
type for cell basis | |
typedef Family< MonomialScalarBasisEdge > | PolyEdgeBasisType |
type for edge basis | |
Public Member Functions | |
HybridCore (const Mesh *mesh_ptr, const int cell_deg, const size_t edge_deg, const bool use_threads=true, std::ostream &output=std::cout, const bool ortho=true) | |
Class constructor: initialises the data structure with the given mesh, and desired polynomial degrees of the basis functions. | |
const Mesh * | get_mesh () const |
Returns a pointer to the mesh. | |
const int | CellDegree () const |
Return the degree of cell polynomials. | |
const int | CellDegreePos () const |
const size_t | EdgeDegree () const |
Return the degree of edge polynomials. | |
const PolyCellBasisType & | CellBasis (size_t iT) const |
Return cell basis for element with global index iT. | |
const PolyEdgeBasisType & | EdgeBasis (size_t iE) const |
Return edge basis for edge with global index iE. | |
double | L2norm (const UVector &Xh) const |
Compute L2 norm of a discrete function (using cell values) | |
double | H1norm (const UVector &Xh) const |
Compute discrete H1 norm of a discrete function. | |
template<typename ContinuousFunction > | |
UVector | interpolate (const ContinuousFunction &f, const int deg_cell, const size_t deg_edge, size_t doe) const |
Compute the interpolant in the discrete space of a continuous function. | |
Eigen::VectorXd | compute_weights (size_t iT) const |
Computes the weights to get cell values from edge values when l=-1. | |
double | evaluate_in_cell (const UVector Xh, size_t iT, VectorRd x) const |
Evaluates a discrete function in the cell iT at point x. | |
double | evaluate_in_edge (const UVector Xh, size_t iE, VectorRd x) const |
Evaluates a discrete function on the edge iE at point x. | |
Eigen::VectorXd | VertexValues (const UVector Xh, const std::string from_dofs) |
From a hybrid function, computes a vector of values at the vertices of the mesh. | |
The HybridCore class provides an interface for generating polynomial basis functions on cell and edges, interpolation of continuous functions, discrete norms of vectors of coefficients, and methods to evaluate discrete functions (given by vectors of coefficients) in the cells, on the edges, or at vertices (averaged of cell or edge values)
The current implementation has the following behaviours/expectations: