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

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

Inherits UserDataOperator.

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, DataForcesAndSourcesCore::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 584 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 
)

Definition at line 589 of file PostProcOnRefMesh.hpp.

593  T::UserDataOperator::OPCOL),
594  postProcMesh(post_proc_mesh), mapGaussPts(map_gauss_pts) {}
std::vector< EntityHandle > & mapGaussPts
moab::Interface & postProcMesh
ForcesAndSourcesCore::UserDataOperator UserDataOperator

Member Function Documentation

◆ doWork()

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

Definition at line 596 of file PostProcOnRefMesh.hpp.

597  {
599 
600  if (data.getIndices().size() == 0)
602 
603  std::vector<Tag> th;
604  th.resize(data.getFieldData().size());
605 
606  double def_VAL[9] = {0, 0, 0};
607 
608  switch (type) {
609  case MBTRI:
610  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
611  std::ostringstream ss;
612  ss << "HDIV_FACE_" << side << "_" << dd;
613  CHKERR postProcMesh.tag_get_handle(
614  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
615  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
616  }
617  break;
618  case MBTET:
619  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
620  std::ostringstream ss;
621  ss << "HDIV_TET_" << dd;
622  CHKERR postProcMesh.tag_get_handle(
623  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
624  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
625  }
626  break;
627  default:
628  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
629  "data inconsistency");
630  }
631 
632  for (unsigned int gg = 0; gg < data.getN().size1(); gg++) {
633  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
634  CHKERR postProcMesh.tag_set_data(th[dd], &mapGaussPts[gg], 1,
635  &data.getVectorN<3>(gg)(dd, 0));
636  }
637  }
638 
640  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
std::vector< EntityHandle > & mapGaussPts
moab::Interface & postProcMesh
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:508
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
#define CHKERR
Inline error check.
Definition: definitions.h:596
#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

◆ mapGaussPts

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

Definition at line 587 of file PostProcOnRefMesh.hpp.

◆ postProcMesh

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

Definition at line 586 of file PostProcOnRefMesh.hpp.


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