v0.9.1
Classes | Public Member Functions | Protected Attributes | Friends | List of all members
MoFEM::FlatPrismElementForcesAndSourcesCore Struct Reference

FlatPrism finite elementUser is implementing own operator at Gauss points level, by own object derived from FlatPrismElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to rowOpPtrVector and rowColOpPtrVector. More...

#include <src/finite_elements/FlatPrismElementForcesAndSourcesCore.hpp>

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

Classes

struct  UserDataOperator
 default operator for Flat Prism element More...
 

Public Member Functions

 FlatPrismElementForcesAndSourcesCore (Interface &m_field)
 
MoFEMErrorCode operator() ()
 function is run for every finite element More...
 
- Public Member Functions inherited from MoFEM::ForcesAndSourcesCore
 ForcesAndSourcesCore (Interface &m_field)
 
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 postProcess ()
 function is run at the end of loop More...
 
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 getNumberOfNodes (int &num_nodes) const
 Get number of DOFs on element. More...
 
const DataForcesAndSourcesCore::EntDatagetEntData (const FieldSpace space, const EntityType type, const int side) const
 Get the entity data. More...
 
DataForcesAndSourcesCore::EntDatagetEntData (const FieldSpace space, const EntityType type, const int side)
 Get the entity data. 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
 
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
 
- Public Member Functions inherited from MoFEM::BasicMethod
 BasicMethod ()
 
virtual ~BasicMethod ()=default
 
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 ()=default
 
MoFEMErrorCode copyKsp (const KspMethod &ksp)
 copy data form another method More...
 
- Public Member Functions inherited from MoFEM::PetscData
 PetscData ()
 
virtual ~PetscData ()=default
 
- 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 ()=default
 
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 ()=default
 
MoFEMErrorCode copySnes (const SnesMethod &snes)
 Copy snes data. More...
 
DEPRECATED MoFEMErrorCode setSnesCtx (SNESContext ctx)
 
- Public Member Functions inherited from MoFEM::TSMethod
 TSMethod ()
 
virtual ~TSMethod ()=default
 
MoFEMErrorCode copyTs (const TSMethod &ts)
 Copy TS solver data. More...
 
DEPRECATED MoFEMErrorCode setTsCtx (TSContext ctx)
 

Protected Attributes

double aRea [2]
 
VectorDouble normal
 
VectorDouble coords
 
MatrixDouble coordsAtGaussPts
 
std::string meshPositionsFieldName
 
MatrixDouble hoCoordsAtGaussPtsF3
 
MatrixDouble nOrmals_at_GaussPtF3
 
MatrixDouble tAngent1_at_GaussPtF3
 
MatrixDouble tAngent2_at_GaussPtF3
 
MatrixDouble hoCoordsAtGaussPtsF4
 
MatrixDouble nOrmals_at_GaussPtF4
 
MatrixDouble tAngent1_at_GaussPtF4
 
MatrixDouble tAngent2_at_GaussPtF4
 
OpGetCoordsAndNormalsOnPrism opHOCoordsAndNormals
 
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore
const std::array< boost::shared_ptr< DataForcesAndSourcesCore >, LASTSPACEdataOnElement
 Entity data on element entity rows fields. More...
 
const std::array< boost::shared_ptr< DataForcesAndSourcesCore >, LASTSPACEderivedDataOnElement
 Entity data on element entity columns fields. More...
 
DataForcesAndSourcesCoredataNoField
 
DataForcesAndSourcesCoredataH1
 
DataForcesAndSourcesCoredataHcurl
 
DataForcesAndSourcesCoredataHdiv
 
DataForcesAndSourcesCoredataL2
 
boost::ptr_vector< UserDataOperatoropPtrVector
 Vector of finite element users data operators. More...
 
EntityType lastEvaluatedElementEntityType
 Last evaluated type of element entity. More...
 

Friends

class UserDataOperator
 

Additional Inherited Members

- Public Types inherited from MoFEM::ForcesAndSourcesCore
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::PetscData
enum  DataContext {
  CTX_SET_NONE = 0, CTX_SET_F = 1 << 0, CTX_SET_A = 1 << 1, CTX_SET_B = 1 << 2,
  CTX_SET_X = 1 << 3, CTX_SET_X_T = 1 << 4, CTX_SET_X_TT = 1 << 6, CTX_SET_TIME = 1 << 7
}
 
using Switches = std::bitset< 8 >
 
- 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 Attributes inherited from MoFEM::ForcesAndSourcesCore
InterfacemField
 
RuleHookFun getRuleHook
 Hook to get rule. More...
 
RuleHookFun setRuleHook
 Set function to calculate integration rule. 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
 
Mat & ksp_A
 
Mat & ksp_B
 
- Public Attributes inherited from MoFEM::PetscData
Switches data_ctx
 
Vec f
 
Mat A
 
Mat B
 
Vec x
 
Vec x_t
 
Vec x_tt
 
- Public Attributes inherited from MoFEM::SnesMethod
SNESContext snes_ctx
 
SNES snes
 snes solver More...
 
Vec & snes_x
 state vector More...
 
Vec & snes_f
 residual More...
 
Mat & snes_A
 jacobian matrix More...
 
Mat & snes_B
 preconditioner of jacobian matrix More...
 
- Public Attributes inherited from MoFEM::TSMethod
TS ts
 time solver More...
 
TSContext ts_ctx
 
PetscInt ts_step
 time step More...
 
PetscReal ts_a
 shift for U_tt (see PETSc Time Solver) More...
 
PetscReal ts_v
 shift for U_t shift for U_t More...
 
PetscReal ts_t
 time More...
 
Vec & ts_u
 state vector More...
 
Vec & ts_u_t
 time derivative of state vector More...
 
Vec & ts_u_tt
 second time derivative of state vector More...
 
Vec & ts_F
 residual vector More...
 
Mat & ts_A
 
Mat & ts_B
 Preconditioner for ts_A. More...
 
- Static Public Attributes inherited from MoFEM::PetscData
static constexpr Switches CtxSetNone = PetscData::Switches(CTX_SET_NONE)
 
static constexpr Switches CtxSetF = PetscData::Switches(CTX_SET_F)
 
static constexpr Switches CtxSetA = PetscData::Switches(CTX_SET_A)
 
static constexpr Switches CtxSetB = PetscData::Switches(CTX_SET_B)
 
static constexpr Switches CtxSetX = PetscData::Switches(CTX_SET_X)
 
static constexpr Switches CtxSetX_T = PetscData::Switches(CTX_SET_X_T)
 
static constexpr Switches CtxSetX_TT = PetscData::Switches(CTX_SET_X_TT)
 
static constexpr Switches CtxSetTime = PetscData::Switches(CTX_SET_TIME)
 
- Protected Member Functions inherited from MoFEM::ForcesAndSourcesCore
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 getFaceTriNodes (DataForcesAndSourcesCore &data) const
 Get nodes on triangles. More...
 
MoFEMErrorCode getSpacesAndBaseOnEntities (DataForcesAndSourcesCore &data) const
 Get field approximation space and base on entities. More...
 
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...
 
MoFEMErrorCode calHierarchicalBaseFunctionsOnElement (const FieldApproximationBase b)
 Calculate base functions. More...
 
MoFEMErrorCode calHierarchicalBaseFunctionsOnElement ()
 Calculate base functions. More...
 
MoFEMErrorCode calBernsteinBezierBaseFunctionsOnElement ()
 Calculate Bernstein-Bezier base. More...
 
MoFEMErrorCode createDataOnElement ()
 Create a entity data on element object. More...
 
MoFEMErrorCode loopOverOperators ()
 Iterate user data operators. 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 getNoFieldFieldData (const boost::string_ref field_name, FEDofEntity_multiIndex &dofs, VectorDouble &ent_field_data, VectorDofs &ent_field_dofs) const
 Get field data on nodes. More...
 
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 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)
 
virtual MoFEMErrorCode setGaussPts (int order)
 
- 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

FlatPrism finite element

User is implementing own operator at Gauss points level, by own object derived from FlatPrismElementForcesAndSourcesCoreL::UserDataOperator. Arbitrary number of operator added pushing objects to rowOpPtrVector and rowColOpPtrVector.

Examples
forces_and_sources_testing_flat_prism_element.cpp.

Definition at line 39 of file FlatPrismElementForcesAndSourcesCore.hpp.

Constructor & Destructor Documentation

◆ FlatPrismElementForcesAndSourcesCore()

MoFEM::FlatPrismElementForcesAndSourcesCore::FlatPrismElementForcesAndSourcesCore ( Interface m_field)

Definition at line 23 of file FlatPrismElementForcesAndSourcesCore.cpp.

25  : ForcesAndSourcesCore(m_field),
26  meshPositionsFieldName("MESH_NODE_POSITIONS"),
32  boost::shared_ptr<BaseFunction>(new FlatPrismPolynomialBase());
33 }
ForcesAndSourcesCore(Interface &m_field)
auto & getElementPolynomialBase()
Get the Entity Polynomial Base object.

Member Function Documentation

◆ operator()()

MoFEMErrorCode MoFEM::FlatPrismElementForcesAndSourcesCore::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::ForcesAndSourcesCore.

Definition at line 35 of file FlatPrismElementForcesAndSourcesCore.cpp.

35  {
37 
38  if (numeredEntFiniteElementPtr->getEntType() != MBPRISM)
41 
42  DataForcesAndSourcesCore &data_div = *dataOnElement[HDIV];
43  DataForcesAndSourcesCore &data_curl = *dataOnElement[HCURL];
44  DataForcesAndSourcesCore &data_l2 = *dataOnElement[HCURL];
45 
47  int num_nodes;
48  const EntityHandle *conn;
49  CHKERR mField.get_moab().get_connectivity(ent, conn, num_nodes, true);
50  {
51  coords.resize(num_nodes * 3, false);
52  CHKERR mField.get_moab().get_coords(conn, num_nodes,
53  &*coords.data().begin());
54 
55  double diff_n[6];
56  CHKERR ShapeDiffMBTRI(diff_n);
57  normal.resize(6, false);
58  CHKERR ShapeFaceNormalMBTRI(diff_n, &coords[0], &normal[0]);
59  CHKERR ShapeFaceNormalMBTRI(diff_n, &coords[9], &normal[3]);
60  aRea[0] = cblas_dnrm2(3, &normal[0], 1) * 0.5;
61  aRea[1] = cblas_dnrm2(3, &normal[3], 1) * 0.5;
62  }
63 
65 
66  // H1
67  if ((dataH1.spacesOnEntities[MBVERTEX]).test(H1)) {
68  CHKERR getEntitySense<MBEDGE>(dataH1);
69  CHKERR getEntityDataOrder<MBEDGE>(dataH1, H1);
70  CHKERR getEntitySense<MBTRI>(dataH1);
71  CHKERR getEntityDataOrder<MBTRI>(dataH1, H1);
72  }
73 
74  // H1
75  if ((dataH1.spacesOnEntities[MBEDGE]).test(HCURL)) {
76  CHKERR getEntitySense<MBEDGE>(data_curl);
77  CHKERR getEntityDataOrder<MBEDGE>(data_curl, HCURL);
78  CHKERR getEntitySense<MBTRI>(data_curl);
79  CHKERR getEntityDataOrder<MBTRI>(data_curl, HCURL);
80  }
81 
82  // Hdiv
83  if ((dataH1.spacesOnEntities[MBTRI]).test(HDIV)) {
84  CHKERR getEntitySense<MBTRI>(data_div);
85  CHKERR getEntityDataOrder<MBTRI>(data_div, HDIV);
86  }
87 
88  // L2
89  if ((dataH1.spacesOnEntities[MBTRI]).test(L2)) {
90  CHKERR getEntitySense<MBTRI>(data_l2);
91  CHKERR getEntityDataOrder<MBTRI>(data_l2, L2);
92  }
93 
94  int order_data = getMaxDataOrder();
95  int order_row = getMaxRowOrder();
96  int order_col = getMaxColOrder();
97  int rule = getRule(order_row, order_col, order_data);
98  int nb_gauss_pts;
99  // int rule = getRule(order);
100  if (rule >= 0) {
101  if (rule < QUAD_2D_TABLE_SIZE) {
102  if (QUAD_2D_TABLE[rule]->dim != 2) {
103  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "wrong dimension");
104  }
105  if (QUAD_2D_TABLE[rule]->order < rule) {
106  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
107  "wrong order %d != %d", QUAD_2D_TABLE[rule]->order, rule);
108  }
109  nb_gauss_pts = QUAD_2D_TABLE[rule]->npoints;
110  gaussPts.resize(3, nb_gauss_pts, false);
111  cblas_dcopy(nb_gauss_pts, &QUAD_2D_TABLE[rule]->points[1], 3,
112  &gaussPts(0, 0), 1);
113  cblas_dcopy(nb_gauss_pts, &QUAD_2D_TABLE[rule]->points[2], 3,
114  &gaussPts(1, 0), 1);
115  cblas_dcopy(nb_gauss_pts, QUAD_2D_TABLE[rule]->weights, 1,
116  &gaussPts(2, 0), 1);
117  dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).resize(nb_gauss_pts, 3,
118  false);
119  double *shape_ptr =
120  &*dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).data().begin();
121  cblas_dcopy(3 * nb_gauss_pts, QUAD_2D_TABLE[rule]->points, 1, shape_ptr,
122  1);
123  } else {
124  SETERRQ2(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
125  "rule > quadrature order %d < %d", rule, QUAD_2D_TABLE_SIZE);
126  nb_gauss_pts = 0;
127  }
128  } else {
129  CHKERR setGaussPts(order_row, order_col, order_data);
130  nb_gauss_pts = gaussPts.size2();
131  dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).resize(nb_gauss_pts, 3,
132  false);
133  if (nb_gauss_pts) {
135  &*dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE).data().begin(),
136  &gaussPts(0, 0), &gaussPts(1, 0), nb_gauss_pts);
137  }
138  }
139  if (nb_gauss_pts == 0)
141 
142  {
143  coordsAtGaussPts.resize(nb_gauss_pts, 6, false);
144  for (int gg = 0; gg < nb_gauss_pts; gg++) {
145  for (int dd = 0; dd < 3; dd++) {
147  3, &dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE)(gg, 0), 1,
148  &coords[dd], 3);
149  coordsAtGaussPts(gg, 3 + dd) = cblas_ddot(
150  3, &dataH1.dataOnEntities[MBVERTEX][0].getN(NOBASE)(gg, 0), 1,
151  &coords[9 + dd], 3);
152  }
153  }
154  }
155 
156  for (int space = HCURL; space != LASTSPACE; ++space)
157  if (dataOnElement[space]) {
158  dataH1.dataOnEntities[MBVERTEX][0].getNSharedPtr(NOBASE) =
159  dataOnElement[H1]->dataOnEntities[MBVERTEX][0].getNSharedPtr(NOBASE);
160  }
161 
162  for (int b = AINSWORTH_LEGENDRE_BASE; b != LASTBASE; b++) {
163  if (dataH1.bAse.test(b)) {
164  switch (static_cast<FieldApproximationBase>(b)) {
167  if (dataH1.spacesOnEntities[MBVERTEX].test(H1)) {
168  CHKERR getElementPolynomialBase()->getValue(
169  gaussPts,
170  boost::shared_ptr<BaseFunctionCtx>(new FlatPrismPolynomialBaseCtx(
172  H1, static_cast<FieldApproximationBase>(b), NOBASE)));
173  }
174  if (dataH1.spacesOnEntities[MBTRI].test(HDIV)) {
175  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
176  "Not yet implemented");
177  }
178  if (dataH1.spacesOnEntities[MBEDGE].test(HCURL)) {
179  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
180  "Not yet implemented");
181  }
182  if (dataH1.spacesOnEntities[MBTET].test(L2)) {
183  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
184  "Not yet implemented");
185  }
186  break;
187  default:
188  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
189  "Not yet implemented");
190  }
191  }
192  }
193 
194  if (dataPtr->get<FieldName_mi_tag>().find(meshPositionsFieldName) !=
195  dataPtr->get<FieldName_mi_tag>().end()) {
196  hoCoordsAtGaussPtsF3.resize(nb_gauss_pts, 3, false);
197  nOrmals_at_GaussPtF3.resize(nb_gauss_pts, 3, false);
198  tAngent1_at_GaussPtF3.resize(nb_gauss_pts, 3, false);
199  tAngent2_at_GaussPtF3.resize(nb_gauss_pts, 3, false);
200  hoCoordsAtGaussPtsF4.resize(nb_gauss_pts, 3, false);
201  nOrmals_at_GaussPtF4.resize(nb_gauss_pts, 3, false);
202  tAngent1_at_GaussPtF4.resize(nb_gauss_pts, 3, false);
203  tAngent2_at_GaussPtF4.resize(nb_gauss_pts, 3, false);
209  } else {
210  hoCoordsAtGaussPtsF3.resize(0, 0, false);
211  nOrmals_at_GaussPtF3.resize(0, 0, false);
212  tAngent1_at_GaussPtF3.resize(0, 0, false);
213  tAngent2_at_GaussPtF3.resize(0, 0, false);
214  hoCoordsAtGaussPtsF4.resize(0, 0, false);
215  nOrmals_at_GaussPtF4.resize(0, 0, false);
216  tAngent1_at_GaussPtF4.resize(0, 0, false);
217  tAngent2_at_GaussPtF4.resize(0, 0, false);
218  }
219 
220  if (dataH1.spacesOnEntities[MBTRI].test(HDIV)) {
221  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "not implemented yet");
222  }
223 
224  // Iterate over operators
226 
228 }
int getMaxRowOrder() const
Get max order of approximation for field in rows.
MatrixDouble gaussPts
Matrix of integration points.
field with continuous normal traction
Definition: definitions.h:178
virtual moab::Interface & get_moab()=0
virtual int getRule(int order_row, int order_col, int order_data)
another variant of getRule
virtual MoFEMErrorCode opRhs(DataForcesAndSourcesCore &data, const bool error_if_no_base=false)
MoFEMErrorCode createDataOnElement()
Create a entity data on element object.
DataForcesAndSourcesCore & dataH1
std::array< boost::ptr_vector< EntData >, MBMAXTYPE > dataOnEntities
int npoints
Definition: quad.h:29
PetscErrorCode ShapeFaceNormalMBTRI(double *diffN, const double *coords, double *normal)
Definition: fem_tools.c:241
void cblas_dcopy(const int N, const double *X, const int incX, double *Y, const int incY)
Definition: cblas_dcopy.c:11
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:482
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:513
boost::shared_ptr< const FEDofEntity_multiIndex > dataPtr
Pointer to finite element data dofs.
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:180
double cblas_dnrm2(const int N, const double *X, const int incX)
Definition: cblas_dnrm2.c:12
double cblas_ddot(const int N, const double *X, const int incX, const double *Y, const int incY)
Definition: cblas_ddot.c:12
#define QUAD_2D_TABLE_SIZE
Definition: quad.h:174
static QUAD *const QUAD_2D_TABLE[]
Definition: quad.h:175
MoFEMErrorCode loopOverOperators()
Iterate user data operators.
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
MoFEMErrorCode getNodesFieldData(DataForcesAndSourcesCore &data, const std::string &field_name) const
Get data on nodes.
PetscErrorCode ShapeDiffMBTRI(double *diffN)
calculate derivatives of shape functions
Definition: fem_tools.c:206
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
constexpr int order
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:151
field with continuous tangents
Definition: definitions.h:177
virtual MoFEMErrorCode setGaussPts(int order_row, int order_col, int order_data)
set user specific integration rule
#define CHKERR
Inline error check.
Definition: definitions.h:601
MoFEMErrorCode getEntityFieldData(DataForcesAndSourcesCore &data, const std::string &field_name, const EntityType type_lo=MBVERTEX, const EntityType type_hi=MBPOLYHEDRON) const
PetscErrorCode ShapeMBTRI(double *N, const double *X, const double *Y, const int G_DIM)
calculate shape functions on triangle
Definition: fem_tools.c:194
std::array< std::bitset< LASTSPACE >, MBMAXTYPE > spacesOnEntities
spaces on entity types
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:412
continuous field
Definition: definitions.h:176
MoFEMErrorCode getSpacesAndBaseOnEntities(DataForcesAndSourcesCore &data) const
Get field approximation space and base on entities.
const std::array< boost::shared_ptr< DataForcesAndSourcesCore >, LASTSPACE > dataOnElement
Entity data on element entity rows fields.
std::bitset< LASTBASE > bAse
bases on element
int getMaxColOrder() const
Get max order of approximation for field in columns.
int getMaxDataOrder() const
Get max order of approximation for data fields.
auto & getElementPolynomialBase()
Get the Entity Polynomial Base object.
field with C-1 continuity
Definition: definitions.h:179

Friends And Related Function Documentation

◆ UserDataOperator

friend class UserDataOperator
friend

Member Data Documentation

◆ aRea

double MoFEM::FlatPrismElementForcesAndSourcesCore::aRea[2]
protected

Definition at line 162 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ coords

VectorDouble MoFEM::FlatPrismElementForcesAndSourcesCore::coords
protected

Definition at line 164 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ coordsAtGaussPts

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::coordsAtGaussPts
protected

Definition at line 165 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ hoCoordsAtGaussPtsF3

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::hoCoordsAtGaussPtsF3
protected

Definition at line 169 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ hoCoordsAtGaussPtsF4

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::hoCoordsAtGaussPtsF4
protected

Definition at line 173 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ meshPositionsFieldName

std::string MoFEM::FlatPrismElementForcesAndSourcesCore::meshPositionsFieldName
protected

Definition at line 167 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ normal

VectorDouble MoFEM::FlatPrismElementForcesAndSourcesCore::normal
protected

Definition at line 163 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ nOrmals_at_GaussPtF3

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::nOrmals_at_GaussPtF3
protected

Definition at line 170 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ nOrmals_at_GaussPtF4

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::nOrmals_at_GaussPtF4
protected

Definition at line 174 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ opHOCoordsAndNormals

OpGetCoordsAndNormalsOnPrism MoFEM::FlatPrismElementForcesAndSourcesCore::opHOCoordsAndNormals
protected

Definition at line 177 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ tAngent1_at_GaussPtF3

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::tAngent1_at_GaussPtF3
protected

Definition at line 171 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ tAngent1_at_GaussPtF4

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::tAngent1_at_GaussPtF4
protected

Definition at line 175 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ tAngent2_at_GaussPtF3

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::tAngent2_at_GaussPtF3
protected

Definition at line 172 of file FlatPrismElementForcesAndSourcesCore.hpp.

◆ tAngent2_at_GaussPtF4

MatrixDouble MoFEM::FlatPrismElementForcesAndSourcesCore::tAngent2_at_GaussPtF4
protected

Definition at line 176 of file FlatPrismElementForcesAndSourcesCore.hpp.


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