v0.14.0
Public Member Functions | Public Attributes | List of all members
PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions Struct Reference

#include <users_modules/basic_finite_elements/src/PostProcOnRefMesh.hpp>

Inheritance diagram for PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions:
[legend]
Collaboration diagram for PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions:
[legend]

Public Member Functions

 OpHdivFunctions (moab::Interface &post_proc_mesh, std::vector< EntityHandle > &map_gauss_pts, const std::string field_name)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Public Attributes

moab::Interface & postProcMesh
 
std::vector< EntityHandle > & mapGaussPts
 

Detailed Description

template<class VOLUME_ELEMENT>
struct PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions

Definition at line 870 of file PostProcOnRefMesh.hpp.

Constructor & Destructor Documentation

◆ OpHdivFunctions()

template<class VOLUME_ELEMENT >
PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions::OpHdivFunctions ( moab::Interface &  post_proc_mesh,
std::vector< EntityHandle > &  map_gauss_pts,
const std::string  field_name 
)
inline

Definition at line 875 of file PostProcOnRefMesh.hpp.

879  T::UserDataOperator::OPCOL),
880  postProcMesh(post_proc_mesh), mapGaussPts(map_gauss_pts) {}

Member Function Documentation

◆ doWork()

template<class VOLUME_ELEMENT >
MoFEMErrorCode PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData data 
)
inline

Definition at line 882 of file PostProcOnRefMesh.hpp.

883  {
885 
886  if (data.getIndices().size() == 0)
888 
889  std::vector<Tag> th;
890  th.resize(data.getFieldData().size());
891 
892  double def_VAL[9] = {0, 0, 0};
893 
894  switch (type) {
895  case MBTRI:
896  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
897  std::ostringstream ss;
898  ss << "HDIV_FACE_" << side << "_" << dd;
899  CHKERR postProcMesh.tag_get_handle(
900  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
901  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
902  }
903  break;
904  case MBTET:
905  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
906  std::ostringstream ss;
907  ss << "HDIV_TET_" << dd;
908  CHKERR postProcMesh.tag_get_handle(
909  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
910  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
911  }
912  break;
913  default:
914  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
915  "data inconsistency");
916  }
917 
918  for (unsigned int gg = 0; gg < data.getN().size1(); gg++) {
919  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
920  CHKERR postProcMesh.tag_set_data(th[dd], &mapGaussPts[gg], 1,
921  &data.getVectorN<3>(gg)(dd, 0));
922  }
923  }
924 
926  }

Member Data Documentation

◆ mapGaussPts

template<class VOLUME_ELEMENT >
std::vector<EntityHandle>& PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions::mapGaussPts

Definition at line 873 of file PostProcOnRefMesh.hpp.

◆ postProcMesh

template<class VOLUME_ELEMENT >
moab::Interface& PostProcTemplateVolumeOnRefinedMesh< VOLUME_ELEMENT >::OpHdivFunctions::postProcMesh

Definition at line 872 of file PostProcOnRefMesh.hpp.


The documentation for this struct was generated from the following file:
MoFEMFunctionReturnHot
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:460
MoFEM::th
Tag th
Definition: Projection10NodeCoordsOnField.cpp:122
PostProcTemplateVolumeOnRefinedMesh::OpHdivFunctions::mapGaussPts
std::vector< EntityHandle > & mapGaussPts
Definition: PostProcOnRefMesh.hpp:873
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
convert.type
type
Definition: convert.py:64
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
PostProcTemplateVolumeOnRefinedMesh::OpHdivFunctions::postProcMesh
moab::Interface & postProcMesh
Definition: PostProcOnRefMesh.hpp:872
FTensor::dd
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
UserDataOperator
ForcesAndSourcesCore::UserDataOperator UserDataOperator
Definition: HookeElement.hpp:75
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359