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

transform Hdiv base fluxes from reference element to physical triangle More...

#include <src/finite_elements/DataOperators.hpp>

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

Public Member Functions

 OpSetContravariantPiolaTransformOnFace (const VectorDouble &normal, const MatrixDouble &normals_at_pts)
 
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::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...
 

Public Attributes

const VectorDoublenOrmal
 
const MatrixDoublenormalsAtGaussPts
 
- 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...
 

Detailed Description

transform Hdiv base fluxes from reference element to physical triangle

Definition at line 506 of file DataOperators.hpp.

Constructor & Destructor Documentation

◆ OpSetContravariantPiolaTransformOnFace()

MoFEM::OpSetContravariantPiolaTransformOnFace::OpSetContravariantPiolaTransformOnFace ( const VectorDouble normal,
const MatrixDouble normals_at_pts 
)

Definition at line 511 of file DataOperators.hpp.

513  : nOrmal(normal), normalsAtGaussPts(normals_at_pts) {}
FTensor::Tensor1< double, 2 > normal(FTensor::Tensor1< T1, 3 > &t_coords, FTensor::Tensor1< T2, 2 > &t_disp)
Definition: ContactOps.hpp:128

Member Function Documentation

◆ doWork()

MoFEMErrorCode MoFEM::OpSetContravariantPiolaTransformOnFace::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 896 of file DataOperators.cpp.

897  {
899 
900  if (type != MBTRI)
902 
903  for (int b = AINSWORTH_LEGENDRE_BASE; b != LASTBASE; b++) {
904 
905  FieldApproximationBase base = static_cast<FieldApproximationBase>(b);
906 
907  int nb_gauss_pts = data.getN(base).size1();
908  if (nb_gauss_pts) {
910  auto t_normal =
912  const double l02 = t_normal(i) * t_normal(i);
913  int nb_base_functions = data.getN(base).size2() / 3;
914  auto t_n = data.getFTensor1N<3>(base);
915  if (normalsAtGaussPts.size1() == (unsigned int)nb_gauss_pts) {
916  auto t_ho_normal =
918  &normalsAtGaussPts(0, 0), &normalsAtGaussPts(0, 1),
919  &normalsAtGaussPts(0, 2));
920  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
921  for (int bb = 0; bb != nb_base_functions; ++bb) {
922  const double v = t_n(0);
923  const double l2 = t_ho_normal(i) * t_ho_normal(i);
924  t_n(i) = (v / l2) * t_ho_normal(i);
925  ++t_n;
926  }
927  ++t_ho_normal;
928  }
929  } else {
930  for (int gg = 0; gg != nb_gauss_pts; ++gg) {
931  for (int bb = 0; bb != nb_base_functions; ++bb) {
932  const double v = t_n(0);
933  t_n(i) = (v / l02) * t_normal(i);
934  ++t_n;
935  }
936  }
937  }
938  }
939  }
940 
942 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:507
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:514
FieldApproximationBase
approximation base
Definition: definitions.h:150
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:152
FTensor::Index< 'i', 2 > i
[Common data]
Definition: ContactOps.hpp:26

Member Data Documentation

◆ nOrmal

const VectorDouble& MoFEM::OpSetContravariantPiolaTransformOnFace::nOrmal

Definition at line 508 of file DataOperators.hpp.

◆ normalsAtGaussPts

const MatrixDouble& MoFEM::OpSetContravariantPiolaTransformOnFace::normalsAtGaussPts

Definition at line 509 of file DataOperators.hpp.


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