1 # ifndef _GMPOLY_CELL_HPP
2 # define _GMPOLY_CELL_HPP
17 #include <unordered_map>
43 constexpr
size_t b = 100;
44 return p(0) + p(1) * b + p(2) * b*b;
61 std::vector<MonomialCellIntegralsType> & integrals_edges
84 template<
typename BasisType>
87 const Eigen::MatrixXd & anc_GM
91 return family_basis.
matrix() * anc_GM;
93 return anc_GM * (family_basis.
matrix()).transpose();
98 template<
typename BasisType>
101 const Eigen::MatrixXd & anc_GM
105 return anc_GM.topRows(restr_basis.
dimension());
107 return anc_GM.leftCols(restr_basis.
dimension());
112 template<
typename BasisType>
115 const Eigen::MatrixXd & anc_GM
119 return anc_GM.bottomRows(shifted_basis.
dimension());
121 return anc_GM.rightCols(shifted_basis.
dimension());
138 const MonomialScalarBasisCell & basis1,
139 const MonomialScalarBasisCell & basis2,
144 template<
typename BasisType>
147 return GramMatrix(T, basis, basis, mono_int_map);
151 template<
typename BasisType1,
typename BasisType2,
size_t N>
162 size_t dim1 = anc_gm.rows();
163 size_t dim2 = anc_gm.cols();
165 for (
size_t i=0; i<N; i++){
166 gm.block(i*dim1, i*dim2, dim1, dim2) = anc_gm;
175 const RolyComplBasisCell & basis1,
176 const RolyComplBasisCell & basis2,
181 template<
typename BasisType1,
size_t N>
189 size_t dim1 = rolycompl_basis.
dimension();
191 Eigen::MatrixXd gm = Eigen::MatrixXd::Zero(dim1, dim2);
197 for (
size_t m=0; m<N; m++){
204 template<
typename BasisType1,
size_t N>
212 return GramMatrix(T, rolycompl_basis, tens_family, mono_int_map).transpose();
218 const GolyComplBasisCell & basis1,
219 const GolyComplBasisCell & basis2,
224 template<
typename BasisType1,
size_t N>
232 size_t dim1 = golycompl_basis.
dimension();
234 Eigen::MatrixXd gm = Eigen::MatrixXd::Zero(dim1, dim2);
240 size_t dim_l1 = golycompl_basis.
dimPkmo();
241 size_t dim_l2 = tens_family.
ancestor().dimension();
245 gm.block(dim_l1, 2*dim_l2, dim_l1, dim_l2) =
GMGolyComplScalar(T, golycompl_basis, tens_family.
ancestor(), 1, intmap, 0);
246 gm.block(2*dim_l1, 0, dim1-2*dim_l1, dim_l2) =
GMGolyComplScalar(T, golycompl_basis, tens_family.
ancestor(), 2, intmap, 1);
247 gm.block(2*dim_l1, dim_l2, dim1-2*dim_l1, dim_l2) = -
GMGolyComplScalar(T, golycompl_basis, tens_family.
ancestor(), 2, intmap, 0);
253 template<
typename BasisType1,
size_t N>
261 return GramMatrix(T, golycompl_basis, tens_family, mono_int_map).transpose();
267 const RolyComplBasisCell & rolycompl_basis,
268 const MonomialScalarBasisCell & mono_basis,
274 template<
typename BasisType>
278 const BasisType & basis2,
284 static_assert(BasisType::hasAncestor,
"No method to compute this Gram matrix of derivatives");
291 const GolyComplBasisCell & golycompl_basis,
292 const MonomialScalarBasisCell & mono_basis,
301 template<
typename BasisType>
305 const BasisType & basis2,
314 static_assert(BasisType::hasAncestor,
"No method to compute this Gram matrix of derivatives");
321 const GolyComplBasisCell & basis1,
322 const GolyComplBasisCell & basis2,
334 template<
typename BasisType>
340 if constexpr(BasisType::hasAncestor){
341 return (BasisType::tensorRank == BasisType::AncestorType::tensorRank);
348 template<
typename BasisType1,
typename BasisType2>
350 const BasisType1 & basis1,
351 const BasisType2 & basis2,
356 static_assert(useAncestor<BasisType1>() || useAncestor<BasisType2>(),
"No method to compute this Gram matrix");
358 if constexpr (!useAncestor<BasisType1>() && useAncestor<BasisType2>()) {
360 }
else if constexpr (useAncestor<BasisType1>() && !useAncestor<BasisType2>()) {
374 const MonomialScalarBasisCell & basis1,
375 const MonomialScalarBasisCell & basis2,
383 const MonomialScalarBasisCell & basis1,
384 const MonomialScalarBasisCell & basis2,
391 template<
typename BasisType1,
typename BasisType2>
394 const BasisType1 & basis1,
395 const BasisType2 & basis2,
401 static_assert(BasisType1::hasAncestor || BasisType2::hasAncestor,
"No method to compute this Gram matrix of derivatives");
403 if constexpr (!BasisType1::hasAncestor && BasisType2::hasAncestor) {
405 }
else if constexpr (BasisType1::hasAncestor && !BasisType2::hasAncestor) {
413 template<
typename BasisType1,
typename BasisType2>
416 const BasisType1 & basis1,
417 const BasisType2 & basis2,
424 static_assert(BasisType1::hasAncestor || BasisType2::hasAncestor,
"No method to compute this Gram matrix of derivatives");
426 if constexpr (!BasisType1::hasAncestor && BasisType2::hasAncestor) {
428 }
else if constexpr (BasisType1::hasAncestor && !BasisType2::hasAncestor) {
440 template<
typename BasisType1,
typename BasisType2,
size_t N>
450 Eigen::MatrixXd gm = Eigen::MatrixXd::Zero(dim1, dim2);
456 for (
size_t m=0; m<N; m++){
464 template<
typename BasisType1,
typename BasisType2,
size_t N>
472 return GramMatrix(T, grad_basis, tens_family, mono_int_map).transpose();
477 template<
typename BasisType1,
typename BasisType2>
487 Eigen::MatrixXd gm = Eigen::MatrixXd::Zero(dim1, dim2);
490 size_t totaldegree = grad_basis1.
ancestor().max_degree()+grad_basis2.
ancestor().max_degree()-2;
493 for (
size_t m=0; m<3; m++){
496 return gm/std::pow(T.diam(), 2);
500 template<
typename BasisType1,
typename BasisType2>
511 template<
typename BasisType1,
typename BasisType2>
512 typename boost::disable_if<boost::is_same<BasisType2, MonomialCellIntegralsType>, Eigen::MatrixXd>::type
GramMatrix(
515 const BasisType2 & basis2,
523 template<
typename BasisType1,
typename Basis2>
526 const BasisType1 & basis1,
535 template<
typename BasisType1,
typename BasisType2,
size_t N>
545 Eigen::MatrixXd gm(dim1, dim2);
555 gm.block(0, 0, dim1/N, dim2/N) = GMzz + GMyy;
559 gm.block(dim1/N, dim2/N, dim1/N, dim2/N) = GMzz + GMxx;
563 gm.block(2*dim1/N, 2*dim2/N, dim1/N, dim2/N) = GMyy + GMxx;
565 return gm/std::pow(T.diam(), 2);
571 const GolyComplBasisCell & basis1,
572 const GolyComplBasisCell & basis2,
577 template<
typename BasisType2,
size_t N>
587 Eigen::MatrixXd gm(dim1, dim2);
593 size_t dim_l1 = basis1.
dimPkmo();
594 gm.block(0, 0, dim_l1, dim2/N) =
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 1, 0, 2) -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 2, 0, 1);
595 gm.block(0, dim2/N, dim_l1, dim2/N) =
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 2, 0, 0) +
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 1, 1, 2)
596 +
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 2, 2, 2) + 2/T.diam()*
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 3, 3, 2);
597 gm.block(0, 2*dim2/N, dim_l1, dim2/N) = -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 1, 0, 0) -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 1, 1, 1)
598 -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 2, 2, 1) - 2/T.diam()*
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 0, intmap, 3, 3, 1);
599 gm.block(dim_l1, 0, dim_l1, dim2/N) = -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 2, 1, 1) -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 0, 0, 2)
600 -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 2, 2, 2) - 2/T.diam()*
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 3, 3, 2);
601 gm.block(dim_l1, dim2/N, dim_l1, dim2/N) = -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 0, 1, 2) +
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 2, 1, 0);
602 gm.block(dim_l1, 2*dim2/N, dim_l1, dim2/N) =
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 0, 1, 1) +
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 0, 0, 0)
603 +
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 2, 2, 0) + 2/T.diam()*
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 1, intmap, 3, 3, 0);
604 gm.block(2*dim_l1, 0, dim1-2*dim_l1, dim2/N) = -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 1, 2, 2) +
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 0, 0, 1)
605 +
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 1, 1, 1) + 2/T.diam()*
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 3, 3, 1);
606 gm.block(2*dim_l1, dim2/N, dim1-2*dim_l1, dim2/N) = -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 0, 2, 2) -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 0, 0, 0)
607 -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 1, 1, 0) - 2/T.diam()*
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 3, 3, 0);
608 gm.block(2*dim_l1, 2*dim2/N, dim1-2*dim_l1, dim2/N) =
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 0, 2, 1) -
GMGolyComplScalar(T, basis1, basis2.
ancestor(), 2, intmap, 1, 2, 0);
614 template<
typename BasisType1,
size_t N>
626 template<
typename BasisType1,
typename BasisType2>
629 const BasisType1 & basis1,
630 const BasisType2 & basis2,
635 static_assert(useAncestor<BasisType1>() || useAncestor<BasisType2>(),
"No method to compute this Gram matrix");
637 if constexpr (!useAncestor<BasisType1>() && useAncestor<BasisType2>()) {
639 }
else if constexpr (useAncestor<BasisType1>() && !useAncestor<BasisType2>()) {
647 template<
typename BasisType1,
typename BasisType2,
size_t N>
657 Eigen::MatrixXd gm = Eigen::MatrixXd::Zero(dim1, dim2);
667 gm.block(0, dim2/N, dim1/N, dim2/N) = GMz;
668 gm.block(0, 2*dim2/N, dim1/N, dim2/N) = -GMy;
669 gm.block(dim1/N, 0, dim1/N, dim2/N) = -GMz;
670 gm.block(dim1/N, 2*dim2/N, dim1/N, dim2/N) = GMx;
671 gm.block(2*dim1/N, 0, dim1/N, dim2/N) = GMy;
672 gm.block(2*dim1/N, dim2/N, dim1/N, dim2/N) = -GMx;
678 template<
typename BasisType2,
size_t N>
688 Eigen::MatrixXd gm(dim1, dim2);
694 size_t dim_l1 = basis1.
dimPkmo();
715 template<
typename BasisType1,
typename BasisType2>
718 const BasisType1 & basis1,
719 const BasisType2 & basis2,
724 static_assert(useAncestor<BasisType1>() || useAncestor<BasisType2>(),
"No method to compute this Gram matrix");
726 if constexpr (!useAncestor<BasisType1>() && useAncestor<BasisType2>()) {
728 }
else if constexpr (useAncestor<BasisType1>() && !useAncestor<BasisType2>()) {
736 template<
typename BasisType1,
typename BasisType2>
739 const BasisType1 & basis1,
744 if constexpr (!useAncestor<BasisType1>()) {
752 template<
typename BasisType1,
typename BasisType2>
765 const MonomialScalarBasisCell & mono_basis,
766 const RolyComplBasisCell & rolycompl_basis,
772 template<
typename BasisType>
775 const BasisType & basis1,
782 static_assert(BasisType::hasAncestor,
"No method to compute this Gram matrix of derivatives");
787 template<
typename BasisType1,
typename BasisType2,
size_t N>
797 Eigen::MatrixXd gm(dim1, dim2);
803 for (
size_t i = 0; i < N; i++) {
804 for (
size_t j = 0; j < N; j++) {
809 return gm/std::pow(T.diam(), 2);
815 const RolyComplBasisCell & basis1,
816 const RolyComplBasisCell & basis2,
821 template<
typename BasisType2,
size_t N>
833 template<
typename BasisType1,
size_t N>
843 Eigen::MatrixXd gm(dim1, dim2);
849 for (
size_t i = 0; i < N; i++) {
857 template<
typename BasisType1,
typename BasisType2>
860 const BasisType1 & basis1,
861 const BasisType2 & basis2,
866 static_assert(useAncestor<BasisType1>() || useAncestor<BasisType2>(),
"No method to compute this Gram matrix");
868 if constexpr (!useAncestor<BasisType1>() && useAncestor<BasisType2>()) {
870 }
else if constexpr (useAncestor<BasisType1>() && !useAncestor<BasisType2>()) {
878 template<
typename BasisType1,
typename BasisType2>
879 typename boost::disable_if<boost::is_same<BasisType2, MonomialCellIntegralsType>, Eigen::MatrixXd>::type
GramMatrix(
882 const BasisType2 & basis2,
890 template<
typename BasisType1,
typename Basis2>
893 const BasisType1 & basis1,
902 template<
typename BasisType1,
size_t N>
912 Eigen::MatrixXd gm = Eigen::MatrixXd::Zero(dim1, dim2);
918 for (
size_t i = 0; i < N; i++) {
928 const RolyComplBasisCell & basis1,
929 const MonomialScalarBasisCell & basis2,
934 template<
typename BasisType1,
typename BasisType2>
937 const BasisType1 & basis1,
938 const BasisType2 & basis2,
943 static_assert(useAncestor<BasisType1>() || useAncestor<BasisType2>(),
"No method to compute this Gram matrix");
945 if constexpr (!useAncestor<BasisType1>() && useAncestor<BasisType2>()) {
947 }
else if constexpr (useAncestor<BasisType1>() && !useAncestor<BasisType2>()) {
955 template<
typename BasisType1,
typename BasisType2>
958 const BasisType1 & basis1,
963 if constexpr (!useAncestor<BasisType1>()) {
973 template<
typename BasisType1,
typename BasisType2,
size_t N>
984 size_t dim1 = anc_gm.rows();
985 size_t dim2 = anc_gm.cols();
987 for (
size_t i=0; i<N*N; i++){
988 gm.block(i*dim1, i*dim2, dim1, dim2) = anc_gm;
994 template<
typename BasisType1,
typename BasisType2>
1005 BasisType1 scalar_basis1 = basis1.
ancestor().ancestor();
1006 BasisType2 scalar_basis2 = basis2.
ancestor();
1007 size_t dim1 = scalar_basis1.dimension();
1008 size_t dim2 = scalar_basis2.dimension();
1011 size_t totaldegree = scalar_basis1.max_degree() + scalar_basis2.max_degree();
1014 for (
size_t j=0; j <
dimspace; j++){
1015 Eigen::MatrixXd gm_anc =
GMScalarDerivative(T, scalar_basis1, scalar_basis2, j, intmap);
1016 for (
size_t i=0; i <
dimspace; i++){
1017 gm.block(j*
dimspace*dim1 + i*dim1, i*dim2, dim1, dim2) = gm_anc;
1026 template<
typename BasisType1,
typename BasisType2>
1034 return GramMatrix(T, basis2, basis1, mono_int_map).transpose();
1039 template<
typename BasisType1,
typename BasisType2>
1050 BasisType1 scalar_basis1 = basis1.
ancestor().ancestor();
1051 BasisType2 scalar_basis2 = basis2.
ancestor();
1052 size_t dim1 = scalar_basis1.dimension();
1053 size_t dim2 = scalar_basis2.dimension();
1056 size_t totaldegree = scalar_basis1.max_degree() + scalar_basis2.max_degree();
1059 for (
size_t j=0; j <
dimspace; j++){
1060 Eigen::MatrixXd gm_anc =
GMScalarDerivative(T, scalar_basis1, scalar_basis2, j, intmap);
1061 for (
size_t i=0; i <
dimspace; i++){
1062 gm.block(i*dim1, j*
dimspace*dim2 + i*dim2, dim1, dim2) = gm_anc;
1070 template<
typename BasisType1,
typename BasisType2>
1078 return GramMatrix(T, basis2, basis1, mono_int_map).transpose();
1082 template<
typename BasisType1,
typename BasisType2,
size_t N>
1093 BasisType1 scalar_basis1 = basis1.
ancestor().ancestor();
1094 BasisType2 scalar_basis2 = basis2.
ancestor().ancestor();
1095 size_t dim1 = scalar_basis1.dimension();
1096 size_t dim2 = scalar_basis2.dimension();
1099 size_t totaldegree = scalar_basis1.max_degree() + scalar_basis2.max_degree();
1103 Eigen::MatrixXd gm_anc = Eigen::MatrixXd::Zero(dim1, dim2);
1104 for (
size_t k=0; k <
dimspace; k++){
1108 for (
size_t i=0; i < N; i++){
1109 gm.block(i*dim1, i*dim2, dim1, dim2) = gm_anc;
1112 return gm/(std::pow(T.diam(),2));
Basis for the space of curls of polynomials.
Definition: basis.hpp:1290
Basis (or rather family) of divergence of an existing basis.
Definition: basis.hpp:1353
Family of functions expressed as linear combination of the functions of a given basis.
Definition: basis.hpp:388
Basis for the complement G^{c,k}(T) in P^k(T)^3 of the range of grad.
Definition: basis.hpp:1503
Basis for the space of gradients of polynomials.
Definition: basis.hpp:1228
Matrix family obtained from a scalar family.
Definition: basis.hpp:776
Scalar monomial basis on a cell.
Definition: basis.hpp:154
Generate a basis restricted to the first "dimension" functions.
Definition: basis.hpp:1119
Basis for the complement R^{c,k}(T) in P^k(T)^3 of the range of curl.
Definition: basis.hpp:1432
Generate a basis where the function indices are shifted.
Definition: basis.hpp:1012
Vector family obtained by tensorization of a scalar family.
Definition: basis.hpp:609
size_t dimension() const
Return the dimension of the basis.
Definition: basis.hpp:1045
const ScalarFamilyType & ancestor() const
Return the ancestor (family that has been tensorized)
Definition: basis.hpp:863
size_t dimPkmo() const
Returns the dimension of P^{k-1}(R^3)
Definition: basis.hpp:1553
size_t dimension() const
Return the dimension of the family.
Definition: basis.hpp:640
constexpr int dimspace
Dimension, and generic types for vector in correct dimension (makes it easier to translate a code bet...
Definition: basis.hpp:50
size_t max_degree() const
Returns the maximum degree of the basis functions.
Definition: basis.hpp:1470
constexpr const ScalarFamilyType & ancestor() const
Return the ancestor (family that has been tensorized)
Definition: basis.hpp:747
constexpr const BasisType & ancestor() const
Return the ancestor (basis that the gradient was taken of)
Definition: basis.hpp:1335
size_t dimension() const
Compute the dimension of the basis.
Definition: basis.hpp:1529
constexpr const BasisType & ancestor() const
Return the ancestor (basis that the gradient was taken of)
Definition: basis.hpp:1398
size_t max_degree() const
Returns the maximum degree of the basis functions.
Definition: basis.hpp:753
constexpr const BasisType & ancestor() const
Return the ancestor (basis that the gradient was taken of)
Definition: basis.hpp:1273
size_t dimension() const
Compute the dimension of the basis.
Definition: basis.hpp:1458
size_t max_degree() const
Returns the maximum degree of the basis functions.
Definition: basis.hpp:195
size_t dimension() const
Compute the dimension of the basis.
Definition: basis.hpp:180
size_t dimension() const
Compute the dimension of the basis.
Definition: basis.hpp:1261
size_t max_degree() const
Returns the maximum degree of the basis functions.
Definition: basis.hpp:1541
const Eigen::MatrixXd & matrix() const
Return the coefficient matrix.
Definition: basis.hpp:558
size_t dimension() const
Return the dimension of the basis.
Definition: basis.hpp:1154
size_t dimension() const
Return the dimension of the family.
Definition: basis.hpp:823
Eigen::MatrixXd GramMatrix(const Cell &T, const MonomialScalarBasisCell &basis1, const MonomialScalarBasisCell &basis2, MonomialCellIntegralsType mono_int_map={})
Computes the Gram Matrix of a pair of local scalar monomial bases.
Definition: GMpoly_cell.cpp:170
Eigen::MatrixXd GramMatrixDiv(const Cell &T, const TensorizedVectorFamily< BasisType1, N > &basis1, const MonomialScalarBasisCell &basis2, MonomialCellIntegralsType mono_int_map={})
Template to compute the Gram Matrix of a Divergence<Tensorized> basis and a monomial scalar basis.
Definition: GMpoly_cell.hpp:903
Eigen::MatrixXd GramMatrixCurlCurl(const Cell &T, const TensorizedVectorFamily< BasisType1, N > &basis1, const TensorizedVectorFamily< BasisType2, N > &basis2, MonomialCellIntegralsType mono_int_map={})
Template to compute the Gram Matrix of the curl of a tensorized basis and the curl of another tensori...
Definition: GMpoly_cell.hpp:536
Eigen::MatrixXd GramMatrixDivDiv(const Cell &T, const TensorizedVectorFamily< BasisType1, N > &basis1, const TensorizedVectorFamily< BasisType2, N > &basis2, MonomialCellIntegralsType mono_int_map={})
Template to compute the Gram Matrix of the divergence of a tensorized basis and the divergence of ano...
Definition: GMpoly_cell.hpp:788
Eigen::MatrixXd GMScalarDerivative(const Cell &T, const MonomialScalarBasisCell &basis1, const MonomialScalarBasisCell &basis2, const size_t m, MonomialCellIntegralsType mono_int_map={})
Computes the Gram Matrix of a pair of local scalar monomial bases, taking a partial derivative of the...
Definition: GMpoly_cell.cpp:244
MonomialCellIntegralsType IntegrateCellMonomials(const Cell &T, const int maxdeg)
Compute all the integrals of a cell's monomials on the cell.
Definition: GMpoly_cell.cpp:117
Eigen::MatrixXd GMGolyComplScalar(const Cell &T, const GolyComplBasisCell &golycompl_basis, const MonomialScalarBasisCell &mono_basis, const size_t s, MonomialCellIntegralsType mono_int_map, const size_t m=3, const size_t k1=3, const size_t k2=3)
Computes the Gram Matrix of the sth section of a GolyCompl Basis and a monomial basis.
Definition: GMpoly_cell.cpp:321
Eigen::MatrixXd GMRolyComplScalarDiv(const Cell &T, const MonomialScalarBasisCell &mono_basis, const RolyComplBasisCell &rolycompl_basis, const size_t k, MonomialCellIntegralsType mono_int_map)
Gram Matrix of the divergence of a RolyCompl Basis and the kth derivative of a monomial basis.
Definition: GMpoly_cell.cpp:506
MonomialCellIntegralsType CheckIntegralsDegree(const Cell &T, const size_t degree, const MonomialCellIntegralsType &mono_int_map={})
Checks if the degree of an existing list of monomial integrals is sufficient, other re-compute and re...
Definition: GMpoly_cell.cpp:160
size_t operator()(const VectorZd &p) const
Definition: GMpoly_cell.hpp:41
std::vector< MonomialCellIntegralsType > IntegrateCellMonomials_onEdges(const Cell &T, const size_t maxdeg)
Compute all the integrals, on the edges of a cell, of this cell's monomials up to a max degree.
Definition: GMpoly_cell.cpp:7
Eigen::MatrixXd GramMatrixCurl(const Cell &T, const TensorizedVectorFamily< BasisType1, N > &basis1, const TensorizedVectorFamily< BasisType2, N > &basis2, MonomialCellIntegralsType mono_int_map={})
Template to compute the Gram Matrix of a Curl<Tensorized> basis and a tensorized scalar basis.
Definition: GMpoly_cell.hpp:648
Eigen::MatrixXd GMGolyCompl(const Cell &T, const GolyComplBasisCell &basis1, const GolyComplBasisCell &basis2, const size_t s1, const size_t s2, MonomialCellIntegralsType mono_int_map, const size_t m1=3, const size_t m2=3, const size_t k1=3, const size_t k2=3)
Computes the Gram Matrix of the (optionally k1th derivative of the) s1th section of GolyCompl (option...
Definition: GMpoly_cell.cpp:362
Eigen::MatrixXd GMRolyComplScalar(const Cell &T, const RolyComplBasisCell &rolycompl_basis, const MonomialScalarBasisCell &mono_basis, const size_t m, MonomialCellIntegralsType mono_int_map={})
Computes the Gram Matrix of the mth component of a RolyCompl Basis and a monomial basis.
Definition: GMpoly_cell.cpp:298
constexpr bool useAncestor()
Determines if the ancestor of a basis will be used to compute a Gram matrix for this basis.
Definition: GMpoly_cell.hpp:335
Eigen::MatrixXd transformGM(const Family< BasisType > &family_basis, const char RC, const Eigen::MatrixXd &anc_GM)
Transforms a Gram Matrix from an ancestor to a family basis.
Definition: GMpoly_cell.hpp:85
std::unordered_map< VectorZd, double, VecHash > MonomialCellIntegralsType
Type for list of integrals of monomials.
Definition: GMpoly_cell.hpp:49
std::vector< MonomialCellIntegralsType > IntegrateCellMonomials_onFaces(const Cell &T, const size_t maxdeg, std::vector< MonomialCellIntegralsType > &integrals_edges)
Compute all the integrals, on the faces of a cell, of this cell's monomials up to a max degree.
Definition: GMpoly_cell.cpp:61
Definition: ddr-magnetostatics.hpp:40
MeshND::VectorZd< 2 > VectorZd
Definition: Mesh2D.hpp:15
MeshND::Cell< 2 > Cell
Definition: Mesh2D.hpp:13
Hash function for VectorZd type.
Definition: GMpoly_cell.hpp:40