20 class XHess :
public GlobalDOFSpace
43 struct TransferOperators
65 return m_ddr_core.
mesh();
71 return m_ddr_core.
degree();
86 return (*m_cell_transfer_operators[
iT]).serendipity;
90 inline const Eigen::MatrixXd &
SgradCell(
const Cell &
T)
const
97 return (*m_cell_transfer_operators[
iT]).extension;
101 inline const Eigen::MatrixXd &
EgradCell(
const Cell &
T)
const
109 return *m_cell_transfer_operators[
iT];
115 return *m_cell_transfer_operators[
T.global_index()];
121 return *m_edge_operators[
iE];
127 return *m_edge_operators[E.global_index()];
133 return *m_cell_operators[
iT];
139 return *m_cell_operators[
T.global_index()];
151 return m_ddr_core.
cellBases(
T.global_index());
163 return m_ddr_core.
edgeBases(E.global_index());
173 const Eigen::MatrixXd &
mass_Pkpo_T = Eigen::MatrixXd::Zero(1,1),
180 const Eigen::MatrixXd &
mass_Pkpo_T = Eigen::MatrixXd::Zero(1,1),
199 const Eigen::VectorXd &
vT,
207 Eigen::MatrixXd _compute_cell_serendipity_operator(
size_t iT);
208 Eigen::MatrixXd _compute_cell_extension_operator(
size_t iT)
const;
212 double _compute_squared_l2_norm(
size_t iT,
const Eigen::VectorXd &
vT)
const;
219 std::ostream & m_output;
222 std::vector<std::unique_ptr<LocalOperators> > m_edge_operators;
223 std::vector<std::unique_ptr<LocalOperators> > m_cell_operators;
226 std::vector<std::shared_ptr<TransferOperators> > m_cell_transfer_operators;
Construct all polynomial spaces for the DDR sequence.
Definition ddrcore.hpp:63
Discrete Serendipity Hgrad space: local operators, L2 product and global interpolator.
Definition sxgrad.hpp:20
Construct all polynomial spaces for the DDR sequence.
Definition serendipity_problem.hpp:20
Vector version of sXgrad, the arbitrary order space with nodal primal unknowns.
Definition vsxgrad.hpp:32
const LocalOperators & cellOperators(size_t iT) const
Return cell operators for the cell of index iT.
Definition xhess_full.hpp:131
const TransferOperators & TcellOperators(const Cell &T) const
Return cell operators for cell T.
Definition xhess_full.hpp:113
const size_t & degree() const
Return the polynomial degree.
Definition xhess_full.hpp:69
double evaluatePotential(const size_t iT, const Eigen::VectorXd &vT, const VectorRd &x) const
Evaluate the value of the potential at a point x.
const DDRCore::EdgeBases & edgeBases(const Edge &E) const
Return edge bases for edge E.
Definition xhess_full.hpp:161
Eigen::VectorXd interpolate(const FunctionType &q, const GradFunctionType &Dq, const int deg_quad=-1) const
Interpolator of a continuous function.
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.
const Eigen::MatrixXd & SgradCell(const Cell &T) const
Return the serendipity reconstruction for cell T.
Definition xhess_full.hpp:90
const LocalOperators & edgeOperators(const Edge &E) const
Return edge operators for edge E.
Definition xhess_full.hpp:125
const DDRCore::EdgeBases & edgeBases(size_t iE) const
Return edge bases for the edge of index iE.
Definition xhess_full.hpp:155
const DDRCore::CellBases & cellBases(const Cell &T) const
Return cell bases for cell T.
Definition xhess_full.hpp:149
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
const Eigen::MatrixXd & SgradCell(size_t iT) const
Return the serendipity reconstruction for the cell of index iT.
Definition xhess_full.hpp:84
const DDRCore::CellBases & cellBases(size_t iT) const
Return cell bases for the cell of index iT.
Definition xhess_full.hpp:143
const LocalOperators & cellOperators(const Cell &T) const
Return cell operators for cell T.
Definition xhess_full.hpp:137
const TransferOperators & TcellOperators(size_t iT) const
Return cell operators for the cell of index iT.
Definition xhess_full.hpp:107
const Mesh & mesh() const
Return the mesh.
Definition xhess_full.hpp:63
const LocalOperators & edgeOperators(size_t iE) const
Return edge operators for the edge of index iE.
Definition xhess_full.hpp:119
double computeL2Norm(const Eigen::VectorXd &v) const
Compute the L2-norm of a vector of the space.
XHess(const DDRCore &ddr_core, const SerendipityProblem &ser_pro, bool use_threads=true, std::ostream &output=std::cout)
Constructor.
Create grid points x
Definition generate_cartesian_mesh.m:22
Eigen::Vector2d VectorRd
Definition basis.hpp:55
const Mesh & mesh() const
Return a const reference to the mesh.
Definition ddrcore.hpp:116
std::function< Eigen::Vector2d(const Eigen::Vector2d &)> GradFunctionType
Definition xhess_full.hpp:24
const size_t & degree() const
Return the polynomial degree.
Definition ddrcore.hpp:122
TransferOperators(const Eigen::MatrixXd &_serendipity, const Eigen::MatrixXd &_extension)
Definition xhess_full.hpp:45
Eigen::MatrixXd potential
Definition xhess.hpp:41
Eigen::MatrixXd gradient
Definition xhess.hpp:40
const CellBases & cellBases(size_t iT) const
Return cell bases for element iT.
Definition ddrcore.hpp:128
const Eigen::MatrixXd & EgradCell(size_t iT) const
Definition xhess_full.hpp:95
const Eigen::MatrixXd & SgradCell(size_t iT) const
Return the serendipity reconstruction for the cell of index iT.
Definition xhess.hpp:80
Eigen::MatrixXd SerExtension(size_t iT) const
Definition xhess_full.cpp:271
Eigen::MatrixXd extension
Definition xhess_full.hpp:56
Eigen::MatrixXd potential2(const size_t iT, const VSXGrad &vsx_grad) const
Definition xhess_full.cpp:659
std::function< double(const Eigen::Vector2d &)> FunctionType
Definition xhess_full.hpp:23
const EdgeBases & edgeBases(size_t iE) const
Return edge bases for edge iE.
Definition ddrcore.hpp:136
Eigen::MatrixXd serendipity
Definition xhess.hpp:53
const Eigen::MatrixXd & EgradCell(const Cell &T) const
Return the serendipity reconstruction for cell T.
Definition xhess_full.hpp:101
bool use_threads
Definition HHO_DiffAdvecReac.hpp:45
depending on the Matrix Market format indicated by or array(dense array storage). The data will be duplicated % as appropriate if symmetry is indicated in the header. % % Optionally
if(strcmp(field, 'real')) % real valued entries T
Definition mmread.m:93
Definition mhd-solutions.hpp:9
static auto v
Definition ddrcore-test.hpp:32
static auto q
Definition ddrcore-test.hpp:14
Structure to store element bases.
Definition ddrcore.hpp:81
Structure to store edge bases.
Definition ddrcore.hpp:103
Structure for weights (scalar, at the moment) in integral.
Definition integralweight.hpp:33
A structure to store local operators (gradient and potential)
Definition xhess.hpp:29
LocalOperators(const Eigen::MatrixXd &_gradient, const Eigen::MatrixXd &_potential)
Definition xhess_full.hpp:30