5#include <unsupported/Eigen/KroneckerProduct>
14 typedef std::function<Eigen::Matrix2d(
const Eigen::Vector2d &)>
FunctionType;
27 std::unique_ptr<Poly2x2BasisCellType>
Polyk2x2;
36 return m_sxcurl.
mesh();
54 const int doe_cell = -1
64 inline const Eigen::MatrixXd
cellCurl(
size_t iT)
const
67 * Eigen::KroneckerProduct(m_sxcurl.
cellCurl(iT), Eigen::Matrix2d::Identity());
71 inline const Eigen::MatrixXd
cellCurl(
const Cell &
T)
const
79 Eigen::MatrixXd PotPermutedBasis
82 * Eigen::KroneckerProduct(PotPermutedBasis , Eigen::Matrix2d::Identity());
94 const double & penalty_factor = 1.,
95 const Eigen::MatrixXd & mass_Pk2_T = Eigen::MatrixXd::Zero(1,1),
99 return Eigen::KroneckerProduct(m_sxcurl.
computeL2Product(iT, penalty_factor, mass_Pk2_T, weight), Eigen::Matrix2d::Identity());
109 assert( m_cell_bases[iT] );
110 return *m_cell_bases[iT].get();
122 CellBases _compute_cell_bases(
size_t iT);
125 std::vector<std::unique_ptr<CellBases> > m_cell_bases;
129 std::ostream & m_output;
Matrix family obtained from a scalar family.
Definition basis.hpp:750
Discrete Serendipity Hcurl space: local operators, L2 product and global interpolator.
Definition sxcurl.hpp:16
const DDRCore::CellBases & cellBases(size_t iT) const
Return cell bases for the face of index iT.
Definition sxcurl.hpp:153
const Eigen::MatrixXd cellCurl(size_t iT) const
Return the full curl operator on the cell of index iT.
Definition sxcurl.hpp:102
const Eigen::MatrixXd cellPotential(size_t iT) const
Return the potential operator on the cell of index iT.
Definition sxcurl.hpp:114
const size_t & degree() const
Return the polynomial degree.
Definition sxcurl.hpp:51
const Mesh & mesh() const
Return the mesh.
Definition sxcurl.hpp:45
Eigen::MatrixXd computeL2Product(const size_t iT, const double &penalty_factor=1., const Eigen::MatrixXd &mass_Pk2_T=Eigen::MatrixXd::Zero(1, 1), const IntegralWeight &weight=IntegralWeight(1.)) const
Compute the matrix of the (weighted) L2-product.
Definition sxcurl.hpp:126
Construct all polynomial spaces for the DDR sequence.
Definition serendipity_problem.hpp:20
Vector family obtained by tensorization of a scalar family.
Definition basis.hpp:564
Definition vsxcurl.hpp:11
const CellBases & cellBases(const Cell &T) const
Return vector/matrix cell bases for cell T.
Definition vsxcurl.hpp:114
const Mesh & mesh() const
Return the mesh.
Definition vsxcurl.hpp:34
Family< MonomialScalarBasisCell > PolyBasisCellType
Definition vsxcurl.hpp:16
const Eigen::MatrixXd cellPotential(const Cell &T) const
Return the potential operator on cell T.
Definition vsxcurl.hpp:86
Eigen::MatrixXd computeL2Product(const size_t iT, const double &penalty_factor=1., const Eigen::MatrixXd &mass_Pk2_T=Eigen::MatrixXd::Zero(1, 1), const IntegralWeight &weight=IntegralWeight(1.)) const
Compute the matrix of the (weighted) L2-product.
Definition vsxcurl.hpp:92
const Eigen::MatrixXd cellCurl(const Cell &T) const
Return the gradient operator (expressed on Polyk2x2) on cell T.
Definition vsxcurl.hpp:71
const Eigen::MatrixXd cellPotential(size_t iT) const
Return the potential operator.
Definition vsxcurl.hpp:77
Family< MonomialScalarBasisEdge > PolyBasisEdgeType
Definition vsxcurl.hpp:21
Eigen::VectorXd interpolate(const FunctionType &q, const int doe_cell=-1) const
Interpolator of a continuous function.
Definition vsxcurl.cpp:56
TensorizedVectorFamily< DDRCore::PolyBasisCellType, dimspace > Poly2BasisCellType
Definition vsxcurl.hpp:17
TensorizedVectorFamily< DDRCore::PolyBasisEdgeType, dimspace > Poly2BasisEdgeType
Definition vsxcurl.hpp:22
const CellBases & cellBases(size_t iT) const
Return vector/matrix cell bases for the face of index iT.
Definition vsxcurl.hpp:107
const size_t & degree() const
Return the polynomial degree.
Definition vsxcurl.hpp:46
std::function< Eigen::Matrix2d(const Eigen::Vector2d &)> FunctionType
Definition vsxcurl.hpp:14
auto Polyk(size_t iT) const -> const PolyBasisCellType &
Definition vsxcurl.hpp:58
const SXCurl & sXcurl() const
Return the underlying sXgrad space.
Definition vsxcurl.hpp:40
const Eigen::MatrixXd cellCurl(size_t iT) const
Definition vsxcurl.hpp:64
MatrixFamily< DDRCore::PolyBasisCellType, dimspace > Poly2x2BasisCellType
Definition vsxcurl.hpp:18
Base class for global DOF spaces.
Definition variabledofspace.hpp:17
Eigen::MatrixXd PermuteTensorization(const size_t a, const size_t b)
Returns the matrix giving the permutation of the tensorization of a family of size a with a family of...
Definition basis.cpp:224
constexpr int dimspace
Dimension, and generic types for vector in correct dimension (makes it easier to translate a code bet...
Definition basis.hpp:53
std::unique_ptr< PolyBasisCellType > Polyk
Definition ddrcore.hpp:86
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 q
Definition ddrcore-test.hpp:14
Structure for weights (scalar, at the moment) in integral.
Definition integralweight.hpp:33
Definition vsxcurl.hpp:26
std::unique_ptr< Poly2x2BasisCellType > Polyk2x2
Definition vsxcurl.hpp:27