v0.8.23
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
MoFEM::ForcesAndSourcesCore Struct Reference

structure to get information form mofem into DataForcesAndSourcesCore More...

#include <src/finite_elements/ForcesAndSourcesCore.hpp>

Inheritance diagram for MoFEM::ForcesAndSourcesCore:
[legend]
Collaboration diagram for MoFEM::ForcesAndSourcesCore:
[legend]

Classes

struct  UserDataOperator
 Data operator to do calculations at integration points.Is inherited and implemented by user to do calculations. It can be used in many different ways but typically is used to integrate matrices (f.e. stiffness matrix) and the right hand vector (f.e. force vector). More...
 

Public Types

typedef boost::function< int(int order_row, int order_col, int order_data)> RuleHookFun
 
- Public Types inherited from MoFEM::KspMethod
enum  KSPContext { CTX_SETFUNCTION, CTX_OPERATORS, CTX_KSPNONE }
 pass information about context of KSP/DM for with finite element is computed More...
 
- Public Types inherited from MoFEM::SnesMethod
enum  SNESContext { CTX_SNESSETFUNCTION, CTX_SNESSETJACOBIAN, CTX_SNESNONE }
 
- Public Types inherited from MoFEM::TSMethod
enum  TSContext {
  CTX_TSSETRHSFUNCTION, CTX_TSSETRHSJACOBIAN, CTX_TSSETIFUNCTION, CTX_TSSETIJACOBIAN,
  CTX_TSTSMONITORSET, CTX_TSNONE
}
 

Public Member Functions

 ForcesAndSourcesCore (Interface &m_field)
 
virtual ~ForcesAndSourcesCore ()
 
MoFEMErrorCode getNumberOfNodes (int &num_nodes) const
 
int getMaxDataOrder () const
 Get max order of approximation for data fields. More...
 
int getMaxRowOrder () const
 Get max order of approximation for field in rows. More...
 
int getMaxColOrder () const
 Get max order of approximation for field in columns. More...
 
MoFEMErrorCode getEntitySense (const EntityType type, boost::ptr_vector< DataForcesAndSourcesCore::EntData > &data) const
 get sense (orientation) of entity More...
 
MoFEMErrorCode getEntityDataOrder (const EntityType type, const FieldSpace space, boost::ptr_vector< DataForcesAndSourcesCore::EntData > &data) const
 Get the entity data order. More...
 
template<EntityType type>
MoFEMErrorCode getEntitySense (DataForcesAndSourcesCore &data) const
 Get the entity sense (orientation) More...
 
template<EntityType type>
MoFEMErrorCode getEntityDataOrder (DataForcesAndSourcesCore &data, const FieldSpace space) const
 Get the entity data order for given space. More...
 
MoFEMErrorCode getNodesIndices (const boost::string_ref field_name, FENumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices, VectorInt &local_nodes_indices) const
 get node indices More...
 
MoFEMErrorCode getRowNodesIndices (DataForcesAndSourcesCore &data, const std::string &field_name) const
 get row node indices from FENumeredDofEntity_multiIndex More...
 
MoFEMErrorCode getColNodesIndices (DataForcesAndSourcesCore &data, const std::string &field_name) const
 get col node indices from FENumeredDofEntity_multiIndex More...
 
MoFEMErrorCode getEntityIndices (DataForcesAndSourcesCore &data, const std::string &field_name, FENumeredDofEntity_multiIndex &dofs, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
 
MoFEMErrorCode getEntityRowIndices (DataForcesAndSourcesCore &data, const std::string &field_name, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
 
MoFEMErrorCode getEntityColIndices (DataForcesAndSourcesCore &data, const std::string &field_name, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
 
MoFEMErrorCode getNoFieldIndices (const std::string &field_name, FENumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices) const
 get NoField indices More...
 
MoFEMErrorCode getNoFieldRowIndices (DataForcesAndSourcesCore &data, const std::string &field_name) const
 get col NoField indices More...
 
MoFEMErrorCode getNoFieldColIndices (DataForcesAndSourcesCore &data, const std::string &field_name) const
 get col NoField indices More...
 
MoFEMErrorCode getNodesFieldData (const boost::string_ref field_name, FEDofEntity_multiIndex &dofs, VectorDouble &nodes_data, VectorDofs &nodes_dofs, FieldSpace &space, FieldApproximationBase &base) const
 Get field data on nodes. More...
 
MoFEMErrorCode getNoFieldFieldData (const boost::string_ref field_name, FEDofEntity_multiIndex &dofs, VectorDouble &ent_field_data, VectorDofs &ent_field_dofs) const
 
MoFEMErrorCode getNoFieldFieldData (DataForcesAndSourcesCore &data, const boost::string_ref field_name) const
 
MoFEMErrorCode getNodesFieldData (DataForcesAndSourcesCore &data, const std::string &field_name) const
 Get data on nodes. More...
 
MoFEMErrorCode getEntityFieldData (DataForcesAndSourcesCore &data, const std::string &field_name, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
 
MoFEMErrorCode getFaceTriNodes (DataForcesAndSourcesCore &data) const
 Get nodes on triangles. More...
 
MoFEMErrorCode getSpacesAndBaseOnEntities (DataForcesAndSourcesCore &data) const
 Get field approximation space and base on entities. More...
 
MoFEMErrorCode getProblemNodesIndices (const std::string &field_name, const NumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices) const
 get indices of nodal indices which are declared for problem but not this particular element More...
 
MoFEMErrorCode getProblemTypeIndices (const std::string &field_name, const NumeredDofEntity_multiIndex &dofs, EntityType type, int side_number, VectorInt &indices) const
 get indices by type (generic function) which are declared for problem but not this particular element More...
 
MoFEMErrorCode getProblemNodesRowIndices (const std::string &field_name, VectorInt &nodes_indices) const
 
MoFEMErrorCode getProblemTypeRowIndices (const std::string &field_name, EntityType type, int side_number, VectorInt &indices) const
 
MoFEMErrorCode getProblemNodesColIndices (const std::string &field_name, VectorInt &nodes_indices) const
 
MoFEMErrorCode getProblemTypeColIndices (const std::string &field_name, EntityType type, int side_number, VectorInt &indices) const
 
virtual int getRule (int order_row, int order_col, int order_data)
 another variant of getRule More...
 
virtual MoFEMErrorCode setGaussPts (int order_row, int order_col, int order_data)
 set user specific integration rule More...
 
boost::ptr_vector< UserDataOperator > & getOpPtrVector ()
 Use to push back operator for row operator. More...
 
auto & getElementPolynomialBase ()
 Get the Entity Polynomial Base object. More...
 
auto & getUserPolynomialBase ()
 Get the User Polynomial Base object. More...
 
virtual MoFEMErrorCode preProcess ()
 function is run at the beginning of loop More...
 
virtual MoFEMErrorCode operator() ()
 function is run for every finite element More...
 
virtual MoFEMErrorCode postProcess ()
 function is run at the end of loop More...
 
MoFEMErrorCode calculateBaseFunctionsOnElement (const FieldApproximationBase b)
 Calculate base functions. More...
 
MoFEMErrorCode calculateBaseFunctionsOnElement ()
 Calculate base functions. More...
 
MoFEMErrorCode createDataOnElement ()
 Create a entity data on element object. More...
 
MoFEMErrorCode loopOverOperators ()
 Iterate user data operators. More...
 
- Public Member Functions inherited from MoFEM::FEMethod
MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 FEMethod ()
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_begin (const MULTIINDEX &index, const std::string &field_name, const EntityType type, const int side_number) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_end (const MULTIINDEX &index, const std::string &field_name, const EntityType type, const int side_number) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_begin (const MULTIINDEX &index, const std::string &field_name, const EntityType type) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_end (const MULTIINDEX &index, const std::string &field_name, const EntityType type) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_begin (const MULTIINDEX &index, const std::string &field_name) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_end (const MULTIINDEX &index, const std::string &field_name) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_begin (const MULTIINDEX &index, const EntityHandle ent) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_end (const MULTIINDEX &index, const EntityHandle ent) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_begin (const MULTIINDEX &index, const std::string &field_name, const EntityHandle ent) const
 
template<class MULTIINDEX >
MULTIINDEX::iterator get_end (const MULTIINDEX &index, const std::string &field_name, const EntityHandle ent) const
 
- Public Member Functions inherited from MoFEM::BasicMethod
 BasicMethod ()
 
virtual ~BasicMethod ()
 
int getNinTheLoop () const
 get number of evaluated element in the loop More...
 
int getLoopSize () const
 get loop size More...
 
MoFEMErrorCode copyBasicMethod (const BasicMethod &basic)
 Copy data from other base method to this base method. More...
 
- Public Member Functions inherited from MoFEM::KspMethod
 KspMethod ()
 
virtual ~KspMethod ()
 
MoFEMErrorCode setKspCtx (const KSPContext &ctx)
 set operator type More...
 
MoFEMErrorCode setKsp (KSP ksp)
 set solver More...
 
MoFEMErrorCode copyKsp (const KspMethod &ksp)
 copy data form another method More...
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface refernce to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface. More...
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface. More...
 
virtual ~UnknownInterface ()
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 
- Public Member Functions inherited from MoFEM::SnesMethod
 SnesMethod ()
 
virtual ~SnesMethod ()
 
MoFEMErrorCode setSnesCtx (const SNESContext &ctx)
 Set SNES context. More...
 
MoFEMErrorCode setSnes (SNES snes)
 Set SNES instance. More...
 
MoFEMErrorCode copySnes (const SnesMethod &snes)
 Copy snes data. More...
 
- Public Member Functions inherited from MoFEM::TSMethod
 TSMethod ()
 
virtual ~TSMethod ()
 
MoFEMErrorCode setTsCtx (const TSContext &ctx)
 Set Ts context. More...
 
MoFEMErrorCode copyTs (const TSMethod &ts)
 Copy TS solver data. More...
 
MoFEMErrorCode setTs (TS _ts)
 Set TS solver. More...
 

Public Attributes

InterfacemField
 
const boost::shared_ptr< DataForcesAndSourcesCoredataOnElement [LASTSPACE]
 Entity data on element entity rows fields. More...
 
const boost::shared_ptr< DataForcesAndSourcesCorederivedDataOnElement [LASTSPACE]
 Entity data on element entity columns fields. More...
 
DataForcesAndSourcesCoredataNoField
 
DataForcesAndSourcesCoredataH1
 
DataForcesAndSourcesCoredataHcurl
 
DataForcesAndSourcesCoredataHdiv
 
DataForcesAndSourcesCoredataL2
 
RuleHookFun getRuleHook
 Hook to get rule. More...
 
RuleHookFun setRuleHook
 Set function to calculate integration rule. More...
 
boost::ptr_vector< UserDataOperatoropPtrVector
 Vector of finite element users data operators. More...
 
MatrixDouble gaussPts
 Matrix of integration points. More...
 
- Public Attributes inherited from MoFEM::FEMethod
std::string feName
 Name of finite element. More...
 
boost::shared_ptr< const NumeredEntFiniteElementnumeredEntFiniteElementPtr
 
boost::shared_ptr< const FENumeredDofEntity_multiIndexrowPtr
 Pointer to finite element rows dofs view. More...
 
boost::shared_ptr< const FENumeredDofEntity_multiIndexcolPtr
 Pointer to finite element columns dofs view. More...
 
boost::shared_ptr< const FEDofEntity_multiIndexdataPtr
 Pointer to finite element data dofs. More...
 
boost::shared_ptr< const FieldEntity_vector_viewrowFieldEntsPtr
 Pointer to finite element field entities row view. More...
 
boost::shared_ptr< const FieldEntity_vector_viewcolFieldEntsPtr
 Pointer to finite element field entities column view. More...
 
boost::shared_ptr< const FieldEntity_multiIndex_spaceType_viewdataFieldEntsPtr
 Pointer to finite element field entities data view. More...
 
- Public Attributes inherited from MoFEM::BasicMethod
int nInTheLoop
 number currently of processed method More...
 
int loopSize
 local number oe methods to process More...
 
int rAnk
 processor rank More...
 
int sIze
 number of processors in communicator More...
 
const RefEntity_multiIndexrefinedEntitiesPtr
 container of mofem dof entities More...
 
const RefElement_multiIndexrefinedFiniteElementsPtr
 container of mofem finite element entities More...
 
const ProblemproblemPtr
 raw pointer to problem More...
 
const Field_multiIndexfieldsPtr
 raw pointer to fields container More...
 
const FieldEntity_multiIndexentitiesPtr
 raw pointer to container of field entities More...
 
const DofEntity_multiIndexdofsPtr
 raw pointer container of dofs More...
 
const FiniteElement_multiIndexfiniteElementsPtr
 raw pointer to container finite elements More...
 
const EntFiniteElement_multiIndexfiniteElementsEntitiesPtr
 
const FieldEntityEntFiniteElementAdjacencyMap_multiIndexadjacenciesPtr
 
boost::function< MoFEMErrorCode()> preProcessHook
 Hook function for pre-processing. More...
 
boost::function< MoFEMErrorCode()> postProcessHook
 Hook function for post-processing. More...
 
boost::function< MoFEMErrorCode()> operatorHook
 Hook function for operator. More...
 
boost::movelib::unique_ptr< boolvecAssembleSwitch
 
boost::movelib::unique_ptr< boolmatAssembleSwitch
 
- Public Attributes inherited from MoFEM::KspMethod
KSPContext ksp_ctx
 Context. More...
 
KSP ksp
 KSP solver. More...
 
Vec ksp_f
 the right hand side vector More...
 
Mat ksp_A
 matrix More...
 
Mat ksp_B
 preconditioner matrix More...
 
- Public Attributes inherited from MoFEM::SnesMethod
SNESContext snes_ctx
 
SNES snes
 
Vec snes_x
 
Vec snes_f
 
Mat snes_A
 
Mat snes_B
 
- Public Attributes inherited from MoFEM::TSMethod
TSContext ts_ctx
 
TS ts
 
Vec ts_u
 
Vec ts_u_t
 
Vec ts_F
 
Mat ts_A
 
Mat ts_B
 
PetscInt ts_step
 
PetscReal ts_a
 
PetscReal ts_t
 

Deprecated (do not use)

EntityType lastEvaluatedElementEntityType
 Last evaluated type of element entity. More...
 
boost::shared_ptr< BaseFunctionelementPolynomialBasePtr
 Pointer to entity polynomial base. More...
 
boost::shared_ptr< BaseFunctionuserPolynomialBasePtr
 Pointer to user polynomail base. More...
 
virtual int getRule (int order)
 
virtual MoFEMErrorCode setGaussPts (int order)
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

structure to get information form mofem into DataForcesAndSourcesCore

Examples
EshelbianPlasticity.cpp, and hello_world.cpp.

Definition at line 34 of file ForcesAndSourcesCore.hpp.

Member Typedef Documentation

◆ RuleHookFun

typedef boost::function<int(int order_row, int order_col, int order_data)> MoFEM::ForcesAndSourcesCore::RuleHookFun

Definition at line 264 of file ForcesAndSourcesCore.hpp.

Constructor & Destructor Documentation

◆ ForcesAndSourcesCore()

MoFEM::ForcesAndSourcesCore::ForcesAndSourcesCore ( Interface m_field)

Definition at line 33 of file ForcesAndSourcesCore.cpp.

34  :
35 
36  mField(m_field),
38 
39  nullptr,
40  boost::shared_ptr<DataForcesAndSourcesCore>(
41  new DataForcesAndSourcesCore(MBENTITYSET)), // NOFIELD
42  boost::shared_ptr<DataForcesAndSourcesCore>(
43  new DataForcesAndSourcesCore(MBENTITYSET)), // H1
44  boost::shared_ptr<DataForcesAndSourcesCore>(
45  new DataForcesAndSourcesCore(MBENTITYSET)), // HCURL
46  boost::shared_ptr<DataForcesAndSourcesCore>(
47  new DataForcesAndSourcesCore(MBENTITYSET)), // HDIV
48  boost::shared_ptr<DataForcesAndSourcesCore>(
49  new DataForcesAndSourcesCore(MBENTITYSET)) // L2
50 
51  },
53 
54  nullptr,
55  boost::shared_ptr<DataForcesAndSourcesCore>(
56  new DerivedDataForcesAndSourcesCore(dataOnElement[NOFIELD])),
57  boost::shared_ptr<DataForcesAndSourcesCore>(
58  new DerivedDataForcesAndSourcesCore(dataOnElement[H1])),
59  boost::shared_ptr<DataForcesAndSourcesCore>(
60  new DerivedDataForcesAndSourcesCore(dataOnElement[HCURL])),
61  boost::shared_ptr<DataForcesAndSourcesCore>(
62  new DerivedDataForcesAndSourcesCore(dataOnElement[HDIV])),
63  boost::shared_ptr<DataForcesAndSourcesCore>(
64  new DerivedDataForcesAndSourcesCore(dataOnElement[L2]))
65 
66  },
69  dataHdiv(*dataOnElement[HDIV].get()), dataL2(*dataOnElement[L2].get()),
70  getRuleHook(0), setRuleHook(0),
71  lastEvaluatedElementEntityType(MBMAXTYPE) {}
DataForcesAndSourcesCore & dataL2
field with continuous normal traction
Definition: definitions.h:172
DataForcesAndSourcesCore & dataH1
const boost::shared_ptr< DataForcesAndSourcesCore > derivedDataOnElement[LASTSPACE]
Entity data on element entity columns fields.
scalar or vector of scalars describe (no true field)
Definition: definitions.h:169
const boost::shared_ptr< DataForcesAndSourcesCore > dataOnElement[LASTSPACE]
Entity data on element entity rows fields.
RuleHookFun getRuleHook
Hook to get rule.
DataForcesAndSourcesCore & dataHcurl
EntityType lastEvaluatedElementEntityType
Last evaluated type of element entity.
field with continuous tangents
Definition: definitions.h:171
DataForcesAndSourcesCore & dataHdiv
continuous field
Definition: definitions.h:170
RuleHookFun setRuleHook
Set function to calculate integration rule.
field with C-1 continuity
Definition: definitions.h:173
DataForcesAndSourcesCore & dataNoField

◆ ~ForcesAndSourcesCore()

virtual MoFEM::ForcesAndSourcesCore::~ForcesAndSourcesCore ( )
virtual

Definition at line 63 of file ForcesAndSourcesCore.hpp.

63 {}

Member Function Documentation

◆ calculateBaseFunctionsOnElement() [1/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::calculateBaseFunctionsOnElement ( const FieldApproximationBase  b)

Calculate base functions.

Returns
Error code

Definition at line 800 of file ForcesAndSourcesCore.cpp.

801  {
803  if (dataOnElement[H1]->bAse.test(b)) {
804  switch (static_cast<FieldApproximationBase>(b)) {
805  case NOBASE:
806  break;
810  if (!getElementPolynomialBase()) {
811  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
812  "Functions genrating approximation base not defined");
813  }
814  for (int space = H1; space != LASTSPACE; ++space) {
815  if (dataOnElement[H1]->sPace.test(space) &&
816  dataOnElement[H1]->bAse.test(b) &&
817  dataOnElement[H1]->basesOnSpaces[space].test(b)) {
818  CHKERR getElementPolynomialBase()->getValue(
819  gaussPts,
820  boost::shared_ptr<BaseFunctionCtx>(new EntPolynomialBaseCtx(
821  *dataOnElement[space], static_cast<FieldSpace>(space),
822  static_cast<FieldApproximationBase>(b), NOBASE)));
823  }
824  }
825  break;
826  case USER_BASE:
827  if (!getUserPolynomialBase()) {
828  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
829  "Functions genrating user approximation base not defined");
830  }
831  for (int space = H1; space != LASTSPACE; ++space)
832  if (dataOnElement[H1]->sPace.test(space) &&
833  dataOnElement[H1]->bAse.test(b) &&
834  dataOnElement[H1]->basesOnSpaces[space].test(b)) {
835  CHKERR getUserPolynomialBase()->getValue(
836  gaussPts,
837  boost::shared_ptr<BaseFunctionCtx>(new EntPolynomialBaseCtx(
838  *dataOnElement[space], static_cast<FieldSpace>(space),
839  static_cast<FieldApproximationBase>(b), NOBASE)));
840  }
841  break;
842  default:
844  "Base <%s> not yet implemented",
845  ApproximationBaseNames[static_cast<FieldApproximationBase>(b)]);
846  }
847  }
849 }
MatrixDouble gaussPts
Matrix of integration points.
user implemented approximation base
Definition: definitions.h:153
auto & getUserPolynomialBase()
Get the User Polynomial Base object.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
const boost::shared_ptr< DataForcesAndSourcesCore > dataOnElement[LASTSPACE]
Entity data on element entity rows fields.
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:174
static const char *const ApproximationBaseNames[]
Definition: definitions.h:157
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:144
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406
virtual MPI_Comm & get_comm() const =0
continuous field
Definition: definitions.h:170
auto & getElementPolynomialBase()
Get the Entity Polynomial Base object.

◆ calculateBaseFunctionsOnElement() [2/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::calculateBaseFunctionsOnElement ( )

Calculate base functions.

Returns
Error code

Definition at line 851 of file ForcesAndSourcesCore.cpp.

851  {
853  /// Use the some node base. Node base is usually used for construction other
854  /// bases.
855  for (int space = HCURL; space != LASTSPACE; ++space) {
856  dataOnElement[space]->dataOnEntities[MBVERTEX][0].getNSharedPtr(NOBASE) =
857  dataOnElement[H1]->dataOnEntities[MBVERTEX][0].getNSharedPtr(NOBASE);
858  }
859  for (int b = AINSWORTH_LEGENDRE_BASE; b != LASTBASE; b++) {
861  static_cast<FieldApproximationBase>(b));
862  }
864 }
MoFEMErrorCode calculateBaseFunctionsOnElement()
Calculate base functions.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
const boost::shared_ptr< DataForcesAndSourcesCore > dataOnElement[LASTSPACE]
Entity data on element entity rows fields.
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:174
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:144
field with continuous tangents
Definition: definitions.h:171
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406
continuous field
Definition: definitions.h:170

◆ createDataOnElement()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::createDataOnElement ( )

Create a entity data on element object.

Returns
MoFEMErrorCode

Definition at line 866 of file ForcesAndSourcesCore.cpp.

866  {
868 
869  const EntityType type = numeredEntFiniteElementPtr->getEntType();
870  if (type == lastEvaluatedElementEntityType)
872 
873  // Data on elements for proper spaces
874  for (int space = H1; space != LASTSPACE; ++space) {
875  dataOnElement[space]->setElementType(type);
876  derivedDataOnElement[space]->setElementType(type);
877  }
878 
880 
882 }
const boost::shared_ptr< DataForcesAndSourcesCore > derivedDataOnElement[LASTSPACE]
Entity data on element entity columns fields.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
const boost::shared_ptr< DataForcesAndSourcesCore > dataOnElement[LASTSPACE]
Entity data on element entity rows fields.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:174
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
EntityType lastEvaluatedElementEntityType
Last evaluated type of element entity.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406
continuous field
Definition: definitions.h:170

◆ getColNodesIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getColNodesIndices ( DataForcesAndSourcesCore data,
const std::string &  field_name 
) const

get col node indices from FENumeredDofEntity_multiIndex

Definition at line 263 of file ForcesAndSourcesCore.cpp.

264  {
265  return getNodesIndices(field_name,
266  const_cast<FENumeredDofEntity_multiIndex &>(
267  numeredEntFiniteElementPtr->getColsDofs()),
268  data.dataOnEntities[MBVERTEX][0].getIndices(),
269  data.dataOnEntities[MBVERTEX][0].getLocalIndices());
270 }
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
MoFEMErrorCode getNodesIndices(const boost::string_ref field_name, FENumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices, VectorInt &local_nodes_indices) const
get node indices

◆ getElementPolynomialBase()

auto& MoFEM::ForcesAndSourcesCore::getElementPolynomialBase ( )

Get the Entity Polynomial Base object.

Returns
boost::shared_ptr<BaseFunction>&&

Definition at line 642 of file ForcesAndSourcesCore.hpp.

642 { return elementPolynomialBasePtr; }
boost::shared_ptr< BaseFunction > elementPolynomialBasePtr
Pointer to entity polynomial base.

◆ getEntityColIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntityColIndices ( DataForcesAndSourcesCore data,
const std::string &  field_name,
const EntityType  type_lo = MBVERTEX,
const EntityType  type_hi = MBPOLYHEDRON 
) const

Definition at line 167 of file ForcesAndSourcesCore.hpp.

170  {
171  return getEntityIndices(data, field_name,
172  const_cast<FENumeredDofEntity_multiIndex &>(
173  numeredEntFiniteElementPtr->getColsDofs()),
174  type_lo, type_hi);
175  }
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
MoFEMErrorCode getEntityIndices(DataForcesAndSourcesCore &data, const std::string &field_name, FENumeredDofEntity_multiIndex &dofs, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const

◆ getEntityDataOrder() [1/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntityDataOrder ( const EntityType  type,
const FieldSpace  space,
boost::ptr_vector< DataForcesAndSourcesCore::EntData > &  data 
) const

Get the entity data order.

Parameters
type
space
data
Returns
MoFEMErrorCode

Definition at line 154 of file ForcesAndSourcesCore.cpp.

156  {
158 
159  auto &side_table = numeredEntFiniteElementPtr->getSideNumberTable();
160 
161  for (unsigned int s = 0; s != data.size(); ++s)
162  data[s].getDataOrder() = 0;
163 
164  auto &fields_ents =
165  dataFieldEntsPtr->get<Composite_EntType_and_Space_mi_tag>();
166 
167  for (auto r = fields_ents.equal_range(boost::make_tuple(type, space));
168  r.first != r.second; ++r.first) {
169 
170  auto &e = **r.first;
171 
172  auto sit = side_table.find(e.getEnt());
173  if (sit != side_table.end()) {
174 
175  auto &side = *sit;
176  const int side_number = side->side_number;
177 
178  ApproximationOrder ent_order = e.getMaxOrder();
179  auto &dat = data[side_number];
180  dat.getDataOrder() =
181  dat.getDataOrder() > ent_order ? dat.getDataOrder() : ent_order;
182  } else
183  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
184  "Entity on side of the element not found");
185 
186  }
187 
188  for (auto r = side_table.get<2>().equal_range(type); r.first != r.second;
189  ++r.first) {
190  const int brother_side_number = (*r.first)->brother_side_number;
191  if (brother_side_number != -1) {
192  const int side_number = (*r.first)->side_number;
193  data[brother_side_number].getDataOrder() =
194  data[side_number].getDataOrder();
195  }
196  }
197 
199 }
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:37
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
boost::shared_ptr< const FieldEntity_multiIndex_spaceType_view > dataFieldEntsPtr
Pointer to finite element field entities data view.
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getEntityDataOrder() [2/2]

template<EntityType type>
MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntityDataOrder ( DataForcesAndSourcesCore data,
const FieldSpace  space 
) const

Get the entity data order for given space.

Template Parameters
type
Parameters
data
space
Returns
MoFEMErrorCode

Definition at line 129 of file ForcesAndSourcesCore.hpp.

130  {
131  return getEntityDataOrder(type, space, data.dataOnEntities[type]);
132  }
MoFEMErrorCode getEntityDataOrder(const EntityType type, const FieldSpace space, boost::ptr_vector< DataForcesAndSourcesCore::EntData > &data) const
Get the entity data order.

◆ getEntityFieldData()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntityFieldData ( DataForcesAndSourcesCore data,
const std::string &  field_name,
const EntityType  type_lo = MBVERTEX,
const EntityType  type_hi = MBPOLYHEDRON 
) const

Definition at line 559 of file ForcesAndSourcesCore.cpp.

561  {
563 
564  for (EntityType t = type_lo; t != type_hi; ++t) {
565  for (auto &dat : data.dataOnEntities[t]) {
566  dat.getDataOrder() = 0;
567  dat.getBase() = NOBASE;
568  dat.getSpace() = NOSPACE;
569  dat.getFieldData().resize(0, false);
570  dat.getFieldDofs().resize(0, false);
571  }
572  }
573 
574  auto &dofs = const_cast<FEDofEntity_multiIndex &>(
575  numeredEntFiniteElementPtr->getDataDofs());
576  auto &dofs_by_type = dofs.get<Composite_Name_And_Type_mi_tag>();
577  auto dit = dofs_by_type.lower_bound(boost::make_tuple(field_name, type_lo));
578  if (dit == dofs_by_type.end())
580  auto hi_dit =
581  dofs_by_type.lower_bound(boost::make_tuple(field_name, type_hi));
582  std::vector<boost::weak_ptr<FEDofEntity>> brother_dofs_vec;
583  for (; dit != hi_dit;) {
584 
585  auto &dof = **dit;
586  const int nb_dofs_on_ent = dof.getNbDofsOnEnt();
587  if (nb_dofs_on_ent) {
588 
589  const EntityType type = dof.getEntType();
590  const int side = dof.sideNumberPtr->side_number;
591  auto &dat = data.dataOnEntities[type][side];
592 
593  auto &ent_field_dofs = dat.getFieldDofs();
594  auto &ent_field_data = dat.getFieldData();
595  const int brother_side = dof.sideNumberPtr->brother_side_number;
596  if (brother_side != -1)
597  brother_dofs_vec.emplace_back(*dit);
598 
599  if (ent_field_data.empty()) {
600 
601  dat.getBase() = dof.getApproxBase();
602  dat.getSpace() = dof.getSpace();
603  const int ent_order = dof.getMaxOrder();
604  dat.getDataOrder() =
605  dat.getDataOrder() > ent_order ? dat.getDataOrder() : ent_order;
606  ent_field_data.resize(nb_dofs_on_ent, false);
607  noalias(ent_field_data) = dof.getEntFieldData();
608  ent_field_dofs.resize(nb_dofs_on_ent, false);
609  for (int ii = 0; ii != nb_dofs_on_ent; ++ii) {
610  ent_field_dofs[ii] = *dit;
611  ++dit;
612  }
613  }
614  }
615  }
616 
617  for (auto &dof_ptr : brother_dofs_vec) {
618  if (auto d = dof_ptr.lock()) {
619  const EntityType type = d->getEntType();
620  const int side = d->sideNumberPtr->side_number;
621  const int brother_side = d->sideNumberPtr->brother_side_number;
622  auto &dat = data.dataOnEntities[type][side];
623  auto &dat_brother = data.dataOnEntities[type][brother_side];
624  dat_brother.getBase() = dat.getBase();
625  dat_brother.getSpace() = dat.getSpace();
626  dat_brother.getDataOrder() = dat.getDataOrder();
627  dat_brother.getFieldData() = dat.getFieldData();
628  dat_brother.getFieldDofs() = dat.getFieldDofs();
629  }
630  }
631 
633 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: dTensor0.hpp:27
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getEntityIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntityIndices ( DataForcesAndSourcesCore data,
const std::string &  field_name,
FENumeredDofEntity_multiIndex dofs,
const EntityType  type_lo = MBVERTEX,
const EntityType  type_hi = MBPOLYHEDRON 
) const

Definition at line 272 of file ForcesAndSourcesCore.cpp.

275  {
277 
278  for (EntityType t = type_lo; t != type_hi; ++t) {
279  for (auto &dat : data.dataOnEntities[t]) {
280  dat.getIndices().resize(0, false);
281  dat.getLocalIndices().resize(0, false);
282  }
283  }
284 
285  auto &dofs_by_type = dofs.get<Composite_Name_And_Type_mi_tag>();
286  auto dit = dofs_by_type.lower_bound(boost::make_tuple(field_name, type_lo));
287  if (dit == dofs_by_type.end())
289  auto hi_dit =
290  dofs_by_type.lower_bound(boost::make_tuple(field_name, type_hi));
291  for (; dit != hi_dit; ++dit) {
292  auto &dof = **dit;
293  const EntityType type = dof.getEntType();
294  const int side = dof.sideNumberPtr->side_number;
295  auto &dat = data.dataOnEntities[type][side];
296 
297  const int nb_dofs_on_ent = dof.getNbDofsOnEnt();
298  if (nb_dofs_on_ent) {
299  const int brother_side = dof.sideNumberPtr->brother_side_number;
300  auto &ent_field_indices = dat.getIndices();
301  auto &ent_field_local_indices = dat.getLocalIndices();
302  if (ent_field_indices.empty()) {
303  ent_field_indices.resize(nb_dofs_on_ent, false);
304  ent_field_local_indices.resize(nb_dofs_on_ent, false);
305  std::fill(ent_field_indices.data().begin(),
306  ent_field_indices.data().end(), -1);
307  std::fill(ent_field_local_indices.data().begin(),
308  ent_field_local_indices.data().end(), -1);
309  }
310  const int idx = dof.getEntDofIdx();
311  ent_field_indices[idx] = dof.getPetscGlobalDofIdx();
312  ent_field_local_indices[idx] = dof.getPetscLocalDofIdx();
313  if (brother_side != -1) {
314  auto &dat_brother = data.dataOnEntities[type][brother_side];
315  dat_brother.getIndices().resize(nb_dofs_on_ent, false);
316  dat_brother.getLocalIndices().resize(nb_dofs_on_ent, false);
317  dat_brother.getIndices()[idx] = dat.getIndices()[idx];
318  dat_brother.getLocalIndices()[idx] = dat.getLocalIndices()[idx];
319  }
320  }
321  }
322 
324 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getEntityRowIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntityRowIndices ( DataForcesAndSourcesCore data,
const std::string &  field_name,
const EntityType  type_lo = MBVERTEX,
const EntityType  type_hi = MBPOLYHEDRON 
) const

Definition at line 156 of file ForcesAndSourcesCore.hpp.

159  {
160  return getEntityIndices(data, field_name,
161  const_cast<FENumeredDofEntity_multiIndex &>(
162  numeredEntFiniteElementPtr->getRowsDofs()),
163  type_lo, type_hi);
164  }
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
MoFEMErrorCode getEntityIndices(DataForcesAndSourcesCore &data, const std::string &field_name, FENumeredDofEntity_multiIndex &dofs, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const

◆ getEntitySense() [1/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntitySense ( const EntityType  type,
boost::ptr_vector< DataForcesAndSourcesCore::EntData > &  data 
) const

get sense (orientation) of entity

Parameters
typetype of entity
dataentity data
Returns
error code

Definition at line 105 of file ForcesAndSourcesCore.cpp.

107  {
109 
110  auto &side_table = numeredEntFiniteElementPtr->getSideNumberTable().get<2>();
111  for (auto r = side_table.equal_range(type); r.first != r.second; ++r.first) {
112 
113  const int side_number = (*r.first)->side_number;
114  const int brother_side_number = (*r.first)->brother_side_number;
115  const int sense = (*r.first)->sense;
116 
117  data[side_number].getSense() = sense;
118  if (brother_side_number != -1)
119  data[brother_side_number].getSense() = sense;
120  }
122 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getEntitySense() [2/2]

template<EntityType type>
MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getEntitySense ( DataForcesAndSourcesCore data) const

Get the entity sense (orientation)

Template Parameters
type
Parameters
data
Returns
MoFEMErrorCode

Definition at line 116 of file ForcesAndSourcesCore.hpp.

116  {
117  return getEntitySense(type, data.dataOnEntities[type]);
118  }
MoFEMErrorCode getEntitySense(const EntityType type, boost::ptr_vector< DataForcesAndSourcesCore::EntData > &data) const
get sense (orientation) of entity

◆ getFaceTriNodes()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getFaceTriNodes ( DataForcesAndSourcesCore data) const

Get nodes on triangles.

Definition at line 670 of file ForcesAndSourcesCore.cpp.

670  {
672  // PetscAttachDebugger();
673  data.facesNodes.resize(4, 3, false);
674  auto &side_table = const_cast<SideNumber_multiIndex &>(
675  numeredEntFiniteElementPtr->getSideNumberTable());
676  auto siit = side_table.get<1>().lower_bound(boost::make_tuple(MBTRI, 0));
677  auto hi_siit = side_table.get<1>().upper_bound(boost::make_tuple(MBTRI, 4));
678  if (std::distance(siit, hi_siit) != 4) {
679  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
680  "Should be 4 triangles on tet, side_table not initialized");
681  }
682  const int canonical_face_sense_p1[4][3] = {
683  {0, 1, 3},
684  {1, 2, 3},
685  {0, 3, 2} /**/,
686  {0, 2, 1} /**/}; // second index is offset (positive sense)
687  const int canonical_face_sense_m1[4][3] = {
688  {0, 3, 1},
689  {1, 3, 2},
690  {0, 2, 3},
691  {0, 1, 2}}; // second index is offset (negative sense
692  for (; siit != hi_siit; siit++) {
693  const boost::shared_ptr<SideNumber> side = *siit;
694  int face_conn[3] = {-1, -1, -1};
695  if (side->offset == 0) {
696  face_conn[0] = side->sense == 1
697  ? canonical_face_sense_p1[(int)side->side_number][0]
698  : canonical_face_sense_m1[(int)side->side_number][0];
699  face_conn[1] = side->sense == 1
700  ? canonical_face_sense_p1[(int)side->side_number][1]
701  : canonical_face_sense_m1[(int)side->side_number][1];
702  face_conn[2] = side->sense == 1
703  ? canonical_face_sense_p1[(int)side->side_number][2]
704  : canonical_face_sense_m1[(int)side->side_number][2];
705  }
706  if (side->offset == 1) {
707  face_conn[0] =
708  side->sense == 1
709  ? canonical_face_sense_p1[(int)side->side_number][1]
710  : canonical_face_sense_m1[(int)side->side_number][2] /**/;
711  face_conn[1] = side->sense == 1
712  ? canonical_face_sense_p1[(int)side->side_number][2]
713  : canonical_face_sense_m1[(int)side->side_number][0];
714  face_conn[2] = side->sense == 1
715  ? canonical_face_sense_p1[(int)side->side_number][0]
716  : canonical_face_sense_m1[(int)side->side_number][1];
717  }
718  if (side->offset == 2) {
719  face_conn[0] =
720  side->sense == 1
721  ? canonical_face_sense_p1[(int)side->side_number][2]
722  : canonical_face_sense_m1[(int)side->side_number][1] /**/;
723  face_conn[1] = side->sense == 1
724  ? canonical_face_sense_p1[(int)side->side_number][0]
725  : canonical_face_sense_m1[(int)side->side_number][2];
726  face_conn[2] = side->sense == 1
727  ? canonical_face_sense_p1[(int)side->side_number][1]
728  : canonical_face_sense_m1[(int)side->side_number][0];
729  }
730  for (int nn = 0; nn < 3; nn++)
731  data.facesNodes(side->side_number, nn) = face_conn[nn];
732  {
733  const EntityHandle *conn_tet;
734  int num_nodes_tet;
736  CHKERR mField.get_moab().get_connectivity(ent, conn_tet, num_nodes_tet,
737  true);
738  if (num_nodes_tet != 4)
739  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
740  "data inconsistency");
741  int num_nodes_face;
742  const EntityHandle *conn_face;
743  CHKERR mField.get_moab().get_connectivity(side->ent, conn_face,
744  num_nodes_face, true);
745  if (num_nodes_face != 3)
746  SETERRQ(PETSC_COMM_SELF, 1, "data inconsistency");
747  if (conn_face[0] != conn_tet[data.facesNodes(side->side_number, 0)])
748  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
749  "data inconsistency");
750  if (conn_face[1] != conn_tet[data.facesNodes(side->side_number, 1)])
751  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
752  "data inconsistency");
753  if (conn_face[2] != conn_tet[data.facesNodes(side->side_number, 2)])
754  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
755  "data inconsistency");
756  }
757  }
759 }
virtual moab::Interface & get_moab()=0
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getMaxColOrder()

int MoFEM::ForcesAndSourcesCore::getMaxColOrder ( ) const

Get max order of approximation for field in columns.

Definition at line 150 of file ForcesAndSourcesCore.cpp.

150  {
151  return getMaxOrder(*colFieldEntsPtr);
152 }
boost::shared_ptr< const FieldEntity_vector_view > colFieldEntsPtr
Pointer to finite element field entities column view.
static int getMaxOrder(const ENTMULTIINDEX &multi_index)

◆ getMaxDataOrder()

int MoFEM::ForcesAndSourcesCore::getMaxDataOrder ( ) const

Get max order of approximation for data fields.

Method getMaxDataOrder () return maximal order on entities, for all data on the element. So for example if finite element is triangle, and triangle base function have order 4 and on edges base function have order 2, this function return 4.

If finite element has for example 2 or more approximated fields, for example Pressure (order 3) and displacement field (order 5), this function returns 5.

Definition at line 137 of file ForcesAndSourcesCore.cpp.

137  {
138  int max_order = 0;
139  for (auto e : *dataFieldEntsPtr) {
140  const int order = e->getMaxOrder();
141  max_order = (max_order < order) ? order : max_order;
142  }
143  return max_order;
144 }
boost::shared_ptr< const FieldEntity_multiIndex_spaceType_view > dataFieldEntsPtr
Pointer to finite element field entities data view.
const int order
approximation order

◆ getMaxRowOrder()

int MoFEM::ForcesAndSourcesCore::getMaxRowOrder ( ) const

Get max order of approximation for field in rows.

Definition at line 146 of file ForcesAndSourcesCore.cpp.

146  {
147  return getMaxOrder(*rowFieldEntsPtr);
148 }
boost::shared_ptr< const FieldEntity_vector_view > rowFieldEntsPtr
Pointer to finite element field entities row view.
static int getMaxOrder(const ENTMULTIINDEX &multi_index)

◆ getNodesFieldData() [1/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNodesFieldData ( const boost::string_ref  field_name,
FEDofEntity_multiIndex dofs,
VectorDouble nodes_data,
VectorDofs nodes_dofs,
FieldSpace space,
FieldApproximationBase base 
) const

Get field data on nodes.

Parameters
field_nameName of field
dofsDofs (element) multi index
nodes_dataReturned DOFs values
nodes_dofsVector of pointers to DOFs data structure
spaceGet space on nodes (Only H! is valid)
baseGet base on nodes
Returns
Error code

Definition at line 478 of file ForcesAndSourcesCore.cpp.

481  {
483  auto &dofs_by_name_and_type = dofs.get<Composite_Name_And_Type_mi_tag>();
484  auto tuple = boost::make_tuple(field_name, MBVERTEX);
485  auto dit = dofs_by_name_and_type.lower_bound(tuple);
486  if (dit == dofs_by_name_and_type.end())
487  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
488  "No nodal dofs on element");
489  auto hi_dit = dofs.get<Composite_Name_And_Type_mi_tag>().upper_bound(tuple);
490 
491  if (dit != hi_dit) {
492  auto &first_dof = **dit;
493  space = first_dof.getSpace();
494  base = first_dof.getApproxBase();
495  int num_nodes;
496  CHKERR getNumberOfNodes(num_nodes);
497  const int nb_dof_idx = first_dof.getNbOfCoeffs();
498  const int max_nb_dofs = nb_dof_idx * num_nodes;
499  nodes_data.resize(max_nb_dofs, false);
500  nodes_dofs.resize(max_nb_dofs, false);
501  nodes_data.clear();
502 
503  std::vector<boost::weak_ptr<FEDofEntity>> brother_dofs_vec;
504  for (; dit != hi_dit;) {
505  const auto &dof_ptr = *dit;
506  const auto &dof = *dof_ptr;
507  const auto &sn = *dof.sideNumberPtr;
508  const int side_number = sn.side_number;
509  const int brother_side_number = sn.brother_side_number;
510  if (brother_side_number != -1)
511  brother_dofs_vec.emplace_back(dof_ptr);
512 
513  int pos = side_number * nb_dof_idx;
514  auto ent_filed_data_vec = dof.getEntFieldData();
515  for (int ii = 0; ii != nb_dof_idx; ++ii) {
516  nodes_data[pos] = ent_filed_data_vec[ii];
517  nodes_dofs[pos] = *dit;
518  ++pos;
519  ++dit;
520  }
521  }
522 
523  for(auto &dof_ptr : brother_dofs_vec) {
524  if (const auto d = dof_ptr.lock()) {
525  const auto &sn = d->sideNumberPtr;
526  const int side_number = sn->side_number;
527  const int brother_side_number = sn->brother_side_number;
528  int pos = side_number * nb_dof_idx;
529  int brother_pos = brother_side_number * nb_dof_idx;
530  for (int ii = 0; ii != nb_dof_idx; ++ii) {
531  nodes_data[brother_pos] = nodes_data[pos];
532  nodes_dofs[brother_pos] = nodes_dofs[pos];
533  ++pos;
534  ++brother_pos;
535  }
536  }
537  }
538 
539  } else {
540  nodes_data.resize(0, false);
541  nodes_dofs.resize(0, false);
542  }
543 
545 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
const Tensor1_Expr< const dTensor0< T, Dim, i >, typename promote< T, double >::V, Dim, i > d(const Tensor0< T * > &a, const Index< i, Dim > index, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: dTensor0.hpp:27
#define CHKERR
Inline error check.
Definition: definitions.h:595
MoFEMErrorCode getNumberOfNodes(int &num_nodes) const
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getNodesFieldData() [2/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNodesFieldData ( DataForcesAndSourcesCore data,
const std::string &  field_name 
) const

Get data on nodes.

Parameters
dataData structure
field_nameField name
Returns
Error code

Definition at line 548 of file ForcesAndSourcesCore.cpp.

549  {
550  return getNodesFieldData(field_name,
551  const_cast<FEDofEntity_multiIndex &>(
552  numeredEntFiniteElementPtr->getDataDofs()),
553  data.dataOnEntities[MBVERTEX][0].getFieldData(),
554  data.dataOnEntities[MBVERTEX][0].getFieldDofs(),
555  data.dataOnEntities[MBVERTEX][0].getSpace(),
556  data.dataOnEntities[MBVERTEX][0].getBase());
557 }
MoFEMErrorCode getNodesFieldData(const boost::string_ref field_name, FEDofEntity_multiIndex &dofs, VectorDouble &nodes_data, VectorDofs &nodes_dofs, FieldSpace &space, FieldApproximationBase &base) const
Get field data on nodes.
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr

◆ getNodesIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNodesIndices ( const boost::string_ref  field_name,
FENumeredDofEntity_multiIndex dofs,
VectorInt nodes_indices,
VectorInt local_nodes_indices 
) const

get node indices

Definition at line 203 of file ForcesAndSourcesCore.cpp.

205  {
207  auto &dofs_by_type = dofs.get<Composite_Name_And_Type_mi_tag>();
208  auto tuple = boost::make_tuple(field_name, MBVERTEX);
209  auto dit = dofs_by_type.lower_bound(tuple);
210  auto hi_dit = dofs_by_type.upper_bound(tuple);
211 
212  if (dit != hi_dit) {
213 
214  int num_nodes;
215  CHKERR getNumberOfNodes(num_nodes);
216  int max_nb_dofs = 0;
217  const int nb_dofs_on_vert = (*dit)->getNbOfCoeffs();
218  max_nb_dofs = nb_dofs_on_vert * num_nodes;
219  nodes_indices.resize(max_nb_dofs, false);
220  local_nodes_indices.resize(max_nb_dofs, false);
221  if (std::distance(dit, hi_dit) != max_nb_dofs) {
222  std::fill(nodes_indices.begin(), nodes_indices.end(), -1);
223  std::fill(local_nodes_indices.begin(), local_nodes_indices.end(), -1);
224  }
225 
226  for (; dit != hi_dit; dit++) {
227  auto &dof = **dit;
228  const int idx = dof.getPetscGlobalDofIdx();
229  const int local_idx = dof.getPetscLocalDofIdx();
230  const int side_number = dof.sideNumberPtr->side_number;
231  const int pos = side_number * nb_dofs_on_vert + dof.getDofCoeffIdx();
232  nodes_indices[pos] = idx;
233  local_nodes_indices[pos] = local_idx;
234  const int brother_side_number =
235  (*dit)->sideNumberPtr->brother_side_number;
236  if (brother_side_number != -1) {
237  const int elem_idx =
238  brother_side_number * nb_dofs_on_vert + (*dit)->getDofCoeffIdx();
239  nodes_indices[elem_idx] = idx;
240  local_nodes_indices[elem_idx] = local_idx;
241  }
242  }
243 
244  } else {
245  nodes_indices.resize(0, false);
246  local_nodes_indices.resize(0, false);
247  }
248 
250 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
#define CHKERR
Inline error check.
Definition: definitions.h:595
MoFEMErrorCode getNumberOfNodes(int &num_nodes) const
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getNoFieldColIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNoFieldColIndices ( DataForcesAndSourcesCore data,
const std::string &  field_name 
) const

get col NoField indices

Definition at line 354 of file ForcesAndSourcesCore.cpp.

355  {
357  if (data.dataOnEntities[MBENTITYSET].size() == 0) {
358  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
359  }
360  CHKERR getNoFieldIndices(field_name,
361  const_cast<FENumeredDofEntity_multiIndex &>(
362  numeredEntFiniteElementPtr->getColsDofs()),
363  data.dataOnEntities[MBENTITYSET][0].getIndices());
365 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
#define CHKERR
Inline error check.
Definition: definitions.h:595
MoFEMErrorCode getNoFieldIndices(const std::string &field_name, FENumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices) const
get NoField indices
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getNoFieldFieldData() [1/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNoFieldFieldData ( const boost::string_ref  field_name,
FEDofEntity_multiIndex dofs,
VectorDouble ent_field_data,
VectorDofs ent_field_dofs 
) const

Definition at line 635 of file ForcesAndSourcesCore.cpp.

637  {
639  auto dit = dofs.get<FieldName_mi_tag>().lower_bound(field_name);
640  auto hi_dit = dofs.get<FieldName_mi_tag>().upper_bound(field_name);
641  int size = std::distance(dit, hi_dit);
642  ent_field_data.resize(size, false);
643  ent_field_dofs.resize(size, false);
644  for (; dit != hi_dit; dit++) {
645  int idx = (*dit)->getDofCoeffIdx();
646  ent_field_data[idx] = (*dit)->getFieldData();
647  ent_field_dofs[idx] = *dit;
648  }
650 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

◆ getNoFieldFieldData() [2/2]

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNoFieldFieldData ( DataForcesAndSourcesCore data,
const boost::string_ref  field_name 
) const

Definition at line 652 of file ForcesAndSourcesCore.cpp.

653  {
655  if (data.dataOnEntities[MBENTITYSET].size() == 0) {
656  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
657  }
659  field_name,
660  const_cast<FEDofEntity_multiIndex &>(
661  numeredEntFiniteElementPtr->getDataDofs()),
662  data.dataOnEntities[MBENTITYSET][0].getFieldData(),
663  data.dataOnEntities[MBENTITYSET][0].getFieldDofs());
665 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
MoFEMErrorCode getNoFieldFieldData(const boost::string_ref field_name, FEDofEntity_multiIndex &dofs, VectorDouble &ent_field_data, VectorDofs &ent_field_dofs) const
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getNoFieldIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNoFieldIndices ( const std::string &  field_name,
FENumeredDofEntity_multiIndex dofs,
VectorInt nodes_indices 
) const

get NoField indices

Definition at line 327 of file ForcesAndSourcesCore.cpp.

329  {
331  auto dit = dofs.get<FieldName_mi_tag>().lower_bound(field_name);
332  auto hi_dit = dofs.get<FieldName_mi_tag>().upper_bound(field_name);
333  indices.resize(std::distance(dit, hi_dit));
334  for (; dit != hi_dit; dit++) {
335  int idx = (*dit)->getPetscGlobalDofIdx();
336  indices[(*dit)->getDofCoeffIdx()] = idx;
337  }
339 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

◆ getNoFieldRowIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNoFieldRowIndices ( DataForcesAndSourcesCore data,
const std::string &  field_name 
) const

get col NoField indices

Definition at line 341 of file ForcesAndSourcesCore.cpp.

342  {
344  if (data.dataOnEntities[MBENTITYSET].size() == 0) {
345  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
346  }
347  CHKERR getNoFieldIndices(field_name,
348  const_cast<FENumeredDofEntity_multiIndex &>(
349  numeredEntFiniteElementPtr->getRowsDofs()),
350  data.dataOnEntities[MBENTITYSET][0].getIndices());
352 }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
#define CHKERR
Inline error check.
Definition: definitions.h:595
MoFEMErrorCode getNoFieldIndices(const std::string &field_name, FENumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices) const
get NoField indices
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ getNumberOfNodes()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getNumberOfNodes ( int num_nodes) const

Definition at line 73 of file ForcesAndSourcesCore.cpp.

73  {
75 
77  switch (mField.get_moab().type_from_handle(ent)) {
78  case MBVERTEX:
79  num_nodes = 1;
80  break;
81  case MBEDGE:
82  num_nodes = 2;
83  break;
84  case MBTRI:
85  num_nodes = 3;
86  break;
87  case MBQUAD:
88  num_nodes = 4;
89  break;
90  case MBTET:
91  num_nodes = 4;
92  break;
93  case MBPRISM:
94  num_nodes = 6;
95  break;
96  default:
97  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented");
98  }
99 
101 }
virtual moab::Interface & get_moab()=0
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr

◆ getOpPtrVector()

boost::ptr_vector<UserDataOperator>& MoFEM::ForcesAndSourcesCore::getOpPtrVector ( )

Use to push back operator for row operator.

It can be used to calculate nodal forces or other quantities on the mesh.

Examples
elasticity_mixed_formulation.cpp, EshelbianOperators.cpp, EshelbianPlasticity.cpp, forces_and_sources_testing_edge_element.cpp, forces_and_sources_testing_flat_prism_element.cpp, MagneticElement.hpp, and prisms_elements_from_surface.cpp.

Definition at line 635 of file ForcesAndSourcesCore.hpp.

635 { return opPtrVector; }
boost::ptr_vector< UserDataOperator > opPtrVector
Vector of finite element users data operators.

◆ getProblemNodesColIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getProblemNodesColIndices ( const std::string &  field_name,
VectorInt nodes_indices 
) const

Definition at line 462 of file ForcesAndSourcesCore.cpp.

463  {
464  return getProblemNodesIndices(field_name, *(problemPtr->numeredDofsCols),
465  nodes_indices);
466 }
const Problem * problemPtr
raw pointer to problem
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem
MoFEMErrorCode getProblemNodesIndices(const std::string &field_name, const NumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices) const
get indices of nodal indices which are declared for problem but not this particular element

◆ getProblemNodesIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getProblemNodesIndices ( const std::string &  field_name,
const NumeredDofEntity_multiIndex dofs,
VectorInt nodes_indices 
) const

get indices of nodal indices which are declared for problem but not this particular element

Definition at line 369 of file ForcesAndSourcesCore.cpp.

371  {
373  nodes_indices.resize(0);
374  auto &side_table = const_cast<SideNumber_multiIndex &>(
375  numeredEntFiniteElementPtr->getSideNumberTable());
376  auto siit = side_table.get<1>().lower_bound(boost::make_tuple(MBVERTEX, 0));
377  auto hi_siit =
378  side_table.get<1>().lower_bound(boost::make_tuple(MBVERTEX, 10000));
379 
380  int nn = 0;
381  for (; siit != hi_siit; siit++, nn++) {
382 
383  if (siit->get()->side_number == -1)
384  continue;
385 
386  const EntityHandle ent = siit->get()->ent;
387  auto dit =
388  dofs.get<Composite_Name_And_Ent_And_EntDofIdx_mi_tag>().lower_bound(
389  boost::make_tuple(field_name, ent, 0));
390  auto hi_dit =
391  dofs.get<Composite_Name_And_Ent_And_EntDofIdx_mi_tag>().upper_bound(
392  boost::make_tuple(field_name, ent, 10000)); /// very large number
393  if (dit != hi_dit) {
394  if (!nn) {
395  nodes_indices.resize((*dit)->getNbOfCoeffs() *
396  std::distance(siit, hi_siit));
397  }
398  for (; dit != hi_dit; dit++) {
399  nodes_indices[siit->get()->side_number * (*dit)->getNbOfCoeffs() +
400  (*dit)->getDofCoeffIdx()] =
401  (*dit)->getPetscGlobalDofIdx();
402  }
403  }
404  }
405 
407 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr

◆ getProblemNodesRowIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getProblemNodesRowIndices ( const std::string &  field_name,
VectorInt nodes_indices 
) const

Definition at line 448 of file ForcesAndSourcesCore.cpp.

449  {
450  return getProblemNodesIndices(field_name, *(problemPtr->numeredDofsRows),
451  nodes_indices);
452 }
const Problem * problemPtr
raw pointer to problem
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem
MoFEMErrorCode getProblemNodesIndices(const std::string &field_name, const NumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices) const
get indices of nodal indices which are declared for problem but not this particular element

◆ getProblemTypeColIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getProblemTypeColIndices ( const std::string &  field_name,
EntityType  type,
int  side_number,
VectorInt indices 
) const

Definition at line 469 of file ForcesAndSourcesCore.cpp.

471  {
472  return getProblemTypeIndices(field_name, *(problemPtr->numeredDofsCols), type,
473  side_number, indices);
474 }
const Problem * problemPtr
raw pointer to problem
MoFEMErrorCode getProblemTypeIndices(const std::string &field_name, const NumeredDofEntity_multiIndex &dofs, EntityType type, int side_number, VectorInt &indices) const
get indices by type (generic function) which are declared for problem but not this particular element
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsCols
store DOFs on columns for this problem

◆ getProblemTypeIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getProblemTypeIndices ( const std::string &  field_name,
const NumeredDofEntity_multiIndex dofs,
EntityType  type,
int  side_number,
VectorInt indices 
) const

get indices by type (generic function) which are declared for problem but not this particular element

Definition at line 409 of file ForcesAndSourcesCore.cpp.

411  {
413 
414  indices.resize(0);
415 
416  auto &side_table = const_cast<SideNumber_multiIndex &>(
417  numeredEntFiniteElementPtr->getSideNumberTable());
418  auto siit =
419  side_table.get<1>().lower_bound(boost::make_tuple(type, side_number));
420  auto hi_siit =
421  side_table.get<1>().upper_bound(boost::make_tuple(type, side_number));
422 
423  for (; siit != hi_siit; siit++) {
424 
425  if (siit->get()->side_number == -1)
426  continue;
427 
428  const EntityHandle ent = siit->get()->ent;
429  NumeredDofEntity_multiIndex::index<
430  Composite_Name_And_Ent_And_EntDofIdx_mi_tag>::type::iterator dit,
431  hi_dit;
432  dit = dofs.get<Composite_Name_And_Ent_And_EntDofIdx_mi_tag>().lower_bound(
433  boost::make_tuple(field_name, ent, 0));
434  hi_dit =
435  dofs.get<Composite_Name_And_Ent_And_EntDofIdx_mi_tag>().upper_bound(
436  boost::make_tuple(field_name, ent, 10000)); /// very large number
437 
438  indices.resize(std::distance(dit, hi_dit));
439  for (; dit != hi_dit; dit++) {
440 
441  indices[(*dit)->getEntDofIdx()] = (*dit)->getPetscGlobalDofIdx();
442  }
443  }
444 
446 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr

◆ getProblemTypeRowIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getProblemTypeRowIndices ( const std::string &  field_name,
EntityType  type,
int  side_number,
VectorInt indices 
) const

Definition at line 455 of file ForcesAndSourcesCore.cpp.

457  {
458  return getProblemTypeIndices(field_name, *(problemPtr->numeredDofsRows), type,
459  side_number, indices);
460 }
const Problem * problemPtr
raw pointer to problem
boost::shared_ptr< NumeredDofEntity_multiIndex > numeredDofsRows
store DOFs on rows for this problem
MoFEMErrorCode getProblemTypeIndices(const std::string &field_name, const NumeredDofEntity_multiIndex &dofs, EntityType type, int side_number, VectorInt &indices) const
get indices by type (generic function) which are declared for problem but not this particular element

◆ getRowNodesIndices()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getRowNodesIndices ( DataForcesAndSourcesCore data,
const std::string &  field_name 
) const

get row node indices from FENumeredDofEntity_multiIndex

Definition at line 253 of file ForcesAndSourcesCore.cpp.

254  {
255  return getNodesIndices(field_name,
256  const_cast<FENumeredDofEntity_multiIndex &>(
257  numeredEntFiniteElementPtr->getRowsDofs()),
258  data.dataOnEntities[MBVERTEX][0].getIndices(),
259  data.dataOnEntities[MBVERTEX][0].getLocalIndices());
260 }
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
MoFEMErrorCode getNodesIndices(const boost::string_ref field_name, FENumeredDofEntity_multiIndex &dofs, VectorInt &nodes_indices, VectorInt &local_nodes_indices) const
get node indices

◆ getRule() [1/2]

virtual int MoFEM::ForcesAndSourcesCore::getRule ( int  order_row,
int  order_col,
int  order_data 
)
virtual

another variant of getRule

Parameters
order_roworder of base function on row
order_colorder of base function on columns
order_dataorder of base function approximating data
Returns
integration rule

This function is overloaded by the user. The integration rule is set such that specific operator implemented by the user is integrated accurately. For example if user implement bilinear operator

\[ b(u,v) = \int_\mathcal{T} \frac{\partial u_i}{\partial x_j}\frac{\partial v_i}{\partial x_j} \textrm{d}\mathcal{T} \]

then if \(u\) and \(v\) are polynomial of given order, then exact integral would be

int getRule(int order) { return 2*(order-1); };

The integration points and weights are set appropriately for given entity type and integration rule from quad.c

Method ForcesAndSourcesCore::getRule takes at argument takes maximal polynomial order set on the element on all fields defined on the element. If a user likes to have more control, another variant of this function can be called which distinguishing between field orders on rows, columns and data, the i.e. first argument of a bilinear form, the second argument of bilinear form and field coefficients on the element.

Note
If user set rule to -1 or any other negative integer, then method ForcesAndSourcesCore::setGaussPts is called. In that method user can implement own (specific) integration method.
Bug:
this function should be const

Definition at line 319 of file ForcesAndSourcesCore.hpp.

319  {
320  return getRuleHook ? getRuleHook(order_row, order_col, order_data)
321  : getRule(order_data);
322  }
RuleHookFun getRuleHook
Hook to get rule.
virtual int getRule(int order_row, int order_col, int order_data)
another variant of getRule

◆ getRule() [2/2]

virtual int MoFEM::ForcesAndSourcesCore::getRule ( int  order)
virtual
Deprecated:
Use getRule(int row_order, int col_order, int data order)

Reimplemented in EdgeSlidingConstrains::MyEdgeFE, PostProcFaceOnRefinedMesh, BoneRemodeling::DensityMapFe, MoFEM::VolumeElementForcesAndSourcesCoreOnSide, GelModule::Gel::GelFE, SurfaceSlidingConstrains::MyTriangleFE, SmallStrainPlasticity::MyVolumeFE, PostProcTemplateVolumeOnRefinedMesh< MoFEM::VolumeElementForcesAndSourcesCore >, NitscheMethod::MyVolumeFE, KelvinVoigtDamper::DamperFE, ThermalElement::MyTriFE, NeummanForcesSurface::MyTriangleFE, MixTransport::MixTransportElement::MyTriFE, NonlinearElasticElement::MyVolumeFE, MagneticElement::TriFE, NitscheMethod::MyFace, MoFEM::NormElement::MyTriFE, ThermalElement::MyVolumeFE, NeummanForcesSurfaceComplexForLazy::MyTriangleSpatialFE, MixTransport::MixTransportElement::MyVolumeFE, MoFEM::NormElement::MyVolumeFE, OptimalMassTransport::TriFE, MagneticElement::VolumeFE, CellEngineering::FaceElement, BoneRemodeling::Remodeling::Fe, AnalyticalDirichletBC::ApproxField::MyTriFE, AnalyticalDirichletHelmholtzBC::ApproxField::MyTriFE, AnalyticalDirihletBC::ApproxField::MyTriFE, OptimalMassTransport::VolumeFE, FluidPressure::MyTriangleFE, AnalyticalDirihletBC::ApproxField::MyTriFE, CohesiveElement::CohesiveInterfaceElement::MyPrism, EdgeForce::MyFE, ThermalStressElement::MyVolumeFE, BodyForceConstantField::MyVolumeFE, TestFE, and CellEngineering::DispMapFe.

Definition at line 721 of file ForcesAndSourcesCore.hpp.

721 { return 2 * order; }
const int order
approximation order

◆ getSpacesAndBaseOnEntities()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::getSpacesAndBaseOnEntities ( DataForcesAndSourcesCore data) const

Get field approximation space and base on entities.

Definition at line 763 of file ForcesAndSourcesCore.cpp.

764  {
766 
767  if (nInTheLoop == 0) {
768  data.sPace.reset();
769  data.bAse.reset();
770  for (EntityType t = MBVERTEX; t != MBMAXTYPE; ++t) {
771  data.spacesOnEntities[t].reset();
772  data.basesOnEntities[t].reset();
773  }
774  for (int s = 0; s != LASTSPACE; ++s) {
775  data.basesOnSpaces[s].reset();
776  }
777  }
778 
779  if (dataFieldEntsPtr)
780  for (auto e : *dataFieldEntsPtr) {
781  // get data from entity
782  const EntityType type = e->getEntType();
783  const FieldSpace space = e->getSpace();
784  const FieldApproximationBase approx = e->getApproxBase();
785 
786  // set data
787  data.sPace.set(space);
788  data.bAse.set(approx);
789  data.spacesOnEntities[type].set(space);
790  data.basesOnEntities[type].set(approx);
791  data.basesOnSpaces[space].set(approx);
792  }
793  else
794  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
795  "data fields ents not allocated on element");
796 
798 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:174
FieldApproximationBase
approximation base
Definition: definitions.h:142
FieldSpace
approximation spaces
Definition: definitions.h:167
int nInTheLoop
number currently of processed method
boost::shared_ptr< const FieldEntity_multiIndex_spaceType_view > dataFieldEntsPtr
Pointer to finite element field entities data view.

◆ getUserPolynomialBase()

auto& MoFEM::ForcesAndSourcesCore::getUserPolynomialBase ( )

Get the User Polynomial Base object.

Returns
boost::shared_ptr<BaseFunction>&
Examples
EshelbianPlasticity.cpp.

Definition at line 649 of file ForcesAndSourcesCore.hpp.

649 { return userPolynomialBasePtr; }
boost::shared_ptr< BaseFunction > userPolynomialBasePtr
Pointer to user polynomail base.

◆ loopOverOperators()

MoFEMErrorCode MoFEM::ForcesAndSourcesCore::loopOverOperators ( )

Iterate user data operators.

Returns
MoFEMErrorCode

Definition at line 914 of file ForcesAndSourcesCore.cpp.

914  {
916 
917  const EntityType type = numeredEntFiniteElementPtr->getEntType();
920  std::vector<std::string> last_eval_field_name(2);
921 
922  boost::ptr_vector<UserDataOperator>::iterator oit, hi_oit;
923  oit = opPtrVector.begin();
924  hi_oit = opPtrVector.end();
925 
926  for (; oit != hi_oit; oit++) {
927 
928  oit->setPtrFE(this);
929 
930  if (oit->opType == UserDataOperator::OPLAST) {
931 
932  // Set field
933  switch (oit->sPace) {
934  case NOSPACE:
935  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "Unknown space");
936  case NOFIELD:
937  case H1:
938  case HCURL:
939  case HDIV:
940  case L2:
941  break;
942  default:
943  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
944  "Not implemented for this space", oit->sPace);
945  }
946 
947  // Reseat all data which all field dependent
948  dataOnElement[oit->sPace]->resetFieldDependentData();
949  last_eval_field_name[0] = "";
950 
951  // Run operator
952  try {
953  CHKERR oit->opRhs(*dataOnElement[oit->sPace], oit->doVertices,
954  oit->doEdges, oit->doQuads, oit->doTris, oit->doTets,
955  false);
956  }
957  CATCH_OP_ERRORS(*oit);
958 
959  } else {
960 
961  boost::shared_ptr<DataForcesAndSourcesCore> op_data[2];
962 
963  for (int ss = 0; ss != 2; ss++) {
964 
965  const std::string field_name =
966  !ss ? oit->rowFieldName : oit->colFieldName;
967  const Field *field_struture = mField.get_field_structure(field_name);
968  const BitFieldId data_id = field_struture->getId();
969  const FieldSpace space = field_struture->getSpace();
970  op_data[ss] = !ss ? dataOnElement[space] : derivedDataOnElement[space];
971 
972  if ((oit->getNumeredEntFiniteElementPtr()->getBitFieldIdData() &
973  data_id)
974  .none()) {
975  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
976  "no data field < %s > on finite element < %s >",
977  field_name.c_str(), feName.c_str());
978  }
979 
980  if (oit->getOpType() & types[ss] ||
981  oit->getOpType() & UserDataOperator::OPROWCOL) {
982 
983  switch (space) {
984  case NOSPACE:
985  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown space");
986  break;
987  case NOFIELD:
988  case H1:
989  case HCURL:
990  case HDIV:
991  case L2:
992  break;
993  default:
994  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
995  "Not implemented for this space", space);
996  }
997 
998  if (last_eval_field_name[ss] != field_name) {
999 
1000  CHKERR getEntityFieldData(*op_data[ss], field_name, MBEDGE);
1001  if (!ss)
1002  CHKERR getEntityRowIndices(*op_data[ss], field_name, MBEDGE);
1003  else
1004  CHKERR getEntityColIndices(*op_data[ss], field_name, MBEDGE);
1005 
1006  switch (space) {
1007  case NOSPACE:
1008  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1009  "unknown space");
1010  break;
1011  case H1:
1012  if (!ss)
1013  CHKERR getRowNodesIndices(*op_data[ss], field_name);
1014  else
1015  CHKERR getColNodesIndices(*op_data[ss], field_name);
1016  CHKERR getNodesFieldData(*op_data[ss], field_name);
1017  break;
1018  case HCURL:
1019  case HDIV:
1020  break;
1021  case L2:
1022  switch (type) {
1023  case MBVERTEX:
1024  CHKERR getNodesFieldData(*op_data[ss], field_name);
1025  break;
1026  default:
1027  break;
1028  }
1029  break;
1030  case NOFIELD:
1031  if (!getNinTheLoop()) {
1032  // NOFIELD data are the same for each element, can be
1033  // retrieved only once
1034  if (!ss) {
1035  CHKERR getNoFieldRowIndices(*op_data[ss], field_name);
1036  } else {
1037  CHKERR getNoFieldColIndices(*op_data[ss], field_name);
1038  }
1039  CHKERR getNoFieldFieldData(*op_data[ss], field_name);
1040  }
1041  break;
1042  default:
1043  SETERRQ1(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
1044  "Not implemented for this space", space);
1045  }
1046  last_eval_field_name[ss] = field_name;
1047  }
1048  }
1049  }
1050 
1051  if (oit->getOpType() & UserDataOperator::OPROW) {
1052  try {
1053  CHKERR oit->opRhs(*op_data[0], false);
1054  }
1055  CATCH_OP_ERRORS(*oit);
1056  }
1057 
1058  if (oit->getOpType() & UserDataOperator::OPCOL) {
1059  try {
1060  CHKERR oit->opRhs(*op_data[1], false);
1061  }
1062  CATCH_OP_ERRORS(*oit);
1063  }
1064 
1065  if (oit->getOpType() & UserDataOperator::OPROWCOL) {
1066  try {
1067  CHKERR oit->opLhs(*op_data[0], *op_data[1], oit->sYmm);
1068  }
1069  CATCH_OP_ERRORS(*oit);
1070  }
1071  }
1072  }
1074 }
boost::ptr_vector< UserDataOperator > opPtrVector
Vector of finite element users data operators.
field with continuous normal traction
Definition: definitions.h:172
MoFEMErrorCode getNoFieldColIndices(DataForcesAndSourcesCore &data, const std::string &field_name) const
get col NoField indices
MoFEMErrorCode getColNodesIndices(DataForcesAndSourcesCore &data, const std::string &field_name) const
get col node indices from FENumeredDofEntity_multiIndex
const boost::shared_ptr< DataForcesAndSourcesCore > derivedDataOnElement[LASTSPACE]
Entity data on element entity columns fields.
scalar or vector of scalars describe (no true field)
Definition: definitions.h:169
MoFEMErrorCode getNodesFieldData(const boost::string_ref field_name, FEDofEntity_multiIndex &dofs, VectorDouble &nodes_data, VectorDofs &nodes_dofs, FieldSpace &space, FieldApproximationBase &base) const
Get field data on nodes.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
const boost::shared_ptr< DataForcesAndSourcesCore > dataOnElement[LASTSPACE]
Entity data on element entity rows fields.
std::string feName
Name of finite element.
int getNinTheLoop() const
get number of evaluated element in the loop
MoFEMErrorCode getNoFieldRowIndices(DataForcesAndSourcesCore &data, const std::string &field_name) const
get col NoField indices
OpType
Controls loop over entities on element.
MoFEMErrorCode getNoFieldFieldData(const boost::string_ref field_name, FEDofEntity_multiIndex &dofs, VectorDouble &ent_field_data, VectorDofs &ent_field_dofs) const
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
#define CATCH_OP_ERRORS(OP)
field with continuous tangents
Definition: definitions.h:171
FieldSpace
approximation spaces
Definition: definitions.h:167
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:53
#define CHKERR
Inline error check.
Definition: definitions.h:595
MoFEMErrorCode getEntityFieldData(DataForcesAndSourcesCore &data, const std::string &field_name, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
MoFEMErrorCode getEntityColIndices(DataForcesAndSourcesCore &data, const std::string &field_name, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406
continuous field
Definition: definitions.h:170
virtual const Field * get_field_structure(const std::string &name)=0
get field structure
MoFEMErrorCode getRowNodesIndices(DataForcesAndSourcesCore &data, const std::string &field_name) const
get row node indices from FENumeredDofEntity_multiIndex
MoFEMErrorCode getEntityRowIndices(DataForcesAndSourcesCore &data, const std::string &field_name, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
field with C-1 continuity
Definition: definitions.h:173

◆ operator()()

virtual MoFEMErrorCode MoFEM::ForcesAndSourcesCore::operator() ( )
virtual

function is run for every finite element

It is used to calculate element local matrices and assembly. It can be used for post-processing.

Reimplemented from MoFEM::BasicMethod.

Reimplemented in MoFEM::FaceElementForcesAndSourcesCore, MoFEM::VolumeElementForcesAndSourcesCore, MoFEM::FatPrismElementForcesAndSourcesCore, MoFEM::FlatPrismElementForcesAndSourcesCore, MoFEM::EdgeElementForcesAndSourcesCore, NeummanForcesSurfaceComplexForLazy::MyTriangleSpatialFE, and MoFEM::VertexElementForcesAndSourcesCore.

Definition at line 671 of file ForcesAndSourcesCore.hpp.

671  {
673  if (operatorHook) {
674  ierr = operatorHook();
675  CHKERRG(ierr);
676  }
678  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
boost::function< MoFEMErrorCode()> operatorHook
Hook function for operator.

◆ postProcess()

virtual MoFEMErrorCode MoFEM::ForcesAndSourcesCore::postProcess ( )
virtual

function is run at the end of loop

It is used to assembly matrices and vectors, calculating global variables, f.e. total internal energy, ect.

Iterating over dofs: Example1 iterating over dofs in row by name of the field for(IT_GET_FEROW_BY_NAME_DOFS_FOR_LOOP(this,"DISPLACEMENT",it)) { ... }

Reimplemented from MoFEM::BasicMethod.

Reimplemented in PostProcFaceOnRefinedMesh, PostProcFatPrismOnRefinedMesh, SolidShellModule::SolidShellPrismElement::PostProcFatPrismOnTriangleOnRefinedMesh, PostProcTemplateVolumeOnRefinedMesh< MoFEM::VolumeElementForcesAndSourcesCore >, GelModule::Gel::GelFE, MoFEM::FatPrismElementForcesAndSourcesCore, KelvinVoigtDamper::DamperFE, SolidShellModule::SolidShellPrismElement::SolidShellError, SolidShellModule::SolidShellPrismElement::SolidShell, Smoother::MyVolumeFE, and NonlinearElasticElement::MyVolumeFE.

Definition at line 679 of file ForcesAndSourcesCore.hpp.

679  {
681  if (postProcessHook) {
682  ierr = postProcessHook();
683  CHKERRG(ierr);
684  }
686  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
boost::function< MoFEMErrorCode()> postProcessHook
Hook function for post-processing.

◆ preProcess()

virtual MoFEMErrorCode MoFEM::ForcesAndSourcesCore::preProcess ( )
virtual

function is run at the beginning of loop

It is used to zeroing matrices and vectors, calculation of shape functions on reference element, preprocessing boundary conditions, etc.

Reimplemented from MoFEM::BasicMethod.

Reimplemented in EdgeSlidingConstrains::MyEdgeFE, PostProcFaceOnRefinedMesh, PostProcFatPrismOnRefinedMesh, PostProcTemplateVolumeOnRefinedMesh< MoFEM::VolumeElementForcesAndSourcesCore >, GelModule::Gel::GelFE, SurfaceSlidingConstrains::MyTriangleFE, MoFEM::FatPrismElementForcesAndSourcesCore, KelvinVoigtDamper::DamperFE, SolidShellModule::SolidShellPrismElement::SolidShellError, SolidShellModule::SolidShellPrismElement::SolidShell, NeummanForcesSurfaceComplexForLazy::MyTriangleSpatialFE, Smoother::MyVolumeFE, NonlinearElasticElement::MyVolumeFE, and FluidPressure::MyTriangleFE.

Definition at line 663 of file ForcesAndSourcesCore.hpp.

663  {
665  if (preProcessHook) {
666  ierr = preProcessHook();
667  CHKERRG(ierr);
668  }
670  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
boost::function< MoFEMErrorCode()> preProcessHook
Hook function for pre-processing.

◆ setGaussPts() [1/2]

virtual MoFEMErrorCode MoFEM::ForcesAndSourcesCore::setGaussPts ( int  order_row,
int  order_col,
int  order_data 
)
virtual

set user specific integration rule

This function allows for user defined integration rule. The key is to called matrix gaussPts, which is used by other MoFEM procedures. Matrix has number of rows equal to problem dimension plus one, where last index is used to store weight values. Number of columns is equal to number of integration points.

Note
This function is called if method ForcesAndSourcesCore::getRule is returning integer -1 or any other negative integer.

User sets

where

gaussPts.resize(dim+1,nb_gauss_pts);

number rows represents local coordinates of integration points in reference element, where last index in row is for integration weight.

Definition at line 347 of file ForcesAndSourcesCore.hpp.

348  {
349  return setRuleHook ? setRuleHook(order_row, order_col, order_data)
350  : setGaussPts(order_data);
351  }
virtual MoFEMErrorCode setGaussPts(int order_row, int order_col, int order_data)
set user specific integration rule
RuleHookFun setRuleHook
Set function to calculate integration rule.

◆ setGaussPts() [2/2]

virtual MoFEMErrorCode MoFEM::ForcesAndSourcesCore::setGaussPts ( int  order)
virtual
Deprecated:
setGaussPts(int row_order, int col_order, int data order);

Reimplemented in PostProcFaceOnRefinedMesh, PostProcTemplateVolumeOnRefinedMesh< MoFEM::VolumeElementForcesAndSourcesCore >, MoFEM::VolumeElementForcesAndSourcesCoreOnSide, and NitscheMethod::MyVolumeFE.

Definition at line 725 of file ForcesAndSourcesCore.hpp.

725  {
727  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "sorry, not implemented");
729  }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

Member Data Documentation

◆ dataH1

DataForcesAndSourcesCore& MoFEM::ForcesAndSourcesCore::dataH1

Definition at line 57 of file ForcesAndSourcesCore.hpp.

◆ dataHcurl

DataForcesAndSourcesCore& MoFEM::ForcesAndSourcesCore::dataHcurl

Definition at line 58 of file ForcesAndSourcesCore.hpp.

◆ dataHdiv

DataForcesAndSourcesCore& MoFEM::ForcesAndSourcesCore::dataHdiv

Definition at line 59 of file ForcesAndSourcesCore.hpp.

◆ dataL2

DataForcesAndSourcesCore& MoFEM::ForcesAndSourcesCore::dataL2

Definition at line 60 of file ForcesAndSourcesCore.hpp.

◆ dataNoField

DataForcesAndSourcesCore& MoFEM::ForcesAndSourcesCore::dataNoField

Definition at line 56 of file ForcesAndSourcesCore.hpp.

◆ dataOnElement

const boost::shared_ptr<DataForcesAndSourcesCore> MoFEM::ForcesAndSourcesCore::dataOnElement[LASTSPACE]

Entity data on element entity rows fields.

FIXME: that should be moved to private class data and acessed only by member function

Definition at line 45 of file ForcesAndSourcesCore.hpp.

◆ derivedDataOnElement

const boost::shared_ptr<DataForcesAndSourcesCore> MoFEM::ForcesAndSourcesCore::derivedDataOnElement[LASTSPACE]

Entity data on element entity columns fields.

FIXME: that should be moved to private class data and acessed only by member function

Definition at line 54 of file ForcesAndSourcesCore.hpp.

◆ elementPolynomialBasePtr

boost::shared_ptr<BaseFunction> MoFEM::ForcesAndSourcesCore::elementPolynomialBasePtr
private

Pointer to entity polynomial base.

Definition at line 744 of file ForcesAndSourcesCore.hpp.

◆ gaussPts

MatrixDouble MoFEM::ForcesAndSourcesCore::gaussPts

Matrix of integration points.

Columns is equal to number of integration points, numver of rows depends on dimension of finite element entity, for example for tetrahedron rows are x,y,z,weight. Last row is integration weight.

FIXME: that should be moved to private class data and acessed only by member function

Definition at line 661 of file ForcesAndSourcesCore.hpp.

◆ getRuleHook

RuleHookFun MoFEM::ForcesAndSourcesCore::getRuleHook

Hook to get rule.

Todo:
check preferred format how works with gcc and clang, see http://www.boost.org/doc/libs/1_64_0/doc/html/function/tutorial.html#idp247873024
Examples
EshelbianOperators.cpp.

Definition at line 273 of file ForcesAndSourcesCore.hpp.

◆ lastEvaluatedElementEntityType

EntityType MoFEM::ForcesAndSourcesCore::lastEvaluatedElementEntityType
private

Last evaluated type of element entity.

@/}

Definition at line 738 of file ForcesAndSourcesCore.hpp.

◆ mField

Interface& MoFEM::ForcesAndSourcesCore::mField

Definition at line 36 of file ForcesAndSourcesCore.hpp.

◆ opPtrVector

boost::ptr_vector<UserDataOperator> MoFEM::ForcesAndSourcesCore::opPtrVector

Vector of finite element users data operators.

FIXME: that should be moved to private class data and acessed only by member function

Definition at line 628 of file ForcesAndSourcesCore.hpp.

◆ setRuleHook

RuleHookFun MoFEM::ForcesAndSourcesCore::setRuleHook

Set function to calculate integration rule.

Definition at line 279 of file ForcesAndSourcesCore.hpp.

◆ userPolynomialBasePtr

boost::shared_ptr<BaseFunction> MoFEM::ForcesAndSourcesCore::userPolynomialBasePtr
private

Pointer to user polynomail base.

Definition at line 749 of file ForcesAndSourcesCore.hpp.


The documentation for this struct was generated from the following files: