1#ifndef INTEGRATE_TRIPLE_PRODUCT_HPP
2#define INTEGRATE_TRIPLE_PRODUCT_HPP
14typedef Eigen::Map<Eigen::MatrixXd, Eigen::Unaligned, Eigen::Stride<Eigen::Dynamic, Eigen::Dynamic>>
MatrixSlice;
15typedef Eigen::Map<Eigen::VectorXd, Eigen::Unaligned, Eigen::InnerStride<Eigen::Dynamic>>
VectorSlice;
64 std::cerr <<
"[IntegrateTripleProduct] ERROR: Multiarray slicing dimension or index out of range" << std::endl;
113 std::cerr <<
"[IntegrateTripleProduct] ERROR: Multiarray slicing dimension or index out of range" << std::endl;
154 for (
size_t i = 0;
i <
dim1;
i++) {
156 for (
size_t k = 0;
k <=
j;
k++) {
163 for (
size_t i = 0;
i <
N;
i++){
194 Eigen::Matrix3i
id = Eigen::Matrix3i::Identity();
197 for (
size_t i = 0;
i <
N;
i++){
198 for (
size_t j = 0;
j <
N;
j++){
199 for (
size_t k = 0;
k <
j;
k++){
250 Eigen::Matrix3i
id = Eigen::Matrix3i::Identity();
253 for (
size_t i = 0;
i <
N;
i++){
254 for (
size_t j = 0;
j <
N;
j++){
255 for (
size_t k = 0;
k <
j;
k++){
312 Eigen::Matrix3i
id = Eigen::Matrix3i::Identity();
315 for (
size_t j = 0;
j <
N;
j++){
316 for (
size_t k = 0;
k <
N;
k++){
379template<
typename ScalarBasisType1,
typename ScalarBasisType2,
size_t N>
402template<
typename ScalarBasisType,
typename BasisType>
425template<
typename BasisType,
typename ScalarBasisType,
size_t N>
438 Eigen::MatrixXd
M2 =
basis2.ancestor().matrix();
447 for (
size_t j = 0;
j <
N;
j++){
448 for (
size_t k = 0;
k <
N;
k++){
450 for (
size_t i = 0;
i <
dim1;
i++){
466template<
typename BasisType,
typename ScalarBasisType,
size_t N>
479 Eigen::MatrixXd
M1 =
basis1.matrix();
480 Eigen::MatrixXd
M2 =
basis2.matrix();
487 for (
size_t i = 0;
i <
dim1;
i++){
493 for (
size_t j = 0;
j <
dim2;
j++){
494 for (
size_t k = 0;
k <
dim2;
k++){
503template<
typename BasisType,
size_t N>
515 Eigen::MatrixXd
M1 =
basis1.matrix();
522 for (
size_t i = 0;
i <
dim1;
i++){
532template<
typename BasisType1,
typename BasisType2>
543 Eigen::MatrixXd
M2 =
basis2.matrix();
550 for (
size_t i = 0;
i <
dim1;
i++){
552 for (
size_t j = 0;
j <
dim2;
j++){
553 for (
size_t k = 0;
k <=
j;
k++){
563template<
size_t N,
typename ScalarBasisType>
585 Eigen::Matrix3i
id = Eigen::Matrix3i::Identity();
587 for (
size_t i = 0;
i <
N;
i++){
588 for (
size_t j = 0;
j <
N;
j++){
589 for (
size_t k = 0;
k <
j;
k++){
Family of functions expressed as linear combination of the functions of a given basis.
Definition basis.hpp:389
Basis for the complement G^{c,k}(T) in P^k(T)^3 of the range of grad.
Definition basis.hpp:1531
Basis for the space of gradients of polynomials.
Definition basis.hpp:1256
Scalar monomial basis on a cell.
Definition basis.hpp:155
Generate a basis where the function indices are shifted.
Definition basis.hpp:1040
Vector family obtained by tensorization of a scalar family.
Definition basis.hpp:610
@ Matrix
Definition basis.hpp:67
boost::multi_array< double, 3 > Scalar3Tensor
Definition IntegrateTripleProduct.hpp:13
Scalar3Tensor tripleInt(const Cell &T, const MonomialScalarBasisCell &basis1, const TensorizedVectorFamily< MonomialScalarBasisCell, N > &basis2, MonomialCellIntegralsType mono_int_map={})
Computes the triple integral product of a scalar times the dot product of two vectors - basis1(basis2...
Definition IntegrateTripleProduct.hpp:134
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
Eigen::Map< Eigen::VectorXd, Eigen::Unaligned, Eigen::InnerStride< Eigen::Dynamic > > VectorSlice
Definition IntegrateTripleProduct.hpp:15
MatrixSlice slice(Scalar3Tensor &tensor, size_t fixed_dim, size_t index)
Function to slice a 3-tensor with respect to one index (returns a 2-tensor)
Definition IntegrateTripleProduct.hpp:28
Eigen::Map< Eigen::MatrixXd, Eigen::Unaligned, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > > MatrixSlice
Definition IntegrateTripleProduct.hpp:14
std::unordered_map< VectorZd, double, VecHash > MonomialCellIntegralsType
Type for list of integrals of monomials.
Definition GMpoly_cell.hpp:49
Definition ddr-magnetostatics.hpp:41