v0.14.0
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
MoFEM::ForcesAndSourcesCore::UserDataOperator Struct Reference

#include <src/finite_elements/ForcesAndSourcesCore.hpp>

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

Public Types

enum  OpType {
  OPROW = 1 << 0, OPCOL = 1 << 1, OPROWCOL = 1 << 2, OPSPACE = 1 << 3,
  OPLAST = 1 << 3
}
 Controls loop over entities on element. More...
 
- Public Types inherited from MoFEM::DataOperator
using DoWorkLhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)>
 
using DoWorkRhsHookFunType = boost::function< MoFEMErrorCode(DataOperator *op_ptr, int side, EntityType type, EntitiesFieldData::EntData &data)>
 

Public Member Functions

 UserDataOperator (const FieldSpace space, const char type=OPSPACE, const bool symm=true)
 
 UserDataOperator (const std::string field_name, const char type, const bool symm=true)
 
 UserDataOperator (const std::string row_field_name, const std::string col_field_name, const char type, const bool symm=true)
 
boost::shared_ptr< const NumeredEntFiniteElementgetNumeredEntFiniteElementPtr () const
 Return raw pointer to NumeredEntFiniteElement. More...
 
EntityHandle getFEEntityHandle () const
 Return finite element entity handle. More...
 
int getFEDim () const
 Get dimension of finite element. More...
 
EntityType getFEType () const
 Get dimension of finite element. More...
 
boost::weak_ptr< SideNumbergetSideNumberPtr (const int side_number, const EntityType type)
 Get the side number pointer. More...
 
EntityHandle getSideEntity (const int side_number, const EntityType type)
 Get the side entity. More...
 
int getNumberOfNodesOnElement () const
 Get the number of nodes on finite element. More...
 
MoFEMErrorCode getProblemRowIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get row indices. More...
 
MoFEMErrorCode getProblemColIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get col indices. More...
 
const FEMethodgetFEMethod () const
 Return raw pointer to Finite Element Method object. More...
 
int getOpType () const
 Get operator types. More...
 
void setOpType (const OpType type)
 Set operator type. More...
 
void addOpType (const OpType type)
 Add operator type. More...
 
int getNinTheLoop () const
 get number of finite element in the loop More...
 
int getLoopSize () const
 get size of elements in the loop More...
 
std::string getFEName () const
 Get name of the element. More...
 
ForcesAndSourcesCoregetPtrFE () const
 
ForcesAndSourcesCoregetSidePtrFE () const
 
ForcesAndSourcesCoregetRefinePtrFE () const
 
Accessing KSP
const PetscData::SwitchesgetDataCtx () const
 
const KspMethod::KSPContext getKSPCtx () const
 
const SnesMethod::SNESContext getSNESCtx () const
 
const TSMethod::TSContext getTSCtx () const
 
Vec getKSPf () const
 
Mat getKSPA () const
 
Mat getKSPB () const
 
Accessing SNES
Vec getSNESf () const
 
Vec getSNESx () const
 
Mat getSNESA () const
 
Mat getSNESB () const
 
Accessing TS
Vec getTSu () const
 
Vec getTSu_t () const
 
Vec getTSu_tt () const
 
Vec getTSf () const
 
Mat getTSA () const
 
Mat getTSB () const
 
int getTSstep () const
 
double getTStime () const
 
double getTStimeStep () const
 
double getTSa () const
 
double getTSaa () const
 
Base funtions and integration points
MatrixDoublegetGaussPts ()
 matrix of integration (Gauss) points for Volume Element More...
 
auto getFTensor0IntegrationWeight ()
 Get integration weights. More...
 
Coordinates and access to internal data
MatrixDoublegetCoordsAtGaussPts ()
 Gauss points and weight, matrix (nb. of points x 3) More...
 
auto getFTensor1CoordsAtGaussPts ()
 Get coordinates at integration points assuming linear geometry. More...
 
Measures (area, volume, length, etc.)
double getMeasure () const
 get measure of element More...
 
doublegetMeasure ()
 get measure of element More...
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true)
 
virtual ~DataOperator ()=default
 
virtual MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 Operator for bi-linear form, usually to calculate values on left hand side. More...
 
virtual MoFEMErrorCode opLhs (EntitiesFieldData &row_data, EntitiesFieldData &col_data)
 
virtual MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 Operator for linear form, usually to calculate values on right hand side. More...
 
virtual MoFEMErrorCode opRhs (EntitiesFieldData &data, const bool error_if_no_base=false)
 
bool getSymm () const
 Get if operator uses symmetry of DOFs or not. More...
 
void setSymm ()
 set if operator is executed taking in account symmetry More...
 
void unSetSymm ()
 unset if operator is executed for non symmetric problem More...
 

Public Attributes

char opType
 
std::string rowFieldName
 
std::string colFieldName
 
FieldSpace sPace
 
- Public Attributes inherited from MoFEM::DataOperator
DoWorkLhsHookFunType doWorkLhsHook
 
DoWorkRhsHookFunType doWorkRhsHook
 
bool sYmm
 If true assume that matrix is symmetric structure. More...
 
std::array< bool, MBMAXTYPE > doEntities
 If true operator is executed for entity. More...
 
booldoVertices
 \deprectaed If false skip vertices More...
 
booldoEdges
 \deprectaed If false skip edges More...
 
booldoQuads
 \deprectaed More...
 
booldoTris
 \deprectaed More...
 
booldoTets
 \deprectaed More...
 
booldoPrisms
 \deprectaed More...
 

Static Public Attributes

static const char *const OpTypeNames []
 

Protected Member Functions

virtual MoFEMErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 

Protected Attributes

ForcesAndSourcesCoreptrFE
 

Friends

class ForcesAndSourcesCore
 
class EdgeElementForcesAndSourcesCore
 
class FaceElementForcesAndSourcesCore
 
class ContactPrismElementForcesAndSourcesCore
 

Loops

}

using AdjCache = std::map< EntityHandle, std::vector< boost::weak_ptr< NumeredEntFiniteElement > >>
 
MoFEMErrorCode loopSide (const string &fe_name, ForcesAndSourcesCore *side_fe, const size_t dim, const EntityHandle ent_for_side=0, boost::shared_ptr< Range > fe_range=nullptr, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy, AdjCache *adj_cache=nullptr)
 User calls this function to loop over elements on the side of face. This function calls finite element with its operator to do calculations. More...
 
MoFEMErrorCode loopThis (const string &fe_name, ForcesAndSourcesCore *this_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over the same element using a different set of integration points. This function calls finite element with its operator to do calculations. More...
 
MoFEMErrorCode loopParent (const string &fe_name, ForcesAndSourcesCore *parent_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations. More...
 
MoFEMErrorCode loopChildren (const string &fe_name, ForcesAndSourcesCore *child_fe, const int verb=QUIET, const LogManager::SeverityLevel sev=Sev::noisy)
 User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations. More...
 

Detailed Description

Examples
analytical_poisson_field_split.cpp, continuity_check_on_contact_prism_side_ele.cpp, continuity_check_on_skeleton_with_simple_2d_for_h1.cpp, continuity_check_on_skeleton_with_simple_2d_for_hcurl.cpp, continuity_check_on_skeleton_with_simple_2d_for_hdiv.cpp, dynamic_first_order_con_law.cpp, ElasticityMixedFormulation.hpp, EshelbianPlasticity.cpp, forces_and_sources_testing_users_base.cpp, hcurl_curl_operator.cpp, hdiv_divergence_operator.cpp, hello_world.cpp, HookeElement.hpp, level_set.cpp, MagneticElement.hpp, mesh_smoothing.cpp, mortar_contact_thermal.cpp, NavierStokesElement.hpp, prism_elements_from_surface.cpp, prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, schur_test_diag_mat.cpp, simple_contact_thermal.cpp, simple_elasticity.cpp, and simple_interface.cpp.

Definition at line 549 of file ForcesAndSourcesCore.hpp.

Member Typedef Documentation

◆ AdjCache

Definition at line 904 of file ForcesAndSourcesCore.hpp.

Member Enumeration Documentation

◆ OpType

Controls loop over entities on element.

  • OPROW is used if row vector is assembled
  • OPCOL is usually used if column vector is assembled
  • OPROWCOL is usually used for assemble matrices.
  • OPSPACE no field is defined for such operator. Is usually used to modify base

For typical problem like Bubnov-Galerkin OPROW and OPCOL are the same. In more general case for example for non-square matrices columns and rows could have different numeration and/or different set of fields.

Enumerator
OPROW 

operator doWork function is executed on FE rows

OPCOL 

operator doWork function is executed on FE columns

OPROWCOL 

operator doWork is executed on FE rows &columns

OPSPACE 

operator do Work is execute on space data

OPLAST 
Deprecated:
would be removed

Definition at line 566 of file ForcesAndSourcesCore.hpp.

566  {
567  OPROW = 1 << 0, ///< operator doWork function is executed on FE rows
568  OPCOL = 1 << 1, ///< operator doWork function is executed on FE columns
569  OPROWCOL = 1 << 2, ///< operator doWork is executed on FE rows &columns
570  OPSPACE = 1 << 3, ///< operator do Work is execute on space data
571  OPLAST = 1 << 3 ///< @deprecated would be removed
572  };

Constructor & Destructor Documentation

◆ UserDataOperator() [1/3]

UserDataOperator::UserDataOperator ( const FieldSpace  space,
const char  type = OPSPACE,
const bool  symm = true 
)

This Constructor is used typically when some modification base shape functions on some approx. space is applied. Operator is run for all data on space.

User has no access to field data from this operator.

Examples
EshelbianPlasticity.cpp.

Definition at line 1995 of file ForcesAndSourcesCore.cpp.

1998  : DataOperator(symm), opType(type), sPace(space), ptrFE(nullptr) {}

◆ UserDataOperator() [2/3]

UserDataOperator::UserDataOperator ( const std::string  field_name,
const char  type,
const bool  symm = true 
)

Definition at line 2000 of file ForcesAndSourcesCore.cpp.

◆ UserDataOperator() [3/3]

UserDataOperator::UserDataOperator ( const std::string  row_field_name,
const std::string  col_field_name,
const char  type,
const bool  symm = true 
)

Definition at line 2005 of file ForcesAndSourcesCore.cpp.

2008  : DataOperator(symm), opType(type), rowFieldName(row_field_name),
2009  colFieldName(col_field_name), sPace(LASTSPACE), ptrFE(nullptr) {}

Member Function Documentation

◆ addOpType()

void UserDataOperator::addOpType ( const OpType  type)
inline

Add operator type.

Definition at line 1053 of file ForcesAndSourcesCore.hpp.

1053  {
1054  opType |= type;
1055 }

◆ getCoordsAtGaussPts()

MatrixDouble & UserDataOperator::getCoordsAtGaussPts ( )
inline

Gauss points and weight, matrix (nb. of points x 3)

Column 0-2 integration points coordinate x, y and z, respectively. At rows are integration points.

Examples
MagneticElement.hpp, and UnsaturatedFlow.hpp.

Definition at line 1266 of file ForcesAndSourcesCore.hpp.

1266  {
1267  return static_cast<ForcesAndSourcesCore *>(ptrFE)->coordsAtGaussPts;
1268 }

◆ getDataCtx()

const PetscData::Switches & UserDataOperator::getDataCtx ( ) const
inline

Definition at line 1070 of file ForcesAndSourcesCore.hpp.

1070  {
1071  return getFEMethod()->data_ctx;
1072 }

◆ getFEDim()

int UserDataOperator::getFEDim ( ) const
inline

Get dimension of finite element.

Returns
int

Definition at line 1009 of file ForcesAndSourcesCore.hpp.

1009  {
1011 };

◆ getFEEntityHandle()

EntityHandle UserDataOperator::getFEEntityHandle ( ) const
inline

Return finite element entity handle.

Returns
Finite element entity handle
Examples
HookeInternalStressElement.hpp, and UnsaturatedFlow.hpp.

Definition at line 1005 of file ForcesAndSourcesCore.hpp.

1005  {
1006  return getNumeredEntFiniteElementPtr()->getEnt();
1007 }

◆ getFEMethod()

const FEMethod * UserDataOperator::getFEMethod ( ) const
inline

Return raw pointer to Finite Element Method object.

Examples
analytical_poisson_field_split.cpp, and UnsaturatedFlow.hpp.

Definition at line 1043 of file ForcesAndSourcesCore.hpp.

1043  {
1044  return ptrFE;
1045 }

◆ getFEName()

std::string UserDataOperator::getFEName ( ) const
inline

Get name of the element.

Definition at line 1065 of file ForcesAndSourcesCore.hpp.

1065  {
1066  return getFEMethod()->getFEName();
1067 }

◆ getFEType()

EntityType UserDataOperator::getFEType ( ) const
inline

Get dimension of finite element.

Returns
int

Definition at line 1013 of file ForcesAndSourcesCore.hpp.

1013  {
1015 };

◆ getFTensor0IntegrationWeight()

auto UserDataOperator::getFTensor0IntegrationWeight ( )
inline

Get integration weights.

for(int gg = 0; gg!=getGaussPts.size2(); ++gg) {
// integrate something
++t_w;
}
Returns
FTensor::Tensor0<FTensor::PackPtr<double *, 1>>
Examples
analytical_poisson_field_split.cpp, prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, and UnsaturatedFlow.hpp.

Definition at line 1241 of file ForcesAndSourcesCore.hpp.

1241  {
1243  &(getGaussPts()(getGaussPts().size1() - 1, 0)));
1244 }

◆ getFTensor1CoordsAtGaussPts()

auto UserDataOperator::getFTensor1CoordsAtGaussPts ( )
inline

Get coordinates at integration points assuming linear geometry.

auto t_coords = getFTensor1CoordsAtGaussPts();
for(int gg = 0;gg!=nb_int_ptrs;gg++) {
// do something
++t_coords;
}
Examples
prism_polynomial_approximation.cpp, quad_polynomial_approximation.cpp, and UnsaturatedFlow.hpp.

Definition at line 1270 of file ForcesAndSourcesCore.hpp.

1270  {
1272  &getCoordsAtGaussPts()(0, 0), &getCoordsAtGaussPts()(0, 1),
1273  &getCoordsAtGaussPts()(0, 2));
1274 }

◆ getGaussPts()

MatrixDouble & UserDataOperator::getGaussPts ( )
inline

matrix of integration (Gauss) points for Volume Element

For triangle: columns 0,1 are x,y coordinates respectively and column 2 is a weight value for example getGaussPts()(1,13) returns y coordinate of 13th Gauss point on particular volume element

For tetrahedron: columns 0,1,2 are x,y,z coordinates respectively and column 3 is a weight value for example getGaussPts()(1,13) returns y coordinate of 13th Gauss point on particular volume element

Examples
analytical_poisson_field_split.cpp, MagneticElement.hpp, and UnsaturatedFlow.hpp.

Definition at line 1237 of file ForcesAndSourcesCore.hpp.

1237  {
1238  return static_cast<ForcesAndSourcesCore *>(ptrFE)->gaussPts;
1239 }

◆ getKSPA()

Mat UserDataOperator::getKSPA ( ) const
inline

Definition at line 1097 of file ForcesAndSourcesCore.hpp.

1097  {
1098 #ifndef NDEBUG
1099  if (getFEMethod()->ksp_A == PETSC_NULL)
1100  THROW_MESSAGE("KSP not set A vector");
1101 #endif
1102  return getFEMethod()->ksp_A;
1103 }

◆ getKSPB()

Mat UserDataOperator::getKSPB ( ) const
inline
Examples
EshelbianPlasticity.cpp.

Definition at line 1105 of file ForcesAndSourcesCore.hpp.

1105  {
1106 #ifndef NDEBUG
1107  if (getFEMethod()->ksp_B == PETSC_NULL)
1108  THROW_MESSAGE("KSP not set B vector");
1109 #endif
1110  return getFEMethod()->ksp_B;
1111 }

◆ getKSPCtx()

const KspMethod::KSPContext UserDataOperator::getKSPCtx ( ) const
inline

Definition at line 1075 of file ForcesAndSourcesCore.hpp.

1075  {
1076  return getFEMethod()->ksp_ctx;
1077 }

◆ getKSPf()

Vec UserDataOperator::getKSPf ( ) const
inline

Definition at line 1089 of file ForcesAndSourcesCore.hpp.

1089  {
1090 #ifndef NDEBUG
1091  if (getFEMethod()->ksp_f == PETSC_NULL)
1092  THROW_MESSAGE("KSP not set F vector");
1093 #endif
1094  return getFEMethod()->ksp_f;
1095 }

◆ getLoopSize()

int UserDataOperator::getLoopSize ( ) const
inline

get size of elements in the loop

Returns
loop size

Definition at line 1061 of file ForcesAndSourcesCore.hpp.

1061  {
1062  return getFEMethod()->getLoopSize();
1063 }

◆ getMeasure() [1/2]

double& MoFEM::ForcesAndSourcesCore::UserDataOperator::getMeasure ( )
inline

get measure of element

Returns
volume

◆ getMeasure() [2/2]

double & UserDataOperator::getMeasure ( ) const
inline

get measure of element

Returns
volume
Examples
plastic.cpp, and quad_polynomial_approximation.cpp.

Definition at line 1276 of file ForcesAndSourcesCore.hpp.

1276  {
1277  return static_cast<ForcesAndSourcesCore *>(ptrFE)->elementMeasure;
1278 }

◆ getNinTheLoop()

int UserDataOperator::getNinTheLoop ( ) const
inline

get number of finite element in the loop

Returns
number of finite element

Definition at line 1057 of file ForcesAndSourcesCore.hpp.

1057  {
1058  return getFEMethod()->getNinTheLoop();
1059 }

◆ getNumberOfNodesOnElement()

int UserDataOperator::getNumberOfNodesOnElement ( ) const
inline

Get the number of nodes on finite element.

Returns
int

Definition at line 1039 of file ForcesAndSourcesCore.hpp.

1039  {
1040  return ptrFE->getNumberOfNodes();
1041 }

◆ getNumeredEntFiniteElementPtr()

boost::shared_ptr< const NumeredEntFiniteElement > UserDataOperator::getNumeredEntFiniteElementPtr ( ) const
inline

Return raw pointer to NumeredEntFiniteElement.

Examples
ElasticityMixedFormulation.hpp, and UnsaturatedFlow.hpp.

Definition at line 1001 of file ForcesAndSourcesCore.hpp.

1001  {
1003 };

◆ getOpType()

int UserDataOperator::getOpType ( ) const
inline

Get operator types.

Returns
Return operator type

Definition at line 1047 of file ForcesAndSourcesCore.hpp.

1047 { return opType; }

◆ getProblemColIndices()

MoFEMErrorCode UserDataOperator::getProblemColIndices ( const std::string  filed_name,
const EntityType  type,
const int  side,
VectorInt indices 
) const

Get col indices.

Field could be or not declared for this element but is declared for problem

Parameters
field_name
typeentity type
sideside number, any number if type is MBVERTEX
Returns
indices

NOTE: Using those indices to assemble matrix will result in error if new non-zero values need to be created.

Definition at line 1669 of file ForcesAndSourcesCore.cpp.

1671  {
1673  if (ptrFE == NULL)
1674  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
1675 
1676  switch (type) {
1677  case MBVERTEX:
1679  break;
1680  default:
1682  }
1684 }

◆ getProblemRowIndices()

MoFEMErrorCode UserDataOperator::getProblemRowIndices ( const std::string  filed_name,
const EntityType  type,
const int  side,
VectorInt indices 
) const

Get row indices.

Field could be or not declared for this element but is declared for problem

Parameters
field_name
typeentity type
sideside number, any number if type is MBVERTEX
Returns
indices

NOTE: Using those indices to assemble matrix will result in error if new non-zero values need to be created.

Definition at line 1652 of file ForcesAndSourcesCore.cpp.

1654  {
1656  if (ptrFE == NULL)
1657  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "data inconsistency");
1658 
1659  switch (type) {
1660  case MBVERTEX:
1662  break;
1663  default:
1665  }
1667 }

◆ getPtrFE()

ForcesAndSourcesCore * UserDataOperator::getPtrFE ( ) const
inline

Definition at line 1252 of file ForcesAndSourcesCore.hpp.

1252  {
1253  return ptrFE;
1254 }

◆ getRefinePtrFE()

ForcesAndSourcesCore * UserDataOperator::getRefinePtrFE ( ) const
inline

Definition at line 1262 of file ForcesAndSourcesCore.hpp.

1262  {
1263  return ptrFE->refinePtrFE;
1264 }

◆ getSideEntity()

EntityHandle UserDataOperator::getSideEntity ( const int  side_number,
const EntityType  type 
)
inline

Get the side entity.

Note
For vertex is expectation. Side basses in argument of function doWork is zero. For other entity types side can be used as argument of this function.
MoFEMErrorCode doWork(int side, EntityType type,
if (type == MBVERTEX) {
for (int n = 0; n != number_of_nodes; ++n)
// Do somthing
} else {
// Do somthing
}
}
Parameters
side_number
type

Definition at line 1031 of file ForcesAndSourcesCore.hpp.

1032  {
1033  if (auto side_ptr = getSideNumberPtr(side_number, type).lock())
1034  return side_ptr->ent;
1035  else
1036  return 0;
1037 }

◆ getSideNumberPtr()

boost::weak_ptr< SideNumber > UserDataOperator::getSideNumberPtr ( const int  side_number,
const EntityType  type 
)
inline

Get the side number pointer.

Note
For vertex is expectation. Side basses in argument of function doWork is zero. For other entity types side can be used as argument of this function.
Parameters
side_number
type
Returns
boost::weak_ptr<SideNumber>

Definition at line 1018 of file ForcesAndSourcesCore.hpp.

1019  {
1020  auto &side_table_by_side_and_type =
1021  ptrFE->numeredEntFiniteElementPtr->getSideNumberTable().get<1>();
1022  auto side_it =
1023  side_table_by_side_and_type.find(boost::make_tuple(type, side_number));
1024  if (side_it != side_table_by_side_and_type.end())
1025  return *side_it;
1026  else
1027  return boost::weak_ptr<SideNumber>();
1028 }

◆ getSidePtrFE()

ForcesAndSourcesCore * UserDataOperator::getSidePtrFE ( ) const
inline

Definition at line 1257 of file ForcesAndSourcesCore.hpp.

1257  {
1258  return ptrFE->sidePtrFE;
1259 }

◆ getSNESA()

Mat UserDataOperator::getSNESA ( ) const
inline

Definition at line 1129 of file ForcesAndSourcesCore.hpp.

1129  {
1130 #ifndef NDEBUG
1131  if (getFEMethod()->snes_A == PETSC_NULL)
1132  THROW_MESSAGE("SNES not set A vector");
1133 #endif
1134  return getFEMethod()->snes_A;
1135 }

◆ getSNESB()

Mat UserDataOperator::getSNESB ( ) const
inline

Definition at line 1137 of file ForcesAndSourcesCore.hpp.

1137  {
1138 #ifndef NDEBUG
1139  if (getFEMethod()->snes_B == PETSC_NULL)
1140  THROW_MESSAGE("SNES not set A matrix");
1141 #endif
1142  return getFEMethod()->snes_B;
1143 }

◆ getSNESCtx()

const SnesMethod::SNESContext UserDataOperator::getSNESCtx ( ) const
inline

Definition at line 1080 of file ForcesAndSourcesCore.hpp.

1080  {
1081  return getFEMethod()->snes_ctx;
1082 }

◆ getSNESf()

Vec UserDataOperator::getSNESf ( ) const
inline

Definition at line 1113 of file ForcesAndSourcesCore.hpp.

1113  {
1114 #ifndef NDEBUG
1115  if (getFEMethod()->snes_f == PETSC_NULL)
1116  THROW_MESSAGE("SNES not set F vector");
1117 #endif
1118  return getFEMethod()->snes_f;
1119 }

◆ getSNESx()

Vec UserDataOperator::getSNESx ( ) const
inline

Definition at line 1121 of file ForcesAndSourcesCore.hpp.

1121  {
1122 #ifndef NDEBUG
1123  if (getFEMethod()->snes_x == PETSC_NULL)
1124  THROW_MESSAGE("SNESnot set X vector");
1125 #endif
1126  return getFEMethod()->snes_x;
1127 }

◆ getTSA()

Mat UserDataOperator::getTSA ( ) const
inline

Definition at line 1177 of file ForcesAndSourcesCore.hpp.

1177  {
1178 #ifndef NDEBUG
1179  if (getFEMethod()->ts_A == PETSC_NULL)
1180  THROW_MESSAGE("TS not set A matrix");
1181 #endif
1182  return getFEMethod()->ts_A;
1183 }

◆ getTSa()

double UserDataOperator::getTSa ( ) const
inline

Definition at line 1217 of file ForcesAndSourcesCore.hpp.

1217  {
1218 #ifndef NDEBUG
1220  .none() ||
1221  (getFEMethod()->data_ctx & (PetscData::CtxSetX_T)).none())
1222  THROW_MESSAGE("TS not set B matrix");
1223 #endif
1224  return getFEMethod()->ts_a;
1225 }

◆ getTSaa()

double UserDataOperator::getTSaa ( ) const
inline

Definition at line 1227 of file ForcesAndSourcesCore.hpp.

1227  {
1228 #ifndef NDEBUG
1230  .none() ||
1231  (getFEMethod()->data_ctx & (PetscData::CtxSetX_TT)).none())
1232  THROW_MESSAGE("TS not set B matrix");
1233 #endif
1234  return getFEMethod()->ts_aa;
1235 }

◆ getTSB()

Mat UserDataOperator::getTSB ( ) const
inline

Definition at line 1185 of file ForcesAndSourcesCore.hpp.

1185  {
1186 #ifndef NDEBUG
1187  if (getFEMethod()->ts_B == PETSC_NULL)
1188  THROW_MESSAGE("TS not set B matrix");
1189 #endif
1190  return getFEMethod()->ts_B;
1191 }

◆ getTSCtx()

const TSMethod::TSContext UserDataOperator::getTSCtx ( ) const
inline

Definition at line 1085 of file ForcesAndSourcesCore.hpp.

1085  {
1086  return getFEMethod()->ts_ctx;
1087 }

◆ getTSf()

Vec UserDataOperator::getTSf ( ) const
inline

Definition at line 1169 of file ForcesAndSourcesCore.hpp.

1169  {
1170 #ifndef NDEBUG
1171  if (getFEMethod()->ts_F == PETSC_NULL)
1172  THROW_MESSAGE("TS not set F vector");
1173 #endif
1174  return getFEMethod()->ts_F;
1175 }

◆ getTSstep()

int UserDataOperator::getTSstep ( ) const
inline

Definition at line 1193 of file ForcesAndSourcesCore.hpp.

1193  {
1194 #ifndef NDEBUG
1195  if ((getFEMethod()->data_ctx & PetscData::PetscData::CtxSetTime).none())
1196  THROW_MESSAGE("TS not set time");
1197 #endif
1198  return getFEMethod()->ts_step;
1199 }

◆ getTStime()

double UserDataOperator::getTStime ( ) const
inline

Definition at line 1201 of file ForcesAndSourcesCore.hpp.

1201  {
1202 #ifndef NDEBUG
1203  if ((getFEMethod()->data_ctx & PetscData::PetscData::CtxSetTime).none())
1204  THROW_MESSAGE("TS not set time");
1205 #endif
1206  return getFEMethod()->ts_t;
1207 }

◆ getTStimeStep()

double UserDataOperator::getTStimeStep ( ) const
inline

Definition at line 1209 of file ForcesAndSourcesCore.hpp.

1209  {
1210 #ifndef NDEBUG
1211  if ((getFEMethod()->data_ctx & PetscData::PetscData::CtxSetTime).none())
1212  THROW_MESSAGE("TS not set time");
1213 #endif
1214  return getFEMethod()->ts_dt;
1215 }

◆ getTSu()

Vec UserDataOperator::getTSu ( ) const
inline

Definition at line 1145 of file ForcesAndSourcesCore.hpp.

1145  {
1146 #ifndef NDEBUG
1147  if (getFEMethod()->ts_u == PETSC_NULL)
1148  THROW_MESSAGE("TS not set U vector");
1149 #endif
1150  return getFEMethod()->ts_u;
1151 }

◆ getTSu_t()

Vec UserDataOperator::getTSu_t ( ) const
inline

Definition at line 1153 of file ForcesAndSourcesCore.hpp.

1153  {
1154 #ifndef NDEBUG
1155  if (getFEMethod()->ts_u_t == PETSC_NULL)
1156  THROW_MESSAGE("TS not set U_t vector");
1157 #endif
1158  return getFEMethod()->ts_u_t;
1159 }

◆ getTSu_tt()

Vec UserDataOperator::getTSu_tt ( ) const
inline

Definition at line 1161 of file ForcesAndSourcesCore.hpp.

1161  {
1162 #ifndef NDEBUG
1163  if (getFEMethod()->ts_u_tt == PETSC_NULL)
1164  THROW_MESSAGE("TS not set U_tt vector");
1165 #endif
1166  return getFEMethod()->ts_u_tt;
1167 }

◆ loopChildren()

MoFEMErrorCode UserDataOperator::loopChildren ( const string &  fe_name,
ForcesAndSourcesCore child_fe,
const int  verb = QUIET,
const LogManager::SeverityLevel  sev = Sev::noisy 
)

User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.

Parameters
fe_name
child_fe
verb
sev
Returns
MoFEMErrorCode

Definition at line 1892 of file ForcesAndSourcesCore.cpp.

1894  {
1896 
1897  auto fe_miit = ptrFE->mField.get_finite_elements()
1898  ->get<FiniteElement_name_mi_tag>()
1899  .find(fe_name);
1900  if (fe_miit != ptrFE->mField.get_finite_elements()
1901  ->get<FiniteElement_name_mi_tag>()
1902  .end()) {
1903 
1904  const auto *problem_ptr = getFEMethod()->problemPtr;
1905  auto &ref_ents = *getPtrFE()->mField.get_ref_ents();
1906  auto &numered_fe =
1907  problem_ptr->numeredFiniteElementsPtr->get<Unique_mi_tag>();
1908 
1909  const auto parent_ent = getNumeredEntFiniteElementPtr()->getEnt();
1910  const auto parent_type = getNumeredEntFiniteElementPtr()->getEntType();
1911  auto range =
1912  ref_ents.get<Composite_ParentEnt_And_EntType_mi_tag>().equal_range(
1913  boost::make_tuple(parent_type, parent_ent));
1914 
1915  if (auto size = std::distance(range.first, range.second)) {
1916 
1917  std::vector<EntityHandle> childs_vec;
1918  childs_vec.reserve(size);
1919  for (; range.first != range.second; ++range.first)
1920  childs_vec.emplace_back((*range.first)->getEnt());
1921 
1922  Range childs;
1923 
1924  if ((childs_vec.back() - childs_vec.front() + 1) == size)
1925  childs = Range(childs_vec.front(), childs_vec.back());
1926  else
1927  childs.insert_list(childs_vec.begin(), childs_vec.end());
1928 
1929  child_fe->feName = fe_name;
1930 
1931  CHKERR child_fe->setRefineFEPtr(ptrFE);
1932  CHKERR child_fe->copyBasicMethod(*getFEMethod());
1933  CHKERR child_fe->copyPetscData(*getFEMethod());
1934  CHKERR child_fe->copyKsp(*getFEMethod());
1935  CHKERR child_fe->copySnes(*getFEMethod());
1936  CHKERR child_fe->copyTs(*getFEMethod());
1937 
1938  child_fe->cacheWeakPtr = getFEMethod()->cacheWeakPtr;
1939 
1940  CHKERR child_fe->preProcess();
1941 
1942  int nn = 0;
1943  child_fe->loopSize = size;
1944 
1945  for (auto p = childs.pair_begin(); p != childs.pair_end(); ++p) {
1946 
1947  auto miit =
1948  numered_fe.lower_bound(EntFiniteElement::getLocalUniqueIdCalculate(
1949  p->first, (*fe_miit)->getFEUId()));
1950  auto hi_miit =
1951  numered_fe.upper_bound(EntFiniteElement::getLocalUniqueIdCalculate(
1952  p->second, (*fe_miit)->getFEUId()));
1953 
1954  for (; miit != hi_miit; ++miit) {
1955 
1956  if (verb >= VERBOSE)
1957  MOFEM_LOG("SELF", sev)
1958  << "Child finite element " << "(" << nn << "): " << **miit;
1959 
1960  child_fe->nInTheLoop = nn++;
1961  child_fe->numeredEntFiniteElementPtr = *miit;
1962  CHKERR (*child_fe)();
1963  }
1964  }
1965  }
1966 
1967  CHKERR child_fe->postProcess();
1968  }
1969 
1971 }

◆ loopParent()

MoFEMErrorCode UserDataOperator::loopParent ( const string &  fe_name,
ForcesAndSourcesCore parent_fe,
const int  verb = QUIET,
const LogManager::SeverityLevel  sev = Sev::noisy 
)

User calls this function to loop over parent elements. This function calls finite element with its operator to do calculations.

Parameters
fe_name
parent_fe
verb
sev
Returns
MoFEMErrorCode

Definition at line 1843 of file ForcesAndSourcesCore.cpp.

1845  {
1847 
1848  auto &fes =
1849  ptrFE->mField.get_finite_elements()->get<FiniteElement_name_mi_tag>();
1850  auto fe_miit = fes.find(fe_name);
1851  if (fe_miit != fes.end()) {
1852 
1853  const auto *problem_ptr = getFEMethod()->problemPtr;
1854  auto &numered_fe =
1855  problem_ptr->numeredFiniteElementsPtr->get<Unique_mi_tag>();
1856 
1857  parent_fe->feName = fe_name;
1858  CHKERR parent_fe->setRefineFEPtr(ptrFE);
1859  CHKERR parent_fe->copyBasicMethod(*getFEMethod());
1860  CHKERR parent_fe->copyPetscData(*getFEMethod());
1861  CHKERR parent_fe->copyKsp(*getFEMethod());
1862  CHKERR parent_fe->copySnes(*getFEMethod());
1863  CHKERR parent_fe->copyTs(*getFEMethod());
1864 
1865  parent_fe->cacheWeakPtr = getFEMethod()->cacheWeakPtr;
1866 
1867  const auto parent_ent = getNumeredEntFiniteElementPtr()->getParentEnt();
1868  auto miit = numered_fe.find(EntFiniteElement::getLocalUniqueIdCalculate(
1869  parent_ent, (*fe_miit)->getFEUId()));
1870  if (miit != numered_fe.end()) {
1871  if (verb >= VERBOSE)
1872  MOFEM_LOG("SELF", sev) << "Parent finite element: " << **miit;
1873  parent_fe->loopSize = 1;
1874  parent_fe->nInTheLoop = 0;
1875  parent_fe->numeredEntFiniteElementPtr = *miit;
1876  CHKERR parent_fe->preProcess();
1877  CHKERR (*parent_fe)();
1878  CHKERR parent_fe->postProcess();
1879  } else {
1880  if (verb >= VERBOSE)
1881  MOFEM_LOG("SELF", sev) << "Parent finite element: no parent";
1882  parent_fe->loopSize = 0;
1883  parent_fe->nInTheLoop = 0;
1884  CHKERR parent_fe->preProcess();
1885  CHKERR parent_fe->postProcess();
1886  }
1887  }
1888 
1890 }

◆ loopSide()

MoFEMErrorCode UserDataOperator::loopSide ( const string &  fe_name,
ForcesAndSourcesCore side_fe,
const size_t  dim,
const EntityHandle  ent_for_side = 0,
boost::shared_ptr< Range fe_range = nullptr,
const int  verb = QUIET,
const LogManager::SeverityLevel  sev = Sev::noisy,
AdjCache adj_cache = nullptr 
)

User calls this function to loop over elements on the side of face. This function calls finite element with its operator to do calculations.

Parameters
fe_namename of the side element
side_fepointer to the side element instance
dimdimension the of side element
ent_for_sideentity handle for which adjacent volume or face will be accessed
verb
sev
adj_cache
Returns
MoFEMErrorCode

Definition at line 1700 of file ForcesAndSourcesCore.cpp.

1703  {
1705 
1706  const auto *problem_ptr = getFEMethod()->problemPtr;
1707  auto &numered_fe =
1708  problem_ptr->numeredFiniteElementsPtr->get<Unique_mi_tag>();
1709 
1710  auto fe_miit = ptrFE->mField.get_finite_elements()
1711  ->get<FiniteElement_name_mi_tag>()
1712  .find(fe_name);
1713  if (fe_miit != ptrFE->mField.get_finite_elements()
1714  ->get<FiniteElement_name_mi_tag>()
1715  .end()) {
1716 
1717  const auto ent = ent_for_side ? ent_for_side : getFEEntityHandle();
1718 
1719  side_fe->feName = fe_name;
1720 
1721  CHKERR side_fe->setSideFEPtr(ptrFE);
1722  CHKERR side_fe->copyBasicMethod(*getFEMethod());
1723  CHKERR side_fe->copyPetscData(*getFEMethod());
1724  CHKERR side_fe->copyKsp(*getFEMethod());
1725  CHKERR side_fe->copySnes(*getFEMethod());
1726  CHKERR side_fe->copyTs(*getFEMethod());
1727 
1728  side_fe->cacheWeakPtr = getFEMethod()->cacheWeakPtr;
1729 
1730  CHKERR side_fe->preProcess();
1731 
1732  std::vector<boost::weak_ptr<NumeredEntFiniteElement>> fe_vec;
1733  auto get_numered_fe_ptr = [&](auto &fe_uid, Range &&adjacent_ents)
1734  -> std::vector<boost::weak_ptr<NumeredEntFiniteElement>> & {
1735  fe_vec.reserve(adjacent_ents.size());
1736  for (auto fe_ent : adjacent_ents) {
1737  auto miit = numered_fe.find(
1739  if (miit != numered_fe.end()) {
1740  fe_vec.emplace_back(*miit);
1741  }
1742  }
1743  return fe_vec;
1744  };
1745 
1746  auto get_bit_entity_adjacency = [&]() {
1747  Range adjacent_ents;
1749  ptrFE->mField.getInterface<BitRefManager>()->getAdjacenciesAny(
1750  ent, side_dim, adjacent_ents),
1751  "getAdjacenciesAny failed");
1752  return adjacent_ents;
1753  };
1754 
1755  auto get_bit_meshset_entities = [&]() {
1756  auto &bit = getFEMethod()->numeredEntFiniteElementPtr->getBitRefLevel();
1757  Range ents = *fe_range;
1759  ptrFE->mField.getInterface<BitRefManager>()->filterEntitiesByRefLevel(
1760  bit, BitRefLevel().set(), ents),
1761  "filterEntitiesByRefLevel failed");
1762  return ents;
1763  };
1764 
1765  auto get_adj = [&](auto &fe_uid, auto get_adj_fun)
1766  -> std::vector<boost::weak_ptr<NumeredEntFiniteElement>> & {
1767  if (adj_cache) {
1768  try {
1769  return (*adj_cache).at(ent);
1770  } catch (const std::out_of_range &) {
1771  return (*adj_cache)[ent] = get_numered_fe_ptr(fe_uid, get_adj_fun());
1772  }
1773  } else {
1774  return get_numered_fe_ptr(fe_uid, get_adj_fun());
1775  }
1776  };
1777 
1778  if (type_from_handle(ent) == MBENTITYSET) {
1779  if (!fe_range)
1780  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
1781  "No range of finite elements");
1782  }
1783  auto adj = (!fe_range)
1784  ? get_adj((*fe_miit)->getFEUId(), get_bit_entity_adjacency)
1785  : get_adj((*fe_miit)->getFEUId(), get_bit_meshset_entities);
1786 
1787  if (verb >= VERBOSE && !adj.empty())
1788  MOFEM_LOG("SELF", sev) << "Number of side finite elements " << adj.size();
1789 
1790  int nn = 0;
1791  side_fe->loopSize = adj.size();
1792  for (auto fe_weak_ptr : adj) {
1793  if (auto fe_ptr = fe_weak_ptr.lock()) {
1794  if (verb >= VERBOSE)
1795  MOFEM_LOG("SELF", sev)
1796  << "Side finite element " << "(" << nn << "): " << *fe_ptr;
1797  side_fe->nInTheLoop = nn;
1798  side_fe->numeredEntFiniteElementPtr = fe_ptr;
1799  CHKERR (*side_fe)();
1800  }
1801  ++nn;
1802  }
1803 
1804  CHKERR side_fe->postProcess();
1805  }
1806 
1808 }

◆ loopThis()

MoFEMErrorCode UserDataOperator::loopThis ( const string &  fe_name,
ForcesAndSourcesCore this_fe,
const int  verb = QUIET,
const LogManager::SeverityLevel  sev = Sev::noisy 
)

User calls this function to loop over the same element using a different set of integration points. This function calls finite element with its operator to do calculations.

Parameters
fe_name
this_fe
verb
sev
Returns
MoFEMErrorCode

Definition at line 1810 of file ForcesAndSourcesCore.cpp.

1812  {
1814 
1815  if (verb >= VERBOSE)
1816  MOFEM_LOG("SELF", sev) << "This finite element: "
1818 
1819  this_fe->feName = fe_name;
1820 
1821  CHKERR this_fe->setRefineFEPtr(ptrFE);
1822  CHKERR this_fe->copyBasicMethod(*getFEMethod());
1823  CHKERR this_fe->copyPetscData(*getFEMethod());
1824  CHKERR this_fe->copyKsp(*getFEMethod());
1825  CHKERR this_fe->copySnes(*getFEMethod());
1826  CHKERR this_fe->copyTs(*getFEMethod());
1827 
1828  this_fe->cacheWeakPtr = getFEMethod()->cacheWeakPtr;
1829 
1830  CHKERR this_fe->preProcess();
1831 
1832  this_fe->nInTheLoop = getNinTheLoop();
1833  this_fe->loopSize = getLoopSize();
1834  this_fe->numeredEntFiniteElementPtr = getNumeredEntFiniteElementPtr();
1835 
1836  CHKERR (*this_fe)();
1837 
1838  CHKERR this_fe->postProcess();
1839 
1841 }

◆ setOpType()

void UserDataOperator::setOpType ( const OpType  type)
inline

Set operator type.

Parameters
Operatortype

Definition at line 1049 of file ForcesAndSourcesCore.hpp.

1049  {
1050  opType = type;
1051 }

◆ setPtrFE()

MoFEMErrorCode UserDataOperator::setPtrFE ( ForcesAndSourcesCore ptr)
protectedvirtual

Friends And Related Function Documentation

◆ ContactPrismElementForcesAndSourcesCore

Definition at line 994 of file ForcesAndSourcesCore.hpp.

◆ EdgeElementForcesAndSourcesCore

friend class EdgeElementForcesAndSourcesCore
friend

Definition at line 992 of file ForcesAndSourcesCore.hpp.

◆ FaceElementForcesAndSourcesCore

friend class FaceElementForcesAndSourcesCore
friend

Definition at line 993 of file ForcesAndSourcesCore.hpp.

◆ ForcesAndSourcesCore

friend class ForcesAndSourcesCore
friend

Definition at line 991 of file ForcesAndSourcesCore.hpp.

Member Data Documentation

◆ colFieldName

std::string MoFEM::ForcesAndSourcesCore::UserDataOperator::colFieldName

Definition at line 578 of file ForcesAndSourcesCore.hpp.

◆ opType

char MoFEM::ForcesAndSourcesCore::UserDataOperator::opType

Definition at line 576 of file ForcesAndSourcesCore.hpp.

◆ OpTypeNames

const char *const UserDataOperator::OpTypeNames
static
Initial value:
= {
"OPROW", " OPCOL", "OPROWCOL", "OPSPACE", "OPLAST"}

Definition at line 574 of file ForcesAndSourcesCore.hpp.

◆ ptrFE

ForcesAndSourcesCore* MoFEM::ForcesAndSourcesCore::UserDataOperator::ptrFE
protected

Definition at line 986 of file ForcesAndSourcesCore.hpp.

◆ rowFieldName

std::string MoFEM::ForcesAndSourcesCore::UserDataOperator::rowFieldName

Definition at line 577 of file ForcesAndSourcesCore.hpp.

◆ sPace

FieldSpace MoFEM::ForcesAndSourcesCore::UserDataOperator::sPace

Definition at line 579 of file ForcesAndSourcesCore.hpp.


The documentation for this struct was generated from the following files:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Definition: UnknownInterface.hpp:93
MoFEM::dimension_from_handle
auto dimension_from_handle(const EntityHandle h)
get entity dimension form handle
Definition: Templates.hpp:1914
MoFEM::ForcesAndSourcesCore::UserDataOperator::getSideEntity
EntityHandle getSideEntity(const int side_number, const EntityType type)
Get the side entity.
Definition: ForcesAndSourcesCore.hpp:1031
MoFEM::BasicMethod::getNinTheLoop
int getNinTheLoop() const
get number of evaluated element in the loop
Definition: LoopMethods.hpp:207
MoFEM::ForcesAndSourcesCore::UserDataOperator::getSideNumberPtr
boost::weak_ptr< SideNumber > getSideNumberPtr(const int side_number, const EntityType type)
Get the side number pointer.
Definition: ForcesAndSourcesCore.hpp:1018
MoFEM::TSMethod::ts_a
PetscReal ts_a
shift for U_t (see PETSc Time Solver)
Definition: LoopMethods.hpp:160
MoFEM::KspMethod::ksp_B
Mat & ksp_B
Definition: LoopMethods.hpp:91
FTensor::Tensor1
Definition: Tensor1_value.hpp:8
EntityHandle
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPSPACE
@ OPSPACE
operator do Work is execute on space data
Definition: ForcesAndSourcesCore.hpp:570
MoFEM::PetscData::CtxSetB
static constexpr Switches CtxSetB
Definition: LoopMethods.hpp:38
MoFEM::TSMethod::ts_F
Vec & ts_F
residual vector
Definition: LoopMethods.hpp:168
MoFEM::PetscData::CtxSetA
static constexpr Switches CtxSetA
Definition: LoopMethods.hpp:37
CHK_THROW_MESSAGE
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
Definition: definitions.h:609
MoFEM::SnesMethod::snes_x
Vec & snes_x
state vector
Definition: LoopMethods.hpp:121
MoFEM::SnesMethod::snes_ctx
SNESContext snes_ctx
Definition: LoopMethods.hpp:118
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::SnesMethod::snes_B
Mat & snes_B
preconditioner of jacobian matrix
Definition: LoopMethods.hpp:124
MoFEM::ForcesAndSourcesCore::sidePtrFE
ForcesAndSourcesCore * sidePtrFE
Element to integrate on the sides.
Definition: ForcesAndSourcesCore.hpp:507
MoFEM::CoreInterface::get_finite_elements
virtual const FiniteElement_multiIndex * get_finite_elements() const =0
Get the finite elements object.
MoFEM::ForcesAndSourcesCore::UserDataOperator::rowFieldName
std::string rowFieldName
Definition: ForcesAndSourcesCore.hpp:577
MoFEM::SnesMethod::snes_A
Mat & snes_A
jacobian matrix
Definition: LoopMethods.hpp:123
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROWCOL
@ OPROWCOL
operator doWork is executed on FE rows &columns
Definition: ForcesAndSourcesCore.hpp:569
MoFEM::DataOperator::doWork
virtual MoFEMErrorCode doWork(int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
Operator for bi-linear form, usually to calculate values on left hand side.
Definition: DataOperators.hpp:40
MoFEM::ForcesAndSourcesCore::getProblemTypeRowIndices
MoFEMErrorCode getProblemTypeRowIndices(const std::string &field_name, EntityType type, int side_number, VectorInt &indices) const
Definition: ForcesAndSourcesCore.cpp:572
THROW_MESSAGE
#define THROW_MESSAGE(msg)
Throw MoFEM exception.
Definition: definitions.h:574
MoFEM::ForcesAndSourcesCore::getProblemTypeColIndices
MoFEMErrorCode getProblemTypeColIndices(const std::string &field_name, EntityType type, int side_number, VectorInt &indices) const
Definition: ForcesAndSourcesCore.cpp:586
MoFEM::TSMethod::ts_A
Mat & ts_A
Definition: LoopMethods.hpp:170
MoFEM::DataOperator::DataOperator
DataOperator(const bool symm=true)
Definition: DataOperators.cpp:21
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFTensor0IntegrationWeight
auto getFTensor0IntegrationWeight()
Get integration weights.
Definition: ForcesAndSourcesCore.hpp:1241
MoFEM::ForcesAndSourcesCore::UserDataOperator::getGaussPts
MatrixDouble & getGaussPts()
matrix of integration (Gauss) points for Volume Element
Definition: ForcesAndSourcesCore.hpp:1237
MoFEM::ForcesAndSourcesCore::UserDataOperator::ForcesAndSourcesCore
friend class ForcesAndSourcesCore
Definition: ForcesAndSourcesCore.hpp:991
VERBOSE
@ VERBOSE
Definition: definitions.h:222
MoFEM::ForcesAndSourcesCore::elementMeasure
double elementMeasure
Definition: ForcesAndSourcesCore.hpp:545
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM::ForcesAndSourcesCore::UserDataOperator::colFieldName
std::string colFieldName
Definition: ForcesAndSourcesCore.hpp:578
MoFEM::ForcesAndSourcesCore::refinePtrFE
ForcesAndSourcesCore * refinePtrFE
Element to integrate parent or child.
Definition: ForcesAndSourcesCore.hpp:524
MoFEM::BasicMethod::getLoopSize
int getLoopSize() const
get loop size
Definition: LoopMethods.hpp:211
MoFEM::ForcesAndSourcesCore::coordsAtGaussPts
MatrixDouble coordsAtGaussPts
coordinated at gauss points
Definition: ForcesAndSourcesCore.hpp:544
MoFEM::PetscData::data_ctx
Switches data_ctx
Definition: LoopMethods.hpp:44
MoFEM::FEMethod::getNumberOfNodes
auto getNumberOfNodes() const
Definition: LoopMethods.hpp:456
bit
auto bit
set bit
Definition: hanging_node_approx.cpp:75
convert.type
type
Definition: convert.py:64
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPCOL
@ OPCOL
operator doWork function is executed on FE columns
Definition: ForcesAndSourcesCore.hpp:568
MoFEM::ForcesAndSourcesCore::UserDataOperator::opType
char opType
Definition: ForcesAndSourcesCore.hpp:576
MoFEM::EntFiniteElement::getLocalUniqueIdCalculate
UId getLocalUniqueIdCalculate() const
Generate UId for finite element entity.
Definition: FEMultiIndices.hpp:528
MoFEM::TSMethod::ts_u_t
Vec & ts_u_t
time derivative of state vector
Definition: LoopMethods.hpp:166
MoFEM::ForcesAndSourcesCore::UserDataOperator::getNinTheLoop
int getNinTheLoop() const
get number of finite element in the loop
Definition: ForcesAndSourcesCore.hpp:1057
MoFEM::ForcesAndSourcesCore::UserDataOperator::getLoopSize
int getLoopSize() const
get size of elements in the loop
Definition: ForcesAndSourcesCore.hpp:1061
MoFEM::PetscData::CtxSetX_T
static constexpr Switches CtxSetX_T
Definition: LoopMethods.hpp:40
MoFEM::ForcesAndSourcesCore::UserDataOperator::getPtrFE
ForcesAndSourcesCore * getPtrFE() const
Definition: ForcesAndSourcesCore.hpp:1252
MoFEM::ForcesAndSourcesCore::UserDataOperator::getNumeredEntFiniteElementPtr
boost::shared_ptr< const NumeredEntFiniteElement > getNumeredEntFiniteElementPtr() const
Return raw pointer to NumeredEntFiniteElement.
Definition: ForcesAndSourcesCore.hpp:1001
LASTSPACE
@ LASTSPACE
FieldSpace in [ 0, LASTSPACE )
Definition: definitions.h:89
MoFEM::TSMethod::ts_ctx
TSContext ts_ctx
Definition: LoopMethods.hpp:157
MoFEM::FEMethod::getFEName
auto getFEName() const
get finite element name
Definition: LoopMethods.hpp:391
MoFEM::ForcesAndSourcesCore::UserDataOperator::getCoordsAtGaussPts
MatrixDouble & getCoordsAtGaussPts()
Gauss points and weight, matrix (nb. of points x 3)
Definition: ForcesAndSourcesCore.hpp:1266
MoFEM::type_from_handle
auto type_from_handle(const EntityHandle h)
get type from entity handle
Definition: Templates.hpp:1898
MoFEM::Problem::numeredFiniteElementsPtr
boost::shared_ptr< NumeredEntFiniteElement_multiIndex > numeredFiniteElementsPtr
store finite elements
Definition: ProblemsMultiIndices.hpp:77
EntData
EntitiesFieldData::EntData EntData
Definition: child_and_parent.cpp:37
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFEMethod
const FEMethod * getFEMethod() const
Return raw pointer to Finite Element Method object.
Definition: ForcesAndSourcesCore.hpp:1043
convert.n
n
Definition: convert.py:82
MoFEM::PetscData::CtxSetX_TT
static constexpr Switches CtxSetX_TT
Definition: LoopMethods.hpp:41
MoFEM::TSMethod::ts_step
PetscInt ts_step
time step number
Definition: LoopMethods.hpp:159
MoFEM::KspMethod::ksp_A
Mat & ksp_A
Definition: LoopMethods.hpp:90
Range
MoFEM::SnesMethod::snes_f
Vec & snes_f
residual
Definition: LoopMethods.hpp:122
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
MoFEM::TSMethod::ts_t
PetscReal ts_t
time
Definition: LoopMethods.hpp:162
FTensor::Tensor0
Definition: Tensor0.hpp:16
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFEEntityHandle
EntityHandle getFEEntityHandle() const
Return finite element entity handle.
Definition: ForcesAndSourcesCore.hpp:1005
MoFEM::TSMethod::ts_aa
PetscReal ts_aa
shift for U_tt shift for U_tt
Definition: LoopMethods.hpp:161
MoFEM::TSMethod::ts_u
Vec & ts_u
state vector
Definition: LoopMethods.hpp:165
MoFEM::ForcesAndSourcesCore::getProblemNodesColIndices
MoFEMErrorCode getProblemNodesColIndices(const std::string &field_name, VectorInt &nodes_indices) const
Definition: ForcesAndSourcesCore.cpp:579
MoFEM::CoreInterface::get_ref_ents
virtual const RefEntity_multiIndex * get_ref_ents() const =0
Get the ref ents object.
MoFEM::BasicMethod::cacheWeakPtr
boost::weak_ptr< CacheTuple > cacheWeakPtr
Definition: LoopMethods.hpp:351
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEM::BasicMethod::problemPtr
const Problem * problemPtr
raw pointer to problem
Definition: LoopMethods.hpp:250
MoFEM::ForcesAndSourcesCore::gaussPts
MatrixDouble gaussPts
Matrix of integration points.
Definition: ForcesAndSourcesCore.hpp:109
MoFEM::ForcesAndSourcesCore::UserDataOperator::sPace
FieldSpace sPace
Definition: ForcesAndSourcesCore.hpp:579
MoFEM::KspMethod::ksp_f
Vec & ksp_f
Definition: LoopMethods.hpp:89
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEM::FEMethod::numeredEntFiniteElementPtr
boost::shared_ptr< const NumeredEntFiniteElement > numeredEntFiniteElementPtr
Definition: LoopMethods.hpp:383
MoFEMFunctionBeginHot
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:453
MoFEM::TSMethod::ts_dt
PetscReal ts_dt
time step size
Definition: LoopMethods.hpp:163
MoFEM::TSMethod::ts_B
Mat & ts_B
Preconditioner for ts_A.
Definition: LoopMethods.hpp:172
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPLAST
@ OPLAST
Definition: ForcesAndSourcesCore.hpp:571
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEM::ForcesAndSourcesCore::getProblemNodesRowIndices
MoFEMErrorCode getProblemNodesRowIndices(const std::string &field_name, VectorInt &nodes_indices) const
Definition: ForcesAndSourcesCore.cpp:565
MoFEM::ForcesAndSourcesCore::UserDataOperator::ptrFE
ForcesAndSourcesCore * ptrFE
Definition: ForcesAndSourcesCore.hpp:986
MoFEM::TSMethod::ts_u_tt
Vec & ts_u_tt
second time derivative of state vector
Definition: LoopMethods.hpp:167
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359
MoFEM::ForcesAndSourcesCore::UserDataOperator::getFTensor1CoordsAtGaussPts
auto getFTensor1CoordsAtGaussPts()
Get coordinates at integration points assuming linear geometry.
Definition: ForcesAndSourcesCore.hpp:1270
MoFEM::ForcesAndSourcesCore::mField
Interface & mField
Definition: ForcesAndSourcesCore.hpp:24
MoFEM::ForcesAndSourcesCore::UserDataOperator::OPROW
@ OPROW
operator doWork function is executed on FE rows
Definition: ForcesAndSourcesCore.hpp:567
MoFEM::KspMethod::ksp_ctx
KSPContext ksp_ctx
Context.
Definition: LoopMethods.hpp:86