22 typedef std::function<double(
const Eigen::Vector2d &)>
FunctionType;
30 const Eigen::MatrixXd & _gradient,
31 const Eigen::MatrixXd & _potential
45 const Eigen::MatrixXd & _serendipity
60 return m_ddr_core.
mesh();
66 return m_ddr_core.
degree();
73 const int deg_quad = -1
79 inline const Eigen::MatrixXd &
SgradCell(
size_t iT)
const
81 return (*m_cell_transfer_operators[iT]).serendipity;
86 inline const Eigen::MatrixXd &
SgradCell(
const Cell &
T)
const
95 return *m_cell_transfer_operators[iT];
101 return *m_cell_transfer_operators[
T.global_index()];
108 return *m_edge_operators[iE];
114 return *m_edge_operators[E.global_index()];
120 return *m_cell_operators[iT];
126 return *m_cell_operators[
T.global_index()];
138 return m_ddr_core.
cellBases(
T.global_index());
150 return m_ddr_core.
edgeBases(E.global_index());
158 const double & penalty_factor = 1.,
159 const Eigen::MatrixXd & mass_Pkpo_T = Eigen::MatrixXd::Zero(1,1),
166 const Eigen::VectorXd & vT,
174 Eigen::MatrixXd _compute_cell_serendipity_operator(
size_t iT);
176 LocalOperators _compute_edge_gradient_potential(
size_t iE);
177 LocalOperators _compute_cell_gradient_potential(
size_t iT);
178 double _compute_squared_l2_norm(
size_t iT,
const Eigen::VectorXd & vT)
const;
188 std::ostream & m_output;
191 std::vector<std::unique_ptr<LocalOperators> > m_edge_operators;
192 std::vector<std::unique_ptr<LocalOperators> > m_cell_operators;
195 std::vector<std::shared_ptr<TransferOperators> > m_cell_transfer_operators;
Construct all polynomial spaces for the DDR sequence.
Definition ddrcore.hpp:63
Base class for global DOF spaces. Provides functions to manipulate global DOFs (the local version bei...
Definition globaldofspace.hpp:16
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
Discrete H2 space: local operators, L2 product and global interpolator.
Definition xhess.hpp:20
Eigen::Vector2d VectorRd
Definition basis.hpp:55
const LocalOperators & cellOperators(size_t iT) const
Return cell operators for the cell of index iT.
Definition xhess.hpp:118
const TransferOperators & TcellOperators(const Cell &T) const
Return cell operators for cell T.
Definition xhess.hpp:99
const size_t & degree() const
Return the polynomial degree.
Definition xhess.hpp:64
const Mesh & mesh() const
Return a const reference to the mesh.
Definition ddrcore.hpp:116
double evaluatePotential(const size_t iT, const Eigen::VectorXd &vT, const VectorRd &x) const
Evaluate the value of the potential at a point x.
Definition xhess.cpp:355
std::function< Eigen::Vector2d(const Eigen::Vector2d &)> GradFunctionType
Definition xhess.hpp:23
const size_t & degree() const
Return the polynomial degree.
Definition ddrcore.hpp:122
const DDRCore::EdgeBases & edgeBases(const Edge &E) const
Return edge bases for edge E.
Definition xhess.hpp:148
Eigen::VectorXd interpolate(const FunctionType &q, const GradFunctionType &Dq, const int deg_quad=-1) const
Interpolator of a continuous function.
Definition xhess.cpp:65
const Eigen::MatrixXd & SgradCell(const Cell &T) const
Return the serendipity reconstruction for cell T.
Definition xhess.hpp:86
LocalOperators(const Eigen::MatrixXd &_gradient, const Eigen::MatrixXd &_potential)
Definition xhess.hpp:29
Eigen::MatrixXd potential
Definition xhess.hpp:40
Eigen::MatrixXd gradient
Definition xhess.hpp:39
const LocalOperators & edgeOperators(const Edge &E) const
Return edge operators for edge E.
Definition xhess.hpp:112
const DDRCore::EdgeBases & edgeBases(size_t iE) const
Return edge bases for the edge of index iE.
Definition xhess.hpp:142
const DDRCore::CellBases & cellBases(const Cell &T) const
Return cell bases for cell T.
Definition xhess.hpp:136
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
Compute the matrix of the (weighted) L2-product for the cell of index iT.
Definition xhess.cpp:372
const CellBases & cellBases(size_t iT) const
Return cell bases for element iT.
Definition ddrcore.hpp:128
const Eigen::MatrixXd & SgradCell(size_t iT) const
Return the serendipity reconstruction for the cell of index iT.
Definition xhess.hpp:79
const DDRCore::CellBases & cellBases(size_t iT) const
Return cell bases for the cell of index iT.
Definition xhess.hpp:130
const LocalOperators & cellOperators(const Cell &T) const
Return cell operators for cell T.
Definition xhess.hpp:124
const TransferOperators & TcellOperators(size_t iT) const
Return cell operators for the cell of index iT.
Definition xhess.hpp:93
std::function< double(const Eigen::Vector2d &)> FunctionType
Definition xhess.hpp:22
const Mesh & mesh() const
Return the mesh.
Definition xhess.hpp:58
const EdgeBases & edgeBases(size_t iE) const
Return edge bases for edge iE.
Definition ddrcore.hpp:136
TransferOperators(const Eigen::MatrixXd &_serendipity)
Definition xhess.hpp:44
const LocalOperators & edgeOperators(size_t iE) const
Return edge operators for the edge of index iE.
Definition xhess.hpp:106
Eigen::MatrixXd serendipity
Definition xhess.hpp:52
double computeL2Norm(const Eigen::VectorXd &v) const
Compute the L2-norm of a vector of the space.
Definition xhess.cpp:531
bool use_threads
Definition HHO_DiffAdvecReac.hpp:47
if(strcmp(field, 'real')) % real valued entries T
Definition mmread.m:93
Definition ddr-klplate.hpp:27
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:28