v0.9.0
Public Member Functions | Public Attributes | List of all members
MoFEM::OpSetHoInvJacHdivAndHcurl Struct Reference

transform local reference derivatives of shape function to global derivatives if higher order geometry is given More...

#include <src/finite_elements/DataOperators.hpp>

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

Public Member Functions

 OpSetHoInvJacHdivAndHcurl (MatrixDouble &inv_ho_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::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 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, bool symm=true)
 
virtual MoFEMErrorCode opLhs (DataForcesAndSourcesCore &row_data, DataForcesAndSourcesCore &col_data)
 
virtual MoFEMErrorCode 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 MoFEMErrorCode 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...
 

Public Attributes

MatrixDoubleinvHoJac
 
FTensor::Index< 'i', 3 > i
 
FTensor::Index< 'j', 3 > j
 
FTensor::Index< 'k', 3 > k
 
MatrixDouble diffHdivInvJac
 
- 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
 

Detailed Description

transform local reference derivatives of shape function to global derivatives if higher order geometry is given

Definition at line 189 of file DataOperators.hpp.

Constructor & Destructor Documentation

◆ OpSetHoInvJacHdivAndHcurl()

MoFEM::OpSetHoInvJacHdivAndHcurl::OpSetHoInvJacHdivAndHcurl ( MatrixDouble inv_ho_jac)

Definition at line 196 of file DataOperators.hpp.

196 : invHoJac(inv_ho_jac) {}

Member Function Documentation

◆ doWork()

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

970  {
972 
973  if (type != MBEDGE && type != MBTRI && type != MBTET)
975 
976  for (int b = AINSWORTH_LEGENDRE_BASE; b != LASTBASE; b++) {
977 
978  FieldApproximationBase base = static_cast<FieldApproximationBase>(b);
979 
980  diffHdivInvJac.resize(data.getDiffN(base).size1(),
981  data.getDiffN(base).size2(), false);
982 
983  unsigned int nb_gauss_pts = data.getDiffN(base).size1();
984  unsigned int nb_base_functions = data.getDiffN(base).size2() / 9;
985  if (nb_base_functions == 0)
986  continue;
987 
988  auto t_diff_n = data.getFTensor2DiffN<3, 3>(base);
989  double *t_inv_diff_n_ptr = &*diffHdivInvJac.data().begin();
991  t_inv_diff_n_ptr, &t_inv_diff_n_ptr[HVEC0_1],
992  &t_inv_diff_n_ptr[HVEC0_2], &t_inv_diff_n_ptr[HVEC1_0],
993  &t_inv_diff_n_ptr[HVEC1_1], &t_inv_diff_n_ptr[HVEC1_2],
994  &t_inv_diff_n_ptr[HVEC2_0], &t_inv_diff_n_ptr[HVEC2_1],
995  &t_inv_diff_n_ptr[HVEC2_2]);
996  double *t_inv_jac_ptr = &*invHoJac.data().begin();
998  t_inv_jac_ptr, &t_inv_jac_ptr[1], &t_inv_jac_ptr[2], &t_inv_jac_ptr[3],
999  &t_inv_jac_ptr[4], &t_inv_jac_ptr[5], &t_inv_jac_ptr[6],
1000  &t_inv_jac_ptr[7], &t_inv_jac_ptr[8]);
1001 
1002  for (unsigned int gg = 0; gg != nb_gauss_pts; ++gg) {
1003  for (unsigned int bb = 0; bb != nb_base_functions; ++bb) {
1004  t_inv_diff_n(i, j) = t_inv_jac(k, j) * t_diff_n(i, k);
1005  ++t_diff_n;
1006  ++t_inv_diff_n;
1007  }
1008  ++t_inv_jac;
1009  }
1010 
1011  data.getDiffN(base).data().swap(diffHdivInvJac.data());
1012  }
1013 
1015 }
FTensor::Index< 'j', 3 > j
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
FTensor::Index< 'i', 3 > i
FTensor::Index< 'k', 3 > k
FieldApproximationBase
approximation base
Definition: definitions.h:144
Ainsworth Cole (Legendre) approx. base .
Definition: definitions.h:146
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407

Member Data Documentation

◆ diffHdivInvJac

MatrixDouble MoFEM::OpSetHoInvJacHdivAndHcurl::diffHdivInvJac

Definition at line 198 of file DataOperators.hpp.

◆ i

FTensor::Index<'i', 3> MoFEM::OpSetHoInvJacHdivAndHcurl::i

Definition at line 192 of file DataOperators.hpp.

◆ invHoJac

MatrixDouble& MoFEM::OpSetHoInvJacHdivAndHcurl::invHoJac

Definition at line 191 of file DataOperators.hpp.

◆ j

FTensor::Index<'j', 3> MoFEM::OpSetHoInvJacHdivAndHcurl::j

Definition at line 193 of file DataOperators.hpp.

◆ k

FTensor::Index<'k', 3> MoFEM::OpSetHoInvJacHdivAndHcurl::k

Definition at line 194 of file DataOperators.hpp.


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