HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
|
Vector version of sXgrad, the arbitrary order space with nodal primal unknowns. More...
#include <vsxgrad.hpp>
Classes | |
struct | CellBases |
struct | EdgeBases |
struct | LocalOperators |
Public Types | |
typedef std::function< Eigen::Vector2d(const Eigen::Vector2d &)> | FunctionType |
typedef Family< MonomialScalarBasisCell > | PolyBasisCellType |
typedef TensorizedVectorFamily< DDRCore::PolyBasisCellType, dimspace > | Poly2BasisCellType |
typedef MatrixFamily< DDRCore::PolyBasisCellType, dimspace > | Poly2x2BasisCellType |
typedef Family< MonomialScalarBasisEdge > | PolyBasisEdgeType |
typedef TensorizedVectorFamily< DDRCore::PolyBasisEdgeType, dimspace > | Poly2BasisEdgeType |
Public Member Functions | |
VSXGrad (const DDRCore &ddr_core, const SerendipityProblem &sp, bool use_threads=true, std::ostream &output=std::cout) | |
Constructor. | |
const Mesh & | mesh () const |
Return the mesh. | |
const SXGrad & | sXgrad () const |
Return the underlying sXgrad space. | |
const size_t & | degree () const |
Return the polynomial degree. | |
Eigen::VectorXd | interpolate (const FunctionType &q, const int doe_cell=-1) const |
Interpolator of a continuous function. | |
auto | PolykE (size_t iE) const -> const PolyBasisEdgeType & |
auto | PolykpoE (size_t iE) const -> const PolyBasisEdgeType & |
auto | PolykptwoE (size_t iE) const -> const PolyBasisEdgeType & |
auto | Polykpo (size_t iT) const -> const PolyBasisCellType & |
auto | Polykmo (size_t iT) const -> const PolyBasisCellType & |
auto | Polyk (size_t iT) const -> const PolyBasisCellType & |
auto | Polykptwo (size_t iT) const -> const PolyBasisCellType & |
auto | Polyk2 (size_t iT) const -> const Poly2BasisCellType & |
const Eigen::MatrixXd | edgeGradient (size_t iE) const |
Return the gradient operator (expressed on Polyk3) on the edge of index iE. | |
const Eigen::MatrixXd | edgeGradient (const Edge &E) const |
Return the gradient operator (expressed on Polyk3) on edge E. | |
const Eigen::MatrixXd | edgePotential (size_t iE) const |
Return the potential operator (expressed on Polykpo3) on the edge of index iE. | |
const Eigen::MatrixXd | edgePotential (const Edge &E) const |
Return the potential operator (expressed on Polykpo3) on edge E. | |
const Eigen::MatrixXd | cellGradient (size_t iT) const |
Return the gradient operator (expressed on Polyk3x3) on the cell of index iT. | |
const Eigen::MatrixXd | cellGradient (const Cell &T) const |
Return the gradient operator (expressed on Polyk3x3) on cell T. | |
const Eigen::MatrixXd | cellSymGradient (size_t iT) const |
Return the symmetric gradient operator (expressed on Polyk3x3) on the cell of index iT. | |
const Eigen::MatrixXd | cellSymGradient (const Cell &T) const |
Return the symmetric gradient operator (expressed on Polyk3x3) on cell T. | |
const Eigen::MatrixXd | cellDivergence (size_t iT) const |
Return the divergence operator (expressed on the ancester of Polyk3x3, which should be m_sxgrad.cellBases(iT).Polyk) on the cell of index iT. | |
const Eigen::MatrixXd | cellDivergence (const Cell &T) const |
Return the divergence operator (expressed on the ancester of Polyk3x3, which should be m_sxgrad.cellBases(iT).Polyk) on the cell of index iT. | |
const Eigen::MatrixXd | cellPotential (size_t iT) const |
Return the potential operator (expressed on Polykpo3) on the cell of index iT. | |
const Eigen::MatrixXd | cellPotential (const Cell &T) const |
Return the potential operator on cell T. | |
Eigen::MatrixXd | _permute_bases (size_t iT) |
Eigen::MatrixXd | computeStabilisation (const size_t iT, const IntegralWeight &weight=IntegralWeight(1.)) const |
Compute the H^1-stabilisation (based on the L^2 stabilisation implemented in SXgrad) | |
std::vector< double > | computeH1norms (const std::vector< Eigen::VectorXd > &list_dofs, const std::string typegrad="full") const |
Compute the H^1 discrete norm, with full or symmetric gradient. | |
std::vector< VectorRd > | computeVertexValues (const Eigen::VectorXd &u) const |
Computes the values of the potential reconstruction at the mesh vertices. | |
const CellBases & | cellBases (size_t iT) const |
Return vector/matrix cell bases for the face of index iT. | |
const CellBases & | cellBases (const Cell &T) const |
Return vector/matrix cell bases for cell T. | |
const EdgeBases & | edgeBases (size_t iE) const |
Return edge bases for the edge of index iE. | |
const EdgeBases & | edgeBases (const Edge &E) const |
Return edge bases for edge E. | |
const LocalOperators & | cellOperators (size_t iT) const |
Return cell operators for the cell of index iT. | |
const LocalOperators & | cellOperators (const Cell &T) const |
Return cell operators for cell T. | |
![]() | |
VariableDOFSpace (const Mesh &mesh, const Eigen::VectorXd n_local_vertex_dofs, const Eigen::VectorXd n_local_edge_dofs, const Eigen::VectorXd n_local_cell_dofs) | |
Constructor. | |
VariableDOFSpace (const Mesh &mesh, size_t n_local_vertex_dofs, const Eigen::VectorXd n_local_edge_dofs, const Eigen::VectorXd n_local_cell_dofs) | |
Simpler constructor if all vertices have the same number of DOFs. | |
VariableDOFSpace (const Mesh &mesh, size_t n_local_vertex_dofs, size_t n_local_edge_dofs, const Eigen::VectorXd n_local_cell_dofs) | |
Simpler constructor if all vertices/edges have the same number of DOFs. | |
VariableDOFSpace (const Mesh &mesh, size_t n_local_vertex_dofs, size_t n_local_edge_dofs, size_t n_local_cell_dofs) | |
Simpler constructor if all vertices/edges/cells have the same number of DOFs. | |
const Mesh & | mesh () const |
Returns the mesh. | |
size_t | numLocalDofsVertex (const size_t iV) const |
Returns the number of local DOFs on vertex of index iV. | |
size_t | numLocalDofsVertex (const Vertex &V) const |
Returns the number of local DOFs on vertex V. | |
size_t | numLocalDofsEdge (const size_t iE) const |
Returns the number of local DOFs on edge of index iE. | |
size_t | numLocalDofsEdge (const Edge &E) const |
Returns the number of local DOFs on edge E. | |
size_t | numLocalDofsCell (const size_t iT) const |
Returns the number of local DOFs on cell of index iT. | |
size_t | numLocalDofsCell (const Cell &T) const |
Returns the number of local DOFs on cell T. | |
size_t | nDOFs_vertices () const |
Total number of vertices DOFs. | |
size_t | nDOFs_edges () const |
Total number of edges DOFs. | |
size_t | nDOFs_cells () const |
Total number of cells DOFs. | |
size_t | dimension () const |
Returns the dimension of the global space (all DOFs for all geometric entities) | |
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 | 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 | 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. | |
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, edges and faces) 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_t > | globalDOFIndices (const Cell &T) const |
Returns a vector listing the global DOFs attached to the element T: vertex DOFs, edge DOFs, face DOFs and element DOFs. | |
std::vector< size_t > | globalDOFIndices (const Edge &E) const |
Returns a vector listing the global DOFs attached to the edge E: vertex DOFs, edge DOFs,. | |
Vector version of sXgrad, the arbitrary order space with nodal primal unknowns.
This space is built by tensorizing R^d with the sXgrad space. With \(\phi=(\phi_i)_i\) the basis of sXgrad (local or global) and \(e=(e_j)_j\) the canonical basis of \(R^3\) then the basis of
vsXgrad is \(e\otimes\phi=(e_1\phi_1,e_2\phi_1,e_3\phi_1,e_1\phi_2,\ldots)\).
Given the ordering of DOFs in sXgrad, this ensures that we first list the DOFs for each vertex one by one, then the DOFs for each edge one by one, etc. Tensorising the other way means that the DOFs attached, say, to one vertex would be scrambled with DOFs attached to edges, etc.
The class provides the matrices of the potentials (on edges, faces and cells) as well as the gradient (on the edges and cells) and symmetric gradient (in cells). The bases of the co-domain for these operators are those in Edge/Face/CellBases provided by this class (see the types provided by this class). We do not provide the face gradients as we do not, at the moment, have a suitable basis for this one (it would require a "MatrixFamily" for 2x3 non-square matrices).