23 #ifndef __VOLUMEELEMENTFORCESANDSOURCESCORE_HPP__
24 #define __VOLUMEELEMENTFORCESANDSOURCESCORE_HPP__
26 using namespace boost::numeric;
51 inline int getNumNodes();
55 inline const EntityHandle *getConn();
59 inline double getVolume()
const;
63 inline double &getVolume();
79 inline double getMeasure()
const;
85 inline double &getMeasure();
110 inline auto getFTenosr0HoMeasure();
124 inline auto getFTensor1CoordsAtGaussPts();
139 inline auto getFTensor1HoCoordsAtGaussPts();
141 inline auto getFTensor2HoGaussPtsJac();
143 inline auto getFTensor2HoGaussPtsInvJac();
174 getDivergenceOfHDivBaseFunctions(
int side, EntityType
type,
211 getCurlOfHCurlBaseFunctions(
int side, EntityType
type,
222 NO_HO_GEOMETRY = 1 << 0 | 1 << 2,
223 NO_TRANSFORM = 1 << 1 | 1 << 2,
224 NO_HO_TRANSFORM = 1 << 2
232 const EntityType
type = MBTET);
337 template <
int SWITCH>
356 template <
int SWITCH>
360 if (numeredEntFiniteElementPtr->getEntType() != MBTET)
362 CHKERR createDataOnElement();
364 CHKERR calculateVolumeAndJacobian();
365 CHKERR getSpaceBaseAndOrderOnElement();
366 CHKERR setIntegrationPts();
367 if (gaussPts.size2() == 0)
369 CHKERR calculateCoordinatesAtGaussPts();
370 CHKERR calHierarchicalBaseFunctionsOnElement();
371 CHKERR calBernsteinBezierBaseFunctionsOnElement();
373 if (!(NO_TRANSFORM & SWITCH))
374 CHKERR transformBaseFunctions();
376 if (!(NO_HO_GEOMETRY & SWITCH))
377 CHKERR calculateHoJacobian();
379 if (!(NO_HO_TRANSFORM & SWITCH))
380 CHKERR transformHoBaseFunctions();
383 CHKERR loopOverOperators();
388 template <
int SWITCH>
390 return OpSwitch<SWITCH>();
393 int VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getNumNodes() {
398 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getConn() {
403 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getVolume()
const {
407 double &VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getVolume() {
412 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getJac() {
417 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getInvJac() {
422 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getMeasure()
const {
426 double &VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getMeasure() {
431 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getCoords() {
436 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getCoordsAtGaussPts() {
441 MatrixDouble &VolumeElementForcesAndSourcesCoreBase::UserDataOperator::
442 getHoCoordsAtGaussPts() {
444 ->hoCoordsAtGaussPts;
448 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getHoGaussPtsJac() {
454 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getHoGaussPtsInvJac() {
460 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getHoGaussPtsDetJac() {
465 auto VolumeElementForcesAndSourcesCoreBase::UserDataOperator::
466 getFTenosr0HoMeasure() {
468 &*getHoGaussPtsDetJac().data().begin());
471 auto VolumeElementForcesAndSourcesCoreBase::UserDataOperator::
472 getFTensor1CoordsAtGaussPts() {
474 &getCoordsAtGaussPts()(0, 0), &getCoordsAtGaussPts()(0, 1),
475 &getCoordsAtGaussPts()(0, 2));
478 auto VolumeElementForcesAndSourcesCoreBase::UserDataOperator::
479 getFTensor1HoCoordsAtGaussPts() {
480 double *ptr = &*getHoCoordsAtGaussPts().data().begin();
485 auto VolumeElementForcesAndSourcesCoreBase::UserDataOperator::
486 getFTensor2HoGaussPtsJac() {
487 double *ptr = &*getHoGaussPtsJac().
data().begin();
489 ptr, ptr + 1, ptr + 2, ptr + 3, ptr + 4, ptr + 5, ptr + 6, ptr + 7,
493 auto VolumeElementForcesAndSourcesCoreBase::UserDataOperator::
494 getFTensor2HoGaussPtsInvJac() {
495 double *ptr = &*getHoGaussPtsInvJac().data().begin();
497 ptr, ptr + 1, ptr + 2, ptr + 3, ptr + 4, ptr + 5, ptr + 6, ptr + 7,
502 VolumeElementForcesAndSourcesCoreBase::UserDataOperator::getVolumeFE()
const {
ForcesAndSourcesCore::UserDataOperator UserDataOperator
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
ublas::vector< double, DoubleAllocator > VectorDouble
MatrixBoundedArray< double, 9 > MatrixDouble3by3
ublas::matrix< double, ublas::row_major, DoubleAllocator > MatrixDouble
implementation of Data Operators for Forces and Sources
Data on single entity (This is passed as argument to DataOperator::doWork)
Deprecated interface functions.
Data operator to do calculations at integration points.
structure to get information form mofem into DataForcesAndSourcesCore
transform local reference derivatives of shape function to global derivatives if higher order geometr...
transform local reference derivatives of shape function to global derivatives if higher order geometr...
Transform local reference derivatives of shape function to global derivatives.
brief Transform local reference derivatives of shape function to global derivatives
default operator for TET element
Volume finite element base.
FTensor::Tensor2< double *, 3, 3 > tJac
OpGetDataAndGradient< 3, 3 > opHOatGaussPoints
higher order geometry data at Gauss pts
MatrixDouble hoGaussPtsJac
OpSetInvJacHdivAndHcurl opSetInvJacHdivAndHcurl
MatrixDouble coordsAtGaussPts
OpSetHoInvJacH1 opSetHoInvJacH1
OpSetHoInvJacHdivAndHcurl opSetHoInvJacHdivAndHcurl
const EntityHandle * conn
MatrixDouble hoGaussPtsInvJac
OpSetHoContravariantPiolaTransform opHoContravariantTransform
OpSetInvJacH1 opSetInvJacH1
FTensor::Tensor2< double *, 3, 3 > tInvJac
MatrixDouble hoCoordsAtGaussPts
VectorDouble hoGaussPtsDetJac
OpSetContravariantPiolaTransform opContravariantPiolaTransform
std::string meshPositionsFieldName
OpSetCovariantPiolaTransform opCovariantPiolaTransform
OpSetHoCovariantPiolaTransform opHoCovariantTransform
Volume finite element with switches.
VolumeElementForcesAndSourcesCoreSwitch(Interface &m_field, const EntityType type=MBTET)