8#ifndef __ENTITIES_FIELD_DATA_HPP__
9 #define __ENTITIES_FIELD_DATA_HPP__
11using namespace boost::numeric;
21using VectorDofs = ublas::vector<FEDofEntity *, DofsAllocator>;
42 std::bitset<LASTBASE>
bAse;
46 std::array<std::bitset<LASTSPACE>, MBMAXTYPE>
48 std::array<std::bitset<LASTBASE>, MBMAXTYPE>
50 std::array<std::bitset<LASTBASE>,
LASTSPACE>
52 std::array<std::bitset<LASTBASE>,
LASTSPACE>
54 std::array<boost::ptr_vector<EntData>, MBMAXTYPE>
130 const boost::shared_ptr<EntitiesFieldData> &data_ptr);
141 const boost::shared_ptr<EntitiesFieldData>
dataPtr;
170 EntData(
const bool allocate_base_matrices =
true);
323 for (
auto &d :
dOfs) {
325 if (d->getNbOfCoeffs() != Tensor_Dim) {
327 s <<
"Wrong number of coefficients is " << d->getNbOfCoeffs();
328 s <<
" but you ask for tensor rank 1 dimension " << Tensor_Dim;
353 constexpr int TensorSize = Tensor_Dim0 * Tensor_Dim1;
354 for (
auto &d :
dOfs) {
356 if (d->getNbOfCoeffs() != TensorSize) {
358 s <<
"Wrong number of coefficients is " << d->getNbOfCoeffs();
359 s <<
" but you ask for tensor rank 2 dimensions " << Tensor_Dim0;
360 s <<
" by " << Tensor_Dim1 <<
" so " << TensorSize;
361 s <<
" coefficients is expected";
386 constexpr auto size_symm = (Tensor_Dim * (Tensor_Dim + 1)) / 2;
388 for (
auto &d :
dOfs) {
392 s <<
"Wrong number of coefficients is " << d->getNbOfCoeffs();
393 s <<
" but you ask for symmetric tensor rank 2 dimensions "
394 << Tensor_Dim <<
" by " << Tensor_Dim <<
" so " <<
size_symm;
395 s <<
" coefficients is expected";
413 for (
auto &d :
dOfs) {
415 if (d->getNbOfCoeffs() != 1) {
417 s <<
"Wrong number of coefficients is " << d->getNbOfCoeffs();
418 s <<
" but expected scalar field, tensor of rank 0";
456 virtual boost::shared_ptr<MatrixDouble> &
466 virtual boost::shared_ptr<MatrixDouble> &
475 virtual boost::shared_ptr<MatrixDouble> &
623 const int gg,
const int nb_base_functions);
648 const int nb_base_functions);
658 const int nb_base_functions);
692 template <
int DIM0,
int DIM1>
702 template <
int DIM0,
int DIM1>
712 template <
int DIM0,
int DIM1>
714 const int dof,
const int gg);
722 template <
int DIM0,
int DIM1>
801 template <
int Tensor_Dim>
803 double *ptr = &*
getDiffN(base).data().begin();
848 template <
int Tensor_Dim>
851 double *ptr = &
getDiffN(base)(gg, Tensor_Dim * bb);
882 template <
int Tensor_Dim>
884 double *ptr = &(
getN(base, BaseDerivatives::SecondDerivative))(0, 0);
893 template <
int Tensor_Dim>
896 constexpr int TensorSize = Tensor_Dim * Tensor_Dim;
898 &
getN(base, BaseDerivatives::SecondDerivative)(gg, TensorSize * bb);
900 Tensor_Dim, Tensor_Dim>(ptr);
906 double *ptr = &(
getN(
bAse, BaseDerivatives::SecondDerivative))(0, 0);
916 constexpr int TensorSize = Tensor_Dim * Tensor_Dim;
918 &
getN(
bAse, BaseDerivatives::SecondDerivative)(gg, TensorSize * bb);
920 Tensor_Dim, Tensor_Dim>(ptr);
949 double *t_n_ptr = &*
getN(base).data().begin();
951 Tensor_Dim>(t_n_ptr);
975 double *t_n_ptr = &*
getN(
bAse).data().begin();
977 Tensor_Dim>(t_n_ptr);
982 template <
int Tensor_Dim0,
int Tensor_Dim1>
984 Tensor_Dim0, Tensor_Dim1>
990 template <
int Tensor_Dim0,
int Tensor_Dim1>
992 Tensor_Dim0, Tensor_Dim1>
997 template <
int Tensor_Dim0,
int Tensor_Dim1>
999 Tensor_Dim0, Tensor_Dim1>
1001 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(
bAse);
1007 template <
int Tensor_Dim0,
int Tensor_Dim1>
1009 Tensor_Dim0, Tensor_Dim1>
1011 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(
bAse, gg, bb);
1016 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
1019 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
1024 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
1027 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
1029 return getFTensor3Diff2N<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
bAse);
1034 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
1037 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
1043 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
1046 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
1051 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
1054 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
1056 return getFTensor3DiffN<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
bAse);
1062 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
1065 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
1067 return getFTensor3DiffN<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
bAse, gg,
1085 template <
int Tensor_Dim>
1087 double *t_n_ptr = &
getN(base)(gg, Tensor_Dim * bb);
1089 Tensor_Dim>(t_n_ptr);
1107 double *t_n_ptr = &
getN(
bAse)(gg, Tensor_Dim * bb);
1109 Tensor_Dim>(t_n_ptr);
1138 template <
int Tensor_Dim0,
int Tensor_Dim1>
1140 double *t_n_ptr = &*(
getN(base).data().begin());
1143 Tensor_Dim1>(t_n_ptr);
1169 double *t_n_ptr = &*(
getN(
bAse).data().begin());
1172 Tensor_Dim1>(t_n_ptr);
1201 template <
int Tensor_Dim0,
int Tensor_Dim1>
1203 constexpr int TensorSize = Tensor_Dim0 * Tensor_Dim1;
1204 double *t_n_ptr = &
getN(base)(gg, TensorSize * bb);
1206 Tensor_Dim0, Tensor_Dim1>(t_n_ptr);
1230 template <
int Tensor_Dim0,
int Tensor_Dim1>
1232 constexpr int TensorSize = Tensor_Dim0 * Tensor_Dim1;
1233 double *t_n_ptr = &
getN(
bAse)(gg, TensorSize * bb);
1235 Tensor_Dim0, Tensor_Dim1>(t_n_ptr);
1244 friend std::ostream &
operator<<(std::ostream &os,
1273 virtual boost::shared_ptr<MatrixInt> &
1279 virtual boost::shared_ptr<MatrixDouble> &
1285 virtual const boost::shared_ptr<MatrixDouble> &
1291 virtual boost::shared_ptr<MatrixDouble> &
1297 virtual const boost::shared_ptr<MatrixDouble> &
1300 virtual std::map<std::string, boost::shared_ptr<MatrixInt>> &
1308 virtual std::map<std::string, boost::shared_ptr<MatrixDouble>> &
getBBNMap();
1316 virtual std::map<std::string, boost::shared_ptr<MatrixDouble>> &
1325 virtual boost::shared_ptr<MatrixInt> &
1334 virtual boost::shared_ptr<MatrixDouble> &
1343 virtual boost::shared_ptr<MatrixDouble> &
1390 std::vector<EntityType>
1393 std::array<std::array<boost::shared_ptr<MatrixDouble>,
LASTBASE>,
1398 std::array<boost::shared_ptr<MatrixDouble>,
LASTBASE>
1403 std::map<std::string, boost::shared_ptr<MatrixDouble>>
bbN;
1404 std::map<std::string, boost::shared_ptr<MatrixDouble>>
bbDiffN;
1405 std::map<std::string, boost::shared_ptr<MatrixInt>>
1449 const boost::shared_ptr<EntitiesFieldData::EntData> &ent_data_ptr);
1456 boost::shared_ptr<MatrixDouble> &
1460 boost::shared_ptr<MatrixDouble> &
1463 boost::shared_ptr<MatrixDouble> &
1466 const boost::shared_ptr<MatrixDouble> &
1469 const boost::shared_ptr<MatrixDouble> &
1472 inline boost::shared_ptr<MatrixDouble> &
1475 inline boost::shared_ptr<MatrixDouble> &
1478 boost::shared_ptr<MatrixInt> &
1484 boost::shared_ptr<MatrixDouble> &
1490 const boost::shared_ptr<MatrixDouble> &
1496 boost::shared_ptr<MatrixDouble> &
1502 const boost::shared_ptr<MatrixDouble> &
1529 unsigned int size = 0;
1530 if (
auto dof = dOfs[0]) {
1531 size = dof->getOrderNbDofs(
order) * dof->getNbOfCoeffs();
1532 size = size < iNdices.size() ? size : iNdices.size();
1534 int *data = &*iNdices.data().begin();
1535 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1539 return localIndices;
1544 unsigned int size = 0;
1545 if (
auto dof = dOfs[0]) {
1546 size = dof->getOrderNbDofs(
order) * dof->getNbOfCoeffs();
1547 size = size < localIndices.size() ? size : localIndices.size();
1549 int *data = &*localIndices.data().begin();
1550 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1560 return localIndices;
1569 unsigned int size = 0;
1570 if (
auto dof = dOfs[0]) {
1571 size = dof->getOrderNbDofs(
order) * dof->getNbOfCoeffs();
1572 size = size < fieldData.size() ? size : fieldData.size();
1574 double *data = &*fieldData.data().begin();
1587 return fieldEntities;
1592 return fieldEntities;
1602 if (!getNSharedPtr(base)) {
1603 MOFEM_LOG_C(
"SELF", Sev::error,
"Ptr to base %s functions is null",
1606 "Null pointer to base functions");
1609 return *(getNSharedPtr(base));
1615 MOFEM_LOG_C(
"SELF", Sev::error,
"Ptr to field %s base functions is null ",
1618 "Null pointer to base functions");
1628 return *(getDiffNSharedPtr(base));
1635 if (!getNSharedPtr(base, derivative)) {
1637 "Ptr to base %s functions derivative %d is null",
1642 return *(getNSharedPtr(base, derivative));
1650 "Null pointer to base functions derivative");
1660 return getN(
bAse, derivative);
1666 int size = getN(base).size2();
1667 double *data = &getN(base)(gg, 0);
1668 return VectorAdaptor(size, ublas::shallow_array_adaptor<double>(size, data));
1672 return getN(
bAse, gg);
1681 if (getN(base).size1() == getDiffN(base).size1()) {
1682 int size = getN(base).size2();
1683 int dim = getDiffN(base).size2() / size;
1684 double *data = &getDiffN(base)(gg, 0);
1686 getN(base).size2(), dim,
1687 ublas::shallow_array_adaptor<double>(getDiffN(base).size2(), data));
1692 getN(base).size1(), getN(base).size2(),
1693 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1694 &getDiffN(base).data()[0]));
1699 return getDiffN(
bAse, gg);
1704 const int gg,
const int nb_base_functions) {
1705 (void)getN()(gg, nb_base_functions -
1707 double *data = &getN(base)(gg, 0);
1708 return VectorAdaptor(nb_base_functions, ublas::shallow_array_adaptor<double>(
1709 nb_base_functions, data));
1714 return getN(
bAse, gg, nb_base_functions);
1720 const int nb_base_functions) {
1724 if (getN(base).size1() == getDiffN(base).size1()) {
1725 (void)getN(base)(gg,
1728 int dim = getDiffN(base).size2() / getN(base).size2();
1729 double *data = &getDiffN(base)(gg, 0);
1731 nb_base_functions, dim,
1732 ublas::shallow_array_adaptor<double>(dim * nb_base_functions, data));
1737 getN(base).size1(), getN(base).size2(),
1738 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1739 &getDiffN(base).data()[0]));
1745 const int nb_base_functions) {
1746 return getDiffN(
bAse, gg, nb_base_functions);
1753 if (PetscUnlikely(getN(base).size2() % DIM)) {
1757 const int nb_base_functions = getN(base).size2() / DIM;
1758 double *data = &getN(base)(gg, 0);
1760 nb_base_functions, DIM,
1761 ublas::shallow_array_adaptor<double>(DIM * nb_base_functions, data));
1766 return getVectorN<DIM>(
bAse, gg);
1769template <
int DIM0,
int DIM1>
1773 if (PetscUnlikely(getDiffN(base).size2() % (DIM0 *
DIM1))) {
1777 const int nb_base_functions = getN(base).size2() / (DIM0 *
DIM1);
1778 double *data = &getN(base)(gg, 0);
1780 ublas::shallow_array_adaptor<double>(
1781 DIM0 *
DIM1 * nb_base_functions, data));
1784template <
int DIM0,
int DIM1>
1786 return getVectorDiffN<DIM0, DIM1>(
bAse, gg);
1789template <
int DIM0,
int DIM1>
1792 const int dof,
const int gg) {
1796 ublas::shallow_array_adaptor<double>(DIM0 *
DIM1, data));
1799template <
int DIM0,
int DIM1>
1802 return getVectorDiffN<DIM0, DIM1>(
bAse, dof, gg);
1807 double *ptr = &*getN(base).data().begin();
1813 return getFTensor0N(
bAse);
1818 const int gg,
const int bb) {
1819 double *ptr = &getN(base)(gg, bb);
1825 return getFTensor0N(
bAse, gg, bb);
1835 return *getBBAlphaIndicesSharedPtr(bbFieldName);
1844boost::shared_ptr<MatrixDouble> &
1850boost::shared_ptr<MatrixDouble> &
1873template <
typename T = EntityStorage>
1876 const double *ptr, InsertMode iora) {
1877 static_assert(!std::is_same<T, T>::value,
1878 "VecSetValues value for this data storage is not implemented");
1885 const double *ptr, InsertMode iora) {
1905template <
typename T = EntityStorage>
1909 return VecSetValues<T>(V, data, &*vec.data().begin(), iora);
1928template <
typename T = EntityStorage>
1932 const double *ptr, InsertMode iora) {
1933 static_assert(!std::is_same<T, T>::value,
1934 "MatSetValues value for this data storage is not implemented");
1954template <
typename T = EntityStorage>
1959 return MatSetValues<T>(
M, row_data, col_data, &*mat.data().begin(), iora);
1966 const double *ptr, InsertMode iora) {
1982 const int gg,
const int bb);
1989 const int gg,
const int bb);
2002 const int gg,
const int bb);
#define MOFEM_LOG_C(channel, severity, format,...)
FieldApproximationBase
approximation base
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
FieldSpace
approximation spaces
@ LASTSPACE
FieldSpace in [ 0, LASTSPACE )
@ MOFEM_DATA_INCONSISTENCY
static const char *const ApproximationBaseNames[]
#define BITFEID_SIZE
max number of finite elements
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
MatrixShallowArrayAdaptor< double > MatrixAdaptor
Matrix adaptor.
VectorShallowArrayAdaptor< int > VectorIntAdaptor
int ApproximationOrder
Approximation on the entity.
VectorShallowArrayAdaptor< double > VectorAdaptor
UBlasMatrix< double > MatrixDouble
UBlasVector< double > VectorDouble
UBlasMatrix< int > MatrixInt
UBlasVector< int > VectorInt
implementation of Data Operators for Forces and Sources
auto getVectorAdaptor(T1 ptr, const size_t n)
Get Vector adaptor.
DEPRECATED typedef DerivedEntitiesFieldData DerivedDataForcesAndSourcesCore
ublas::vector< FieldEntity *, FieldEntAllocator > VectorFieldEntities
DEPRECATED typedef EntitiesFieldData DataForcesAndSourcesCore
MoFEMErrorCode MatSetValues(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
Assemble PETSc matrix.
ublas::unbounded_array< FieldEntity *, std::allocator< FieldEntity * > > FieldEntAllocator
MoFEMErrorCode VecSetValues< EntityStorage >(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
MoFEMErrorCode MatSetValues< EntityStorage >(Mat M, const EntitiesFieldData::EntData &row_data, const EntitiesFieldData::EntData &col_data, const double *ptr, InsertMode iora)
ublas::unbounded_array< FEDofEntity *, std::allocator< FEDofEntity * > > DofsAllocator
MoFEMErrorCode VecSetValues(Vec V, const EntitiesFieldData::EntData &data, const double *ptr, InsertMode iora)
Assemble PETSc vector.
ublas::vector< FEDofEntity *, DofsAllocator > VectorDofs
constexpr auto field_name
Derived data on single entity (This is passed as argument to DataOperator::doWork)
boost::shared_ptr< MatrixDouble > & getBBNSharedPtr(const std::string &field_name)
boost::shared_ptr< MatrixDouble > & getDerivedDiffNSharedPtr(const FieldApproximationBase base)
const boost::shared_ptr< EntitiesFieldData::EntData > entDataPtr
MoFEMErrorCode baseSwap(const std::string &field_name, const FieldApproximationBase base)
Used by Bernstein base to keep temporary pointer.
std::vector< BitRefLevel > & getEntDataBitRefLevel()
Get entity bit reference level.
int getSense() const
Get entity sense for conforming approximation fields.
boost::shared_ptr< MatrixInt > & getBBAlphaIndicesSharedPtr(const std::string &field_name)
boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr(const std::string &field_name)
boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr(const FieldApproximationBase base)
Get shared pointer to derivatives of base functions.
boost::shared_ptr< MatrixDouble > & getNSharedPtr(const FieldApproximationBase base, const BaseDerivatives derivative)
Get shared pointer to base functions with derivatives.
boost::shared_ptr< MatrixDouble > & getDerivedNSharedPtr(const FieldApproximationBase base)
this class derives data from other data structure
MoFEMErrorCode setElementType(const EntityType type)
Set element type for derived data.
const boost::shared_ptr< EntitiesFieldData > dataPtr
Data on single entity (This is passed as argument to DataOperator::doWork)
auto getFTensor2SymmetricFieldData()
Return symmetric FTensor rank 2, i.e. matrix from field data coefficients.
std::vector< int > dofBrokenSideVec
Map side to dofs number.
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > bbDiffNByOrder
BB base functions derivatives by order.
boost::shared_ptr< MatrixDouble > swapBaseDiffNPtr
Used by Bernstein base to keep temporary pointer.
virtual std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > & getBBDiffNByOrderArray()
FieldSpace sPace
Entity space.
auto getFTensor2FieldData()
Return FTensor rank 2, i.e. matrix from field data coefficients.
const VectorIntAdaptor getIndicesUpToOrder(int order)
Get global indices of DOFs on entity up to given order.
virtual std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > & getBBNByOrderArray()
int sEnse
Entity sense (orientation)
auto getFTensor2N()
Get base functions for Hdiv space.
VectorDouble fieldData
Field data on entity.
MatrixDouble & getN()
Get base functions using default base.
FieldApproximationBase & getBase()
Get approximation base.
boost::shared_ptr< MatrixDouble > swapBaseNPtr
Used by Bernstein base to keep temporary pointer.
ApproximationOrder getOrder() const
Get approximation order.
std::map< std::string, boost::shared_ptr< MatrixInt > > bbAlphaIndices
Indices for Bernstein-Bezier (BB) base.
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3DiffN(const int gg, const int bb)
Get derivatives of base functions for tonsorial Hdiv space at integration pts.
friend std::ostream & operator<<(std::ostream &os, const EntitiesFieldData::EntData &e)
auto getFTensor1DiffN(const FieldApproximationBase base, const int gg, const int bb)
Get derivatives of base functions (Loop by integration points)
VectorInt localIndices
Local indices on entity.
const MatrixAdaptor getVectorDiffN(FieldApproximationBase base, const int gg)
get DiffHdiv of base functions at Gauss pts
const VectorFieldEntities & getFieldEntities() const
Get field entities (const version)
auto getFTensor1FieldData()
Return FTensor of rank 1, i.e. vector from field data coefficients.
auto getFTensor1N(FieldApproximationBase base, const int gg, const int bb)
Get Hdiv base functions at integration point.
auto getFTensor2N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
virtual std::array< boost::shared_ptr< MatrixInt >, MaxBernsteinBezierOrder > & getBBAlphaIndicesByOrderArray()
virtual std::map< std::string, boost::shared_ptr< MatrixInt > > & getBBAlphaIndicesMap()
const VectorIntAdaptor getLocalIndicesUpToOrder(int order)
Get local indices of DOFs on entity up to given order.
auto getFTensor2N(FieldApproximationBase base, const int gg, const int bb)
Get base functions for tensor Hdiv/Hcurl spaces.
const VectorAdaptor getFieldDataUpToOrder(int order)
Get DOF values on entity up to given order.
std::vector< BitRefLevel > entDataBitRefLevel
Bit ref level in entity.
auto getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN(const int gg, const int bb)
Get derivatives of base functions for Hdiv space at integration pts.
static constexpr size_t MaxBernsteinBezierOrder
VectorInt iNdices
Global indices on entity.
virtual boost::shared_ptr< MatrixDouble > & getNSharedPtr(const FieldApproximationBase base, const BaseDerivatives derivative)
Get shared pointer to base functions with derivatives.
auto getFTensor1N(const int gg, const int bb)
Get Hdiv base functions at integration point.
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesSharedPtr(const std::string &field_name)
const VectorDouble & getFieldData() const
Get DOF values on entity.
VectorInt bbNodeOrder
order of nodes
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNByOrderSharedPtr(const size_t o)
get BB base derivative by order
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3Diff2N(FieldApproximationBase base)
Get second derivatives of base functions for Hvec space.
auto getFTensor2N(const int gg, const int bb)
Get base functions for Hdiv space.
virtual std::map< std::string, boost::shared_ptr< MatrixDouble > > & getBBNMap()
get hash map of base function for BB base, key is a field name
const MatrixAdaptor getVectorN(const FieldApproximationBase base, const int gg)
get Hdiv of base functions at Gauss pts
virtual MoFEMErrorCode baseSwap(const std::string &field_name, const FieldApproximationBase base)
Swap bases functions.
const VectorInt & getLocalIndices() const
Get local indices of degrees of freedom on entity.
ApproximationOrder oRder
Entity order.
std::vector< EntityType > dofBrokenTypeVec
Map type of entity to dof number.
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3DiffN()
Get derivatives of base functions for tonsorial Hdiv space.
virtual std::map< std::string, boost::shared_ptr< MatrixDouble > > & getBBDiffNMap()
get hash map of derivatives base function for BB base, key is a field name
virtual std::vector< BitRefLevel > & getEntDataBitRefLevel()
Get entity bit reference level.
virtual int getSense() const
Get entity sense for conforming approximation fields.
auto getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
VectorFieldEntities fieldEntities
Field entities.
virtual ~EntData()=default
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N()
Get base function as Tensor0.
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0FieldData()
Return scalar files as a FTensor of rank 0.
MatrixInt & getBBAlphaIndices()
Get file BB indices.
std::array< boost::shared_ptr< MatrixInt >, MaxBernsteinBezierOrder > bbAlphaIndicesByOrder
BB alpha indices by order.
MatrixDouble & getDiffN()
Get derivatives of base functions using default base.
VectorInt & getBBNodeOrder()
Get orders at the nodes.
std::string bbFieldName
field name
virtual boost::shared_ptr< MatrixInt > & getBBAlphaIndicesByOrderSharedPtr(const size_t o)
get ALpha indices for BB base by order
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & diffN
Derivatives of base functions.
std::map< std::string, boost::shared_ptr< MatrixDouble > > bbDiffN
MoFEMErrorCode resetFieldDependentData()
const VectorDofs & getFieldDofs() const
Get DOF data structures (const version)
FTensor::Tensor3< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 *Tensor_Dim2 >, Tensor_Dim0, Tensor_Dim1, Tensor_Dim2 > getFTensor3Diff2N()
Get second derivatives of base functions for Hvec space.
FieldSpace & getSpace()
Get field space.
auto getFTensor1N()
Get base functions for Hdiv space.
auto getFTensor2DiffN2(const int gg, const int bb)
Get second derivatives of scalar base functions at integration pts.
virtual boost::shared_ptr< MatrixDouble > & getBBNSharedPtr(const std::string &field_name)
auto getFTensor2DiffN2(const FieldApproximationBase base, const int gg, const int bb)
Get second derivatives of scalar base functions at integration pts.
std::array< boost::shared_ptr< MatrixDouble >, MaxBernsteinBezierOrder > bbNByOrder
BB base functions by order.
std::array< std::array< boost::shared_ptr< MatrixDouble >, LASTBASE >, LastDerivative > baseFunctionsAndBaseDerivatives
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2DiffN()
Get derivatives of base functions for Hdiv space.
std::map< std::string, boost::shared_ptr< MatrixDouble > > bbN
VectorDofs dOfs
DoFs on entity.
virtual boost::shared_ptr< MatrixDouble > & getDiffNSharedPtr(const FieldApproximationBase base)
Get shared pointer to derivatives of base functions.
auto getFTensor2DiffN2(const FieldApproximationBase base)
Get second derivatives of scalar base functions.
virtual boost::shared_ptr< MatrixDouble > & getBBNByOrderSharedPtr(const size_t o)
get BB base by order
const VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.
auto getFTensor1DiffN(const int gg, const int bb)
Get derivatives of base functions (Loop by integration points)
FieldApproximationBase bAse
Field approximation base.
auto getFTensor1DiffN()
Get derivatives of base functions.
auto getFTensor2DiffN2()
Get second derivatives of scalar base functions.
virtual boost::shared_ptr< MatrixDouble > & getBBDiffNSharedPtr(const std::string &field_name)
std::array< boost::shared_ptr< MatrixDouble >, LASTBASE > & N
Base functions.
data structure for finite element entity
friend std::ostream & operator<<(std::ostream &os, const EntitiesFieldData &e)
MoFEMErrorCode resetFieldDependentData()
Reset data associated with particular field name.
MatrixInt facesNodes
nodes on finite element faces
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
std::bitset< LASTBASE > bAse
bases on element
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
std::array< std::bitset< LASTBASE >, LASTSPACE > basesOnSpaces
base on spaces
virtual ~EntitiesFieldData()=default
virtual MoFEMErrorCode baseSwap(const std::string &field_name, const FieldApproximationBase base)
Swap approximation base.
virtual MoFEMErrorCode setElementType(const EntityType type)
Set element type and initialize data structures.
std::array< std::bitset< LASTBASE >, LASTSPACE > brokenBasesOnSpaces
base on spaces
MatrixInt facesNodesOrder
order of face nodes on element
std::array< std::bitset< LASTBASE >, MBMAXTYPE > basesOnEntities
bases on entity types
keeps information about indexed dofs for the finite element
Struct keeps handle to entity in the field.
Operator to project base functions from parent entity to child.