v0.9.1
Public Member Functions | Protected Member Functions | List of all members
MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator Struct Reference

default operator for Flat Prism element More...

#include <src/finite_elements/FatPrismElementForcesAndSourcesCore.hpp>

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

Public Member Functions

double getArea (const int dd)
 get face aRea More...
 
double getAreaF3 ()
 
double getAreaF4 ()
 
VectorDoublegetNormal ()
 get triangle normal More...
 
VectorAdaptor getNormalF3 ()
 
VectorAdaptor getNormalF4 ()
 
MatrixDoublegetGaussPts ()
 get Gauss pts. in the prism More...
 
MatrixDoublegetGaussPtsTrianglesOnly ()
 get Gauss pts. on triangles More...
 
MatrixDoublegetGaussPtsThroughThickness ()
 get Gauss pts. through thickness More...
 
MatrixDoublegetCoordsAtGaussPts ()
 get coordinates at Gauss pts. More...
 
MatrixDoublegetCoordsAtGaussPtsTrianglesOnly ()
 get coordinates at Gauss pts. More...
 
MatrixDoublegetHoCoordsAtGaussPtsF3 ()
 coordinate at Gauss points on face 3 (if hierarchical approximation of element geometry) More...
 
MatrixDoublegetHoCoordsAtGaussPtsF4 ()
 coordinate at Gauss points on face 4 (if hierarchical approximation of element geometry) More...
 
MatrixDoublegetNormalsAtGaussPtF3 ()
 if higher order geometry return normals at face F3 at Gauss pts. More...
 
MatrixDoublegetNormalsAtGaussPtF4 ()
 if higher order geometry return normals at face F4 at Gauss pts. More...
 
ublas::matrix_row< MatrixDoublegetNormalsAtGaussPtF3 (const int gg)
 if higher order geometry return normals at Gauss pts. More...
 
ublas::matrix_row< MatrixDoublegetNormalsAtGaussPtF4 (const int gg)
 if higher order geometry return normals at Gauss pts. More...
 
MatrixDoublegetTangent1AtGaussPtF3 ()
 if higher order geometry return tangent vector to triangle at Gauss pts. More...
 
MatrixDoublegetTangent2AtGaussPtF3 ()
 if higher order geometry return tangent vector to triangle at Gauss pts. More...
 
MatrixDoublegetTangent1AtGaussPtF4 ()
 if higher order geometry return tangent vector to triangle at Gauss pts. More...
 
MatrixDoublegetTangent2AtGaussPtF4 ()
 if higher order geometry return tangent vector to triangle at Gauss pts. More...
 
DataForcesAndSourcesCoregetTrianglesOnlyDataStructure ()
 
DataForcesAndSourcesCoregetTroughThicknessDataStructure ()
 
const FatPrismElementForcesAndSourcesCoregetPrismFE ()
 return pointer to fat prism finite element More...
 
- Public Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCoreBase::UserDataOperator
int getNumNodes ()
 get element number of nodes More...
 
const EntityHandlegetConn ()
 get element connectivity More...
 
double getVolume () const
 element volume (linear geometry) More...
 
doublegetVolume ()
 element volume (linear geometry) More...
 
FTensor::Tensor2< double *, 3, 3 > & getJac ()
 get element Jacobian More...
 
FTensor::Tensor2< double *, 3, 3 > & getInvJac ()
 get element inverse Jacobian More...
 
double getMeasure () const
 get measure of element More...
 
doublegetMeasure ()
 get measure of element More...
 
VectorDoublegetCoords ()
 nodal coordinates More...
 
MatrixDoublegetCoordsAtGaussPts ()
 Gauss points and weight, matrix (nb. of points x 3) More...
 
MatrixDoublegetHoCoordsAtGaussPts ()
 coordinate at Gauss points (if hierarchical approximation of element geometry) More...
 
MatrixDoublegetHoGaussPtsJac ()
 
MatrixDoublegetHoGaussPtsInvJac ()
 
VectorDoublegetHoGaussPtsDetJac ()
 
auto getFTenosr0HoMeasure ()
 
auto getFTensor1CoordsAtGaussPts ()
 Get coordinates at integration points assuming linear geometry. More...
 
auto getFTensor1HoCoordsAtGaussPts ()
 Get coordinates at integration points taking geometry from field. More...
 
auto getFTensor2HoGaussPtsJac ()
 
auto getFTensor2HoGaussPtsInvJac ()
 
VolumeElementForcesAndSourcesCoreBasegetVolumeFE () const
 return pointer to Generic Volume Finite Element object More...
 
MoFEMErrorCode getDivergenceOfHDivBaseFunctions (int side, EntityType type, DataForcesAndSourcesCore::EntData &data, int gg, VectorDouble &div)
 Get divergence of base functions at integration point. More...
 
MoFEMErrorCode getCurlOfHCurlBaseFunctions (int side, EntityType type, DataForcesAndSourcesCore::EntData &data, int gg, MatrixDouble &curl)
 Get curl of base functions at integration point. More...
 
- Public Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
 UserDataOperator (const FieldSpace space, const char type=OPLAST, 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...
 
boost::weak_ptr< SideNumber > getSideNumberPtr (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 ()
 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...
 
const std::string & getFEName () const
 Get name of the element. More...
 
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
 
Vec getSNESf () const
 
Vec getSNESx () const
 
Mat getSNESA () const
 
Mat getSNESB () const
 
DEPRECATED Vec getSnesF () const
 
DEPRECATED Vec getSnesX () const
 
DEPRECATED Mat getSnesA () const
 
DEPRECATED Mat getSnesB () const
 
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 getTSa () const
 
MatrixDoublegetGaussPts ()
 matrix of integration (Gauss) points for Volume Element More...
 
auto getFTensor0IntegrationWeight ()
 Get integration weights. More...
 
DEPRECATED MoFEMErrorCode getPorblemRowIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 
- 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, DataForcesAndSourcesCore::EntData &row_data, DataForcesAndSourcesCore::EntData &col_data)
 Operator for bi-linear form, usually to calculate values on left hand side. More...
 
virtual MoFEMErrorCode opLhs (DataForcesAndSourcesCore &row_data, DataForcesAndSourcesCore &col_data)
 
virtual MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 Operator for linear form, usually to calculate values on right hand side. More...
 
virtual MoFEMErrorCode opRhs (DataForcesAndSourcesCore &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...
 

Protected Member Functions

MoFEMErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 
- Protected Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCoreBase::UserDataOperator
MoFEMErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 
- Protected Member Functions inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoregetPtrFE () const
 
ForcesAndSourcesCoregetSidePtrFE () const
 

Additional Inherited Members

- Public Types inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
enum  OpType { OPROW = 1 << 0, OPCOL = 1 << 1, OPROWCOL = 1 << 2, OPLAST = 1 << 3 }
 Controls loop over entities on element. More...
 
- Public Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
char opType
 
std::string rowFieldName
 
std::string colFieldName
 
FieldSpace sPace
 
- Public Attributes inherited from MoFEM::DataOperator
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...
 
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoreptrFE
 

Detailed Description

default operator for Flat Prism element

Examples
prism_elements_from_surface.cpp, and prism_polynomial_approximation.cpp.

Definition at line 66 of file FatPrismElementForcesAndSourcesCore.hpp.

Member Function Documentation

◆ getArea()

double MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getArea ( const int  dd)

get face aRea

Parameters
ddif dd == 0 it is for face F3 if dd == 1 is for face F4

Definition at line 222 of file FatPrismElementForcesAndSourcesCore.hpp.

222  {
223  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)->aRea[0];
224 }

◆ getAreaF3()

double MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getAreaF3 ( )

Definition at line 227 of file FatPrismElementForcesAndSourcesCore.hpp.

227  {
228  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)->aRea[0];
229 }

◆ getAreaF4()

double MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getAreaF4 ( )

Definition at line 231 of file FatPrismElementForcesAndSourcesCore.hpp.

231  {
232  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)->aRea[1];
233 }

◆ getCoordsAtGaussPts()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getCoordsAtGaussPts ( )

get coordinates at Gauss pts.

Matrix has size (nb integration points)x(coordinates on F3 and F4 = 6), i.e. coordinates on face F3 and F4

Examples
prism_elements_from_surface.cpp.

Definition at line 272 of file FatPrismElementForcesAndSourcesCore.hpp.

272  {
273  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
274  ->coordsAtGaussPts;
275 }

◆ getCoordsAtGaussPtsTrianglesOnly()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getCoordsAtGaussPtsTrianglesOnly ( )

get coordinates at Gauss pts.

Matrix has size (nb integration points)x(coordinates on F3 and F4 = 6), i.e. coordinates on face F3 and F4

Definition at line 278 of file FatPrismElementForcesAndSourcesCore.hpp.

278  {
279  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
280  ->coordsAtGaussPtsTrianglesOnly;
281 }

◆ getGaussPts()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getGaussPts ( )

get Gauss pts. in the prism

Examples
prism_elements_from_surface.cpp.

Definition at line 255 of file FatPrismElementForcesAndSourcesCore.hpp.

255  {
256  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)->gaussPts;
257 }

◆ getGaussPtsThroughThickness()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getGaussPtsThroughThickness ( )

get Gauss pts. through thickness

Definition at line 266 of file FatPrismElementForcesAndSourcesCore.hpp.

266  {
267  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
268  ->gaussPtsThroughThickness;
269 }

◆ getGaussPtsTrianglesOnly()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getGaussPtsTrianglesOnly ( )

get Gauss pts. on triangles

Definition at line 260 of file FatPrismElementForcesAndSourcesCore.hpp.

260  {
261  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
262  ->gaussPtsTrianglesOnly;
263 }

◆ getHoCoordsAtGaussPtsF3()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getHoCoordsAtGaussPtsF3 ( )

coordinate at Gauss points on face 3 (if hierarchical approximation of element geometry)

Definition at line 284 of file FatPrismElementForcesAndSourcesCore.hpp.

284  {
285  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
286  ->hoCoordsAtGaussPtsF3;
287 }

◆ getHoCoordsAtGaussPtsF4()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getHoCoordsAtGaussPtsF4 ( )

coordinate at Gauss points on face 4 (if hierarchical approximation of element geometry)

Definition at line 290 of file FatPrismElementForcesAndSourcesCore.hpp.

290  {
291  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
292  ->hoCoordsAtGaussPtsF4;
293 }

◆ getNormal()

VectorDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getNormal ( )

get triangle normal

Normal has 6 elements, first 3 are for face F3 another three for face F4

Definition at line 236 of file FatPrismElementForcesAndSourcesCore.hpp.

236  {
237  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)->normal;
238 }

◆ getNormalF3()

VectorAdaptor MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getNormalF3 ( )

Definition at line 241 of file FatPrismElementForcesAndSourcesCore.hpp.

241  {
242  double *data =
243  &(static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)->normal[0]);
244  return VectorAdaptor(3, ublas::shallow_array_adaptor<double>(3, data));
245 }
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition: Types.hpp:104

◆ getNormalF4()

VectorAdaptor MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getNormalF4 ( )

Definition at line 248 of file FatPrismElementForcesAndSourcesCore.hpp.

248  {
249  double *data =
250  &(static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)->normal[3]);
251  return VectorAdaptor(3, ublas::shallow_array_adaptor<double>(3, data));
252 }
VectorShallowArrayAdaptor< double > VectorAdaptor
Definition: Types.hpp:104

◆ getNormalsAtGaussPtF3() [1/2]

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getNormalsAtGaussPtF3 ( )

if higher order geometry return normals at face F3 at Gauss pts.

Face 3 is top face in canonical triangle numeration, see [43]

Definition at line 296 of file FatPrismElementForcesAndSourcesCore.hpp.

296  {
297  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
298  ->nOrmals_at_GaussPtF3;
299 }

◆ getNormalsAtGaussPtF3() [2/2]

ublas::matrix_row< MatrixDouble > MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getNormalsAtGaussPtF3 ( const int  gg)

if higher order geometry return normals at Gauss pts.

Face 3 is top face in canonical triangle numeration, see [43]

Parameters
gggauss point number

Definition at line 308 of file FatPrismElementForcesAndSourcesCore.hpp.

309  {
310  return ublas::matrix_row<MatrixDouble>(
311  static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
313  gg);
314 }

◆ getNormalsAtGaussPtF4() [1/2]

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getNormalsAtGaussPtF4 ( )

if higher order geometry return normals at face F4 at Gauss pts.

Face 4 is top face in canonical triangle numeration, see [43]

Definition at line 302 of file FatPrismElementForcesAndSourcesCore.hpp.

302  {
303  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
304  ->nOrmals_at_GaussPtF4;
305 }

◆ getNormalsAtGaussPtF4() [2/2]

ublas::matrix_row< MatrixDouble > MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getNormalsAtGaussPtF4 ( const int  gg)

if higher order geometry return normals at Gauss pts.

Face 3 is top face in canonical triangle numeration, see [43]

Parameters
gggauss point number

Definition at line 317 of file FatPrismElementForcesAndSourcesCore.hpp.

318  {
319  return ublas::matrix_row<MatrixDouble>(
320  static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
322  gg);
323 }

◆ getPrismFE()

const FatPrismElementForcesAndSourcesCore * MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getPrismFE ( )

return pointer to fat prism finite element

Definition at line 362 of file FatPrismElementForcesAndSourcesCore.hpp.

362  {
363  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE);
364 }

◆ getTangent1AtGaussPtF3()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getTangent1AtGaussPtF3 ( )

if higher order geometry return tangent vector to triangle at Gauss pts.

Definition at line 326 of file FatPrismElementForcesAndSourcesCore.hpp.

326  {
327  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
328  ->tAngent1_at_GaussPtF3;
329 }

◆ getTangent1AtGaussPtF4()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getTangent1AtGaussPtF4 ( )

if higher order geometry return tangent vector to triangle at Gauss pts.

Definition at line 338 of file FatPrismElementForcesAndSourcesCore.hpp.

338  {
339  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
340  ->tAngent1_at_GaussPtF4;
341 }

◆ getTangent2AtGaussPtF3()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getTangent2AtGaussPtF3 ( )

if higher order geometry return tangent vector to triangle at Gauss pts.

Definition at line 332 of file FatPrismElementForcesAndSourcesCore.hpp.

332  {
333  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
334  ->tAngent2_at_GaussPtF3;
335 }

◆ getTangent2AtGaussPtF4()

MatrixDouble & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getTangent2AtGaussPtF4 ( )

if higher order geometry return tangent vector to triangle at Gauss pts.

Definition at line 344 of file FatPrismElementForcesAndSourcesCore.hpp.

344  {
345  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
346  ->tAngent2_at_GaussPtF4;
347 }

◆ getTrianglesOnlyDataStructure()

DataForcesAndSourcesCore & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getTrianglesOnlyDataStructure ( )

Definition at line 350 of file FatPrismElementForcesAndSourcesCore.hpp.

350  {
351  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
352  ->dataH1TrianglesOnly;
353 }

◆ getTroughThicknessDataStructure()

DataForcesAndSourcesCore & MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::getTroughThicknessDataStructure ( )

Definition at line 356 of file FatPrismElementForcesAndSourcesCore.hpp.

356  {
357  return static_cast<FatPrismElementForcesAndSourcesCore *>(ptrFE)
358  ->dataH1TroughThickness;
359 }

◆ setPtrFE()

MoFEMErrorCode MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator::setPtrFE ( ForcesAndSourcesCore ptr)
protectedvirtual

Reimplemented from MoFEM::ForcesAndSourcesCore::UserDataOperator.

Definition at line 445 of file FatPrismElementForcesAndSourcesCore.cpp.

446  {
448  if (!(ptrFE = dynamic_cast<FatPrismElementForcesAndSourcesCore *>(ptr)))
449  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
450  "User operator and finite element do not work together");
452 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:506
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:513

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