v0.5.86
Public Member Functions | List of all members
MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator Struct Reference

default operator for TET element More...

#include <src/finite_elements/VolumeElementForcesAndSourcesCore.hpp>

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

Public Member Functions

 UserDataOperator (const std::string &field_name, const char type)
 
 UserDataOperator (const std::string &row_field_name, const std::string &col_field_name, const char type)
 
const VolumeElementForcesAndSourcesCoreOnSidegetVolumeFE () const
 return pointer to Generic Volume Finite Element object More...
 
FaceElementForcesAndSourcesCoregetFaceFEPtr () const
 
int getFaceSense () const
 get face sense in respect to volume More...
 
int getFaceSideNumber () const
 get face side number in respect to volume More...
 
bool getEdgeFace (const int ee) const
 
VectorDoublegetNormal ()
 
FTensor::Tensor1< double *, 3 > getTensor1Normal ()
 get normal as tensor More...
 
MatrixDoublegetNormalsAtGaussPt ()
 if higher order geometry return normals at Gauss pts. More...
 
ublas::matrix_row< MatrixDoublegetNormalsAtGaussPt (const int gg)
 if higher order geometry return normals at Gauss pts. More...
 
FTensor::Tensor1< double *, 3 > getTensor1NormalsAtGaussPt ()
 get normal at integration points More...
 
MatrixDoublegetFaceCoordsAtGaussPts ()
 get face coordinates at Gauss pts. More...
 
- Public Member Functions inherited from MoFEM::VolumeElementForcesAndSourcesCore::UserDataOperator
 UserDataOperator (const FieldSpace space)
 
 UserDataOperator (const std::string &field_name, const char type)
 
 UserDataOperator (const std::string &row_field_name, const std::string &col_field_name, const char type, const bool symm=true)
 
int getNumNodes ()
 get element number of nodes More...
 
const EntityHandlegetConn ()
 get element connectivity More...
 
double getVolume ()
 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 ()
 get measure of element More...
 
VectorDoublegetCoords ()
 nodal coordinates More...
 
MatrixDoublegetGaussPts ()
 matrix of integration (Gauss) points for Volume Element where 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 More...
 
FTensor::Tensor0< double * > getFTensor0IntegrationWeight ()
 
MatrixDoublegetCoordsAtGaussPts ()
 Gauss points and weight, matrix (nb. of points x 3) More...
 
MatrixDoublegetHoCoordsAtGaussPts ()
 coordinate at Gauss points (if hierarchical approximation of element geometry) More...
 
MatrixDoublegetHoGaussPtsInvJac ()
 
VectorDoublegetHoGaussPtsDetJac ()
 
FTensor::Tensor0< double * > getFTenosr0HoMeasure ()
 
FTensor::Tensor1< double *, 3 > getTensor1CoordsAtGaussPts ()
 Get coordinates at integration points assuming linear geometry. More...
 
FTensor::Tensor1< double *, 3 > getFTensor1HoCoordsAtGaussPts ()
 Get coordinates at integration points taking geometry from field. More...
 
const VolumeElementForcesAndSourcesCoregetVolumeFE ()
 return pointer to Generic Volume Finite Element object More...
 
PetscErrorCode getDivergenceOfHDivBaseFunctions (int side, EntityType type, DataForcesAndSourcesCore::EntData &data, int gg, VectorDouble &div)
 Get divergence of base functions at integration point. More...
 
PetscErrorCode 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)
 
virtual ~UserDataOperator ()
 
boost::shared_ptr< const NumeredEntFiniteElementgetNumeredEntFiniteElementPtr () const
 Return raw pointer to NumeredEntFiniteElement. More...
 
EntityHandle getFEEntityHandle () const
 Return finite element entity handle. More...
 
PetscErrorCode getPorblemRowIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get row indices. More...
 
PetscErrorCode getPorblemColIndices (const std::string filed_name, const EntityType type, const int side, VectorInt &indices) const
 Get col indices. More...
 
virtual PetscErrorCode setPtrFE (ForcesAndSourcesCore *ptr)
 
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...
 
- Public Member Functions inherited from MoFEM::DataOperator
 DataOperator (const bool symm=true, const bool do_vertices=true, const bool do_edges=true, const bool do_quads=true, const bool do_tris=true, const bool do_tets=true, const bool do_prisms=true)
 
virtual ~DataOperator ()
 
virtual PetscErrorCode 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 right hand side. More...
 
virtual PetscErrorCode opLhs (DataForcesAndSourcesCore &row_data, DataForcesAndSourcesCore &col_data, bool symm=true)
 
virtual PetscErrorCode opLhs (DataForcesAndSourcesCore &row_data, DataForcesAndSourcesCore &col_data)
 
virtual PetscErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 Operator for linear form, usually to calculate values on left hand side. More...
 
virtual PetscErrorCode opRhs (DataForcesAndSourcesCore &data, const bool do_vertices, const bool do_edges, const bool do_quads, const bool do_tris, const bool do_tets, const bool do_prisms, const bool error_if_no_base=true)
 
virtual PetscErrorCode opRhs (DataForcesAndSourcesCore &data, const bool error_if_no_base=true)
 
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...
 

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...
 
bool doVertices
 If false skip vertices. More...
 
bool doEdges
 If false skip edges. More...
 
bool doQuads
 
bool doTris
 
bool doTets
 
bool doPrisms
 
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoreptrFE
 

Detailed Description

default operator for TET element

Examples:
hello_world.cpp.

Definition at line 427 of file VolumeElementForcesAndSourcesCore.hpp.

Constructor & Destructor Documentation

◆ UserDataOperator() [1/2]

MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::UserDataOperator ( const std::string &  field_name,
const char  type 
)

Definition at line 429 of file VolumeElementForcesAndSourcesCore.hpp.

431  :
432  VolumeElementForcesAndSourcesCore::UserDataOperator(field_name,type) {
433  }

◆ UserDataOperator() [2/2]

MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::UserDataOperator ( const std::string &  row_field_name,
const std::string &  col_field_name,
const char  type 
)

Definition at line 435 of file VolumeElementForcesAndSourcesCore.hpp.

437  :
438  VolumeElementForcesAndSourcesCore::UserDataOperator(row_field_name,col_field_name,type) {
439  }

Member Function Documentation

◆ getEdgeFace()

bool MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::getEdgeFace ( const int  ee) const

Definition at line 467 of file VolumeElementForcesAndSourcesCore.hpp.

467  {
468  const bool edges_on_faces[6][4] = {
469  { true, false, false, true }, // e0
470  { false, true, false, true }, // e1
471  { false, false, true, true }, // e2
472  { true, false, true, false }, // e3
473  { true, true, false, false }, // e4
474  { false, true, true, false }
475  };
476  return edges_on_faces[ee][getFaceSideNumber()];
477  }
int getFaceSideNumber() const
get face side number in respect to volume

◆ getFaceCoordsAtGaussPts()

MatrixDouble & UserDataOperator::getFaceCoordsAtGaussPts ( )

get face coordinates at Gauss pts.

Note
Coordinates should be the same what function getCoordsAtGaussPts on tets is returning. If both coordinates are different it is error, or you do something very unusual.

Definition at line 955 of file VolumeElementForcesAndSourcesCore.cpp.

◆ getFaceFEPtr()

FaceElementForcesAndSourcesCore* MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::getFaceFEPtr ( ) const

Definition at line 447 of file VolumeElementForcesAndSourcesCore.hpp.

447  {
448  return getVolumeFE()->faceFEPtr;
449  }
const VolumeElementForcesAndSourcesCoreOnSide * getVolumeFE() const
return pointer to Generic Volume Finite Element object

◆ getFaceSense()

int MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::getFaceSense ( ) const

get face sense in respect to volume

Returns
error code

Definition at line 455 of file VolumeElementForcesAndSourcesCore.hpp.

455  {
456  return getVolumeFE()->faceSense;
457  }
const VolumeElementForcesAndSourcesCoreOnSide * getVolumeFE() const
return pointer to Generic Volume Finite Element object

◆ getFaceSideNumber()

int MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::getFaceSideNumber ( ) const

get face side number in respect to volume

Returns
error code

Definition at line 463 of file VolumeElementForcesAndSourcesCore.hpp.

463  {
464  return getVolumeFE()->faceSideNumber;
465  }
const VolumeElementForcesAndSourcesCoreOnSide * getVolumeFE() const
return pointer to Generic Volume Finite Element object

◆ getNormal()

VectorDouble & UserDataOperator::getNormal ( )

get face normal on side which is this element

Returns
face normal

Definition at line 947 of file VolumeElementForcesAndSourcesCore.cpp.

◆ getNormalsAtGaussPt() [1/2]

MatrixDouble & UserDataOperator::getNormalsAtGaussPt ( )

if higher order geometry return normals at Gauss pts.

Note: returned matrix has size 0 in rows and columns if no HO approximation of geometry is available.

Definition at line 951 of file VolumeElementForcesAndSourcesCore.cpp.

◆ getNormalsAtGaussPt() [2/2]

ublas::matrix_row< MatrixDouble > UserDataOperator::getNormalsAtGaussPt ( const int  gg)

if higher order geometry return normals at Gauss pts.

Parameters
gggauss point number

Definition at line 963 of file VolumeElementForcesAndSourcesCore.cpp.

963  {
964  return ublas::matrix_row<MatrixDouble >(getNormalsAtGaussPt(),gg);
965 }
MatrixDouble & getNormalsAtGaussPt()
if higher order geometry return normals at Gauss pts.

◆ getTensor1Normal()

FTensor::Tensor1<double*,3> MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::getTensor1Normal ( )

get normal as tensor

Definition at line 487 of file VolumeElementForcesAndSourcesCore.hpp.

487  {
488  double *ptr = &*getNormal().data().begin();
489  return FTensor::Tensor1<double*,3>(ptr,&ptr[1],&ptr[2]);
490  }

◆ getTensor1NormalsAtGaussPt()

FTensor::Tensor1<double*,3> MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::getTensor1NormalsAtGaussPt ( )

get normal at integration points

Example:

double nrm2;
for(int gg = gg!=data.getN().size1();gg++) {
nrm2 = sqrt(t_normal(i)*t_normal(i));
++t_normal;
}

Definition at line 520 of file VolumeElementForcesAndSourcesCore.hpp.

520  {
521  double *ptr = &*getNormalsAtGaussPt().data().begin();
522  return FTensor::Tensor1<double*,3>(ptr,&ptr[1],&ptr[2],3);
523  }
MatrixDouble & getNormalsAtGaussPt()
if higher order geometry return normals at Gauss pts.

◆ getVolumeFE()

const VolumeElementForcesAndSourcesCoreOnSide* MoFEM::VolumeElementForcesAndSourcesCoreOnSide::UserDataOperator::getVolumeFE ( ) const

return pointer to Generic Volume Finite Element object

Definition at line 443 of file VolumeElementForcesAndSourcesCore.hpp.

443  {
444  return static_cast<VolumeElementForcesAndSourcesCoreOnSide*>(ptrFE);
445  }
VolumeElementForcesAndSourcesCoreOnSide(Interface &m_field, const EntityType type=MBTET)

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