v0.9.1
Public Member Functions | Private Attributes | List of all members
MoFEM::OpSetInvJacH1ForFatPrism Struct Reference

Transform local reference derivatives of shape functions to global derivatives. More...

#include <src/finite_elements/UserDataOperators.hpp>

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

Public Member Functions

 OpSetInvJacH1ForFatPrism (boost::shared_ptr< MatrixDouble > inv_jac_ptr)
 
 OpSetInvJacH1ForFatPrism (MatrixDouble &inv_jac)
 
MoFEMErrorCode doWork (int side, EntityType type, DataForcesAndSourcesCore::EntData &data)
 Operator for linear form, usually to calculate values on right hand side. More...
 
- Public Member Functions inherited from MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator
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 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...
 

Private Attributes

const boost::shared_ptr< MatrixDoubleinvJacPtr
 
MatrixDoubleinvJac
 
MatrixDouble diffNinvJac
 

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 Member Functions inherited from MoFEM::FatPrismElementForcesAndSourcesCore::UserDataOperator
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
 
- Protected Attributes inherited from MoFEM::ForcesAndSourcesCore::UserDataOperator
ForcesAndSourcesCoreptrFE
 

Detailed Description

Transform local reference derivatives of shape functions to global derivatives.

FIXME Generalize to curved shapes FIXME Generalize to case that top and bottom face has different shape

Examples
cell_forces.cpp, elasticity.cpp, HookeElement.cpp, and prism_polynomial_approximation.cpp.

Definition at line 1779 of file UserDataOperators.hpp.

Constructor & Destructor Documentation

◆ OpSetInvJacH1ForFatPrism() [1/2]

MoFEM::OpSetInvJacH1ForFatPrism::OpSetInvJacH1ForFatPrism ( boost::shared_ptr< MatrixDouble inv_jac_ptr)

◆ OpSetInvJacH1ForFatPrism() [2/2]

MoFEM::OpSetInvJacH1ForFatPrism::OpSetInvJacH1ForFatPrism ( MatrixDouble inv_jac)

Member Function Documentation

◆ doWork()

MoFEMErrorCode MoFEM::OpSetInvJacH1ForFatPrism::doWork ( int  side,
EntityType  type,
DataForcesAndSourcesCore::EntData data 
)
virtual

Operator for linear form, usually to calculate values on right hand side.

Reimplemented from MoFEM::DataOperator.

Definition at line 625 of file UserDataOperators.cpp.

626  {
628 
629  for (int b = AINSWORTH_LEGENDRE_BASE; b != USER_BASE; b++) {
630 
631  FieldApproximationBase base = static_cast<FieldApproximationBase>(b);
632  if (data.getN(base).size2() == 0)
633  continue;
634 
635  const int nb_gauss_pts = data.getN(base).size1();
636  auto t_diff_n = data.getFTensor1DiffN<3>(base);
637  diffNinvJac.resize(data.getDiffN(base).size1(), data.getDiffN(base).size2(),
638  false);
639 
642 
644  &diffNinvJac(0, 0), &diffNinvJac(0, 1), &diffNinvJac(0, 2));
645  auto t_inv_jac = getFTensor2FromMat<3, 3>(invJac);
646 
647  const int nb_dofs = data.getN(base).size2();
648  for (int gg = 0; gg != nb_gauss_pts; gg++) {
649  for (int bb = 0; bb != nb_dofs; bb++) {
650  t_inv_diff_n(i) = t_diff_n(j) * t_inv_jac(j, i);
651  ++t_inv_diff_n;
652  ++t_diff_n;
653  }
654  ++t_inv_jac;
655  }
656 
657  data.getDiffN(base).data().swap(diffNinvJac.data());
658  }
659 
661 }
FTensor::Index< 'i', 3 > i
FTensor::Index< 'j', 3 > j
user implemented approximation base
Definition: definitions.h:159
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:482
FieldApproximationBase
approximation base
Definition: definitions.h:149
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:151
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:412

Member Data Documentation

◆ diffNinvJac

MatrixDouble MoFEM::OpSetInvJacH1ForFatPrism::diffNinvJac
private

Definition at line 1796 of file UserDataOperators.hpp.

◆ invJac

MatrixDouble& MoFEM::OpSetInvJacH1ForFatPrism::invJac
private

Definition at line 1795 of file UserDataOperators.hpp.

◆ invJacPtr

const boost::shared_ptr<MatrixDouble> MoFEM::OpSetInvJacH1ForFatPrism::invJacPtr
private

Definition at line 1794 of file UserDataOperators.hpp.


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