10#ifndef __ENTITIES_FIELD_DATA_HPP__
11#define __ENTITIES_FIELD_DATA_HPP__
13using namespace boost::numeric;
23using VectorDofs = ublas::vector<FEDofEntity *, DofsAllocator>;
44 std::bitset<LASTBASE>
bAse;
48 std::array<std::bitset<LASTSPACE>, MBMAXTYPE>
50 std::array<std::bitset<LASTBASE>, MBMAXTYPE>
52 std::array<std::bitset<LASTBASE>,
LASTSPACE>
54 std::array<std::bitset<LASTBASE>,
LASTSPACE>
56 std::array<boost::ptr_vector<EntData>, MBMAXTYPE>
132 const boost::shared_ptr<EntitiesFieldData> &data_ptr);
143 const boost::shared_ptr<EntitiesFieldData>
dataPtr;
172 EntData(
const bool allocate_base_matrices =
true);
323 template <
int Tensor_Dim>
339 template <
int Tensor_Dim0,
int Tensor_Dim1>
341 Tensor_Dim0, Tensor_Dim1>
356 template <
int Tensor_Dim>
396 virtual boost::shared_ptr<MatrixDouble> &
406 virtual boost::shared_ptr<MatrixDouble> &
415 virtual boost::shared_ptr<MatrixDouble> &
563 const int gg,
const int nb_base_functions);
588 const int nb_base_functions);
598 const int nb_base_functions);
632 template <
int DIM0,
int DIM1>
642 template <
int DIM0,
int DIM1>
652 template <
int DIM0,
int DIM1>
654 const int dof,
const int gg);
662 template <
int DIM0,
int DIM1>
741 template <
int Tensor_Dim>
761 template <
int Tensor_Dim>
783 template <
int Tensor_Dim>
806 template <
int Tensor_Dim>
835 template <
int Tensor_Dim>
863 template <
int Tensor_Dim0,
int Tensor_Dim1>
865 Tensor_Dim0, Tensor_Dim1>
871 template <
int Tensor_Dim0,
int Tensor_Dim1>
873 Tensor_Dim0, Tensor_Dim1>
878 template <
int Tensor_Dim0,
int Tensor_Dim1>
880 Tensor_Dim0, Tensor_Dim1>
882 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(
bAse);
888 template <
int Tensor_Dim0,
int Tensor_Dim1>
890 Tensor_Dim0, Tensor_Dim1>
892 return getFTensor2DiffN<Tensor_Dim0, Tensor_Dim1>(
bAse, gg, bb);
897 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
900 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
905 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
908 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
910 return getFTensor3Diff2N<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
bAse);
915 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
918 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
924 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
927 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
932 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
935 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
937 return getFTensor3DiffN<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
bAse);
943 template <
int Tensor_Dim0,
int Tensor_Dim1,
int Tensor_Dim2>
946 Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>
948 return getFTensor3DiffN<Tensor_Dim0, Tensor_Dim1, Tensor_Dim2>(
bAse, gg,
966 template <
int Tensor_Dim>
984 template <
int Tensor_Dim>
1013 template <
int Tensor_Dim0,
int Tensor_Dim1>
1015 Tensor_Dim0, Tensor_Dim1>
1040 template <
int Tensor_Dim0,
int Tensor_Dim1>
auto getFTensor2N();
1068 template <
int Tensor_Dim0,
int Tensor_Dim1>
1070 Tensor_Dim0, Tensor_Dim1>
1094 template <
int Tensor_Dim0,
int Tensor_Dim1>
1103 friend std::ostream &
operator<<(std::ostream &os,
1132 virtual boost::shared_ptr<MatrixInt> &
1138 virtual boost::shared_ptr<MatrixDouble> &
1144 virtual const boost::shared_ptr<MatrixDouble> &
1150 virtual boost::shared_ptr<MatrixDouble> &
1156 virtual const boost::shared_ptr<MatrixDouble> &
1159 virtual std::map<std::string, boost::shared_ptr<MatrixInt>> &
1167 virtual std::map<std::string, boost::shared_ptr<MatrixDouble>> &
getBBNMap();
1175 virtual std::map<std::string, boost::shared_ptr<MatrixDouble>> &
1184 virtual boost::shared_ptr<MatrixInt> &
1193 virtual boost::shared_ptr<MatrixDouble> &
1202 virtual boost::shared_ptr<MatrixDouble> &
1249 std::vector<EntityType>
1252 std::array<std::array<boost::shared_ptr<MatrixDouble>,
LASTBASE>,
1257 std::array<boost::shared_ptr<MatrixDouble>,
LASTBASE>
1262 std::map<std::string, boost::shared_ptr<MatrixDouble>>
bbN;
1263 std::map<std::string, boost::shared_ptr<MatrixDouble>>
bbDiffN;
1264 std::map<std::string, boost::shared_ptr<MatrixInt>>
1308 const boost::shared_ptr<EntitiesFieldData::EntData> &ent_data_ptr);
1315 boost::shared_ptr<MatrixDouble> &
1319 boost::shared_ptr<MatrixDouble> &
1322 boost::shared_ptr<MatrixDouble> &
1325 const boost::shared_ptr<MatrixDouble> &
1328 const boost::shared_ptr<MatrixDouble> &
1331 inline boost::shared_ptr<MatrixDouble> &
1334 inline boost::shared_ptr<MatrixDouble> &
1337 boost::shared_ptr<MatrixInt> &
1343 boost::shared_ptr<MatrixDouble> &
1349 const boost::shared_ptr<MatrixDouble> &
1355 boost::shared_ptr<MatrixDouble> &
1361 const boost::shared_ptr<MatrixDouble> &
1388 unsigned int size = 0;
1389 if (
auto dof = dOfs[0]) {
1390 size = dof->getOrderNbDofs(
order) * dof->getNbOfCoeffs();
1391 size = size < iNdices.size() ? size : iNdices.size();
1393 int *data = &*iNdices.data().begin();
1394 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1398 return localIndices;
1403 unsigned int size = 0;
1404 if (
auto dof = dOfs[0]) {
1405 size = dof->getOrderNbDofs(
order) * dof->getNbOfCoeffs();
1406 size = size < localIndices.size() ? size : localIndices.size();
1408 int *data = &*localIndices.data().begin();
1409 return VectorIntAdaptor(size, ublas::shallow_array_adaptor<int>(size, data));
1419 return localIndices;
1428 unsigned int size = 0;
1429 if (
auto dof = dOfs[0]) {
1430 size = dof->getOrderNbDofs(
order) * dof->getNbOfCoeffs();
1431 size = size < fieldData.size() ? size : fieldData.size();
1433 double *data = &*fieldData.data().begin();
1446 return fieldEntities;
1451 return fieldEntities;
1454template <
int Tensor_Dim>
1457 std::stringstream s;
1458 s <<
"Not implemented for this dimension dim = " << Tensor_Dim;
1462template <
int Tensor_Dim0,
int Tensor_Dim1>
1464 Tensor_Dim0, Tensor_Dim1>
1466 std::stringstream s;
1467 s <<
"Not implemented for this dimension dim0 = " << Tensor_Dim0;
1468 s <<
" and dim1 " << Tensor_Dim1;
1472template <
int Tensor_Dim>
1474 FTensor::PackPtr<
double *, (Tensor_Dim * (Tensor_Dim + 1)) / 2>, Tensor_Dim>
1476 std::stringstream s;
1477 s <<
"Not implemented for this dimension dim = " << Tensor_Dim;
1488 if (!getNSharedPtr(base)) {
1489 MOFEM_LOG_C(
"SELF", Sev::error,
"Ptr to base %s functions is null",
1492 "Null pointer to base functions");
1495 return *(getNSharedPtr(base));
1501 MOFEM_LOG_C(
"SELF", Sev::error,
"Ptr to field %s base functions is null ",
1504 "Null pointer to base functions");
1514 return *(getDiffNSharedPtr(base));
1521 if (!getNSharedPtr(base, derivative)) {
1523 "Ptr to base %s functions derivative %d is null",
1528 return *(getNSharedPtr(base, derivative));
1536 "Null pointer to base functions derivative");
1546 return getN(
bAse, derivative);
1552 int size = getN(base).size2();
1553 double *data = &getN(base)(gg, 0);
1554 return VectorAdaptor(size, ublas::shallow_array_adaptor<double>(size, data));
1558 return getN(
bAse, gg);
1567 if (getN(base).size1() == getDiffN(base).size1()) {
1568 int size = getN(base).size2();
1569 int dim = getDiffN(base).size2() / size;
1570 double *data = &getDiffN(base)(gg, 0);
1572 getN(base).size2(), dim,
1573 ublas::shallow_array_adaptor<double>(getDiffN(base).size2(), data));
1578 getN(base).size1(), getN(base).size2(),
1579 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1580 &getDiffN(base).data()[0]));
1585 return getDiffN(
bAse, gg);
1590 const int gg,
const int nb_base_functions) {
1591 (void)getN()(gg, nb_base_functions -
1593 double *data = &getN(base)(gg, 0);
1594 return VectorAdaptor(nb_base_functions, ublas::shallow_array_adaptor<double>(
1595 nb_base_functions, data));
1600 return getN(
bAse, gg, nb_base_functions);
1606 const int nb_base_functions) {
1610 if (getN(base).size1() == getDiffN(base).size1()) {
1611 (void)getN(base)(gg,
1614 int dim = getDiffN(base).size2() / getN(base).size2();
1615 double *data = &getDiffN(base)(gg, 0);
1617 nb_base_functions, dim,
1618 ublas::shallow_array_adaptor<double>(dim * nb_base_functions, data));
1623 getN(base).size1(), getN(base).size2(),
1624 ublas::shallow_array_adaptor<double>(getDiffN(base).data().size(),
1625 &getDiffN(base).data()[0]));
1631 const int nb_base_functions) {
1632 return getDiffN(
bAse, gg, nb_base_functions);
1639 if (PetscUnlikely(getN(base).size2() % DIM)) {
1643 const int nb_base_functions = getN(base).size2() / DIM;
1644 double *data = &getN(base)(gg, 0);
1646 nb_base_functions, DIM,
1647 ublas::shallow_array_adaptor<double>(DIM * nb_base_functions, data));
1652 return getVectorN<DIM>(
bAse, gg);
1655template <
int DIM0,
int DIM1>
1659 if (PetscUnlikely(getDiffN(base).size2() % (DIM0 *
DIM1))) {
1663 const int nb_base_functions = getN(base).size2() / (DIM0 *
DIM1);
1664 double *data = &getN(base)(gg, 0);
1666 ublas::shallow_array_adaptor<double>(
1667 DIM0 *
DIM1 * nb_base_functions, data));
1670template <
int DIM0,
int DIM1>
1672 return getVectorDiffN<DIM0, DIM1>(
bAse, gg);
1675template <
int DIM0,
int DIM1>
1678 const int dof,
const int gg) {
1682 ublas::shallow_array_adaptor<double>(DIM0 *
DIM1, data));
1685template <
int DIM0,
int DIM1>
1688 return getVectorDiffN<DIM0, DIM1>(
bAse, dof, gg);
1693 double *ptr = &*getN(base).data().begin();
1699 return getFTensor0N(
bAse);
1704 const int gg,
const int bb) {
1705 double *ptr = &getN(base)(gg, bb);
1711 return getFTensor0N(
bAse, gg, bb);
1715 return getFTensor1N<Tensor_Dim>(
bAse);
1718template <
int Tensor_Dim>
1720 return getFTensor1N<Tensor_Dim>(
bAse, gg, bb);
1723template <
int Tensor_Dim0,
int Tensor_Dim1>
1725 return getFTensor2N<Tensor_Dim0, Tensor_Dim1>(
bAse);
1728template <
int Tensor_Dim0,
int Tensor_Dim1>
1730 return getFTensor2N<Tensor_Dim0, Tensor_Dim1>(
bAse, gg, bb);
1740 return *getBBAlphaIndicesSharedPtr(bbFieldName);
1749boost::shared_ptr<MatrixDouble> &
1755boost::shared_ptr<MatrixDouble> &
1778template <
typename T = EntityStorage>
1781 const double *ptr, InsertMode iora) {
1782 static_assert(!std::is_same<T, T>::value,
1783 "VecSetValues value for this data storage is not implemented");
1790 const double *ptr, InsertMode iora) {
1810template <
typename T = EntityStorage>
1814 return VecSetValues<T>(V, data, &*vec.data().begin(), iora);
1833template <
typename T = EntityStorage>
1837 const double *ptr, InsertMode iora) {
1838 static_assert(!std::is_same<T, T>::value,
1839 "MatSetValues value for this data storage is not implemented");
1859template <
typename T = EntityStorage>
1864 return MatSetValues<T>(M, row_data, col_data, &*mat.data().begin(), iora);
1871 const double *ptr, InsertMode iora) {
1888 const int gg,
const int bb);
1902EntitiesFieldData::EntData::getFTensor1DiffN<3>(
1906EntitiesFieldData::EntData::getFTensor1DiffN<3>();
1910EntitiesFieldData::EntData::getFTensor1DiffN<2>(
1914EntitiesFieldData::EntData::getFTensor1DiffN<2>();
1922 const int gg,
const int bb);
1929 const int gg,
const int bb);
1942 const int gg,
const int bb);
1952EntitiesFieldData::EntData::getFTensor1FieldData<3>();
1956EntitiesFieldData::EntData::getFTensor1FieldData<2>();
1960EntitiesFieldData::EntData::getFTensor1FieldData<1>();
1964EntitiesFieldData::EntData::getFTensor2FieldData<1, 1>();
1968EntitiesFieldData::EntData::getFTensor2FieldData<1, 2>();
1972EntitiesFieldData::EntData::getFTensor2FieldData<1, 3>();
1976EntitiesFieldData::EntData::getFTensor2FieldData<2, 2>();
1980EntitiesFieldData::EntData::getFTensor2FieldData<3, 3>();
1984EntitiesFieldData::EntData::getFTensor2SymmetricFieldData<3>();
1988EntitiesFieldData::EntData::getFTensor2SymmetricFieldData<2>();
#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.
VectorShallowArrayAdaptor< int > VectorIntAdaptor
int ApproximationOrder
Approximation on the entity.
VectorShallowArrayAdaptor< double > VectorAdaptor
UBlasMatrix< double > MatrixDouble
UBlasVector< double > VectorDouble
MatrixShallowArrayAdaptor< double > MatrixAdaptor
Matrix adaptor.
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)
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.
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.
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const int gg, const int bb)
Get derivatives of base functions (Loop by integration points)
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)
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)
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.
const VectorAdaptor getFieldDataUpToOrder(int order)
Get DOF values on entity up to given order.
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN()
Get derivatives of base functions.
std::vector< BitRefLevel > entDataBitRefLevel
Bit ref level in entity.
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.
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.
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.
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1FieldData()
Return FTensor of rank 1, i.e. vector from field data coefficients.
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.
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::Tensor2_symmetric< FTensor::PackPtr< double *,(Tensor_Dim *(Tensor_Dim+1))/2 >, Tensor_Dim > getFTensor2SymmetricFieldData()
Return symmetric FTensor rank 2, i.e. matrix from field data coefficients.
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.
virtual boost::shared_ptr< MatrixDouble > & getBBNSharedPtr(const std::string &field_name)
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.
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2FieldData()
Return FTensor rank 2, i.e. matrix from field data coefficients.
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.
FieldApproximationBase bAse
Field approximation base.
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.