v0.9.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>

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 583 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 588 of file PostProcOnRefMesh.hpp.

592  T::UserDataOperator::OPCOL),
593  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 595 of file PostProcOnRefMesh.hpp.

596  {
598 
599  if (data.getIndices().size() == 0)
601 
602  std::vector<Tag> th;
603  th.resize(data.getFieldData().size());
604 
605  double def_VAL[9] = {0, 0, 0};
606 
607  switch (type) {
608  case MBTRI:
609  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
610  std::ostringstream ss;
611  ss << "HDIV_FACE_" << side << "_" << dd;
612  CHKERR postProcMesh.tag_get_handle(
613  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
614  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
615  }
616  break;
617  case MBTET:
618  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
619  std::ostringstream ss;
620  ss << "HDIV_TET_" << dd;
621  CHKERR postProcMesh.tag_get_handle(
622  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
623  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
624  }
625  break;
626  default:
627  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
628  "data inconsistency");
629  }
630 
631  for (unsigned int gg = 0; gg < data.getN().size1(); gg++) {
632  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
633  CHKERR postProcMesh.tag_set_data(th[dd], &mapGaussPts[gg], 1,
634  &data.getVectorN<3>(gg)(dd, 0));
635  }
636  }
637 
639  }
#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 586 of file PostProcOnRefMesh.hpp.

◆ postProcMesh

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

Definition at line 585 of file PostProcOnRefMesh.hpp.


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