v0.9.1
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 572 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 577 of file PostProcOnRefMesh.hpp.

581  T::UserDataOperator::OPCOL),
582  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 584 of file PostProcOnRefMesh.hpp.

585  {
587 
588  if (data.getIndices().size() == 0)
590 
591  std::vector<Tag> th;
592  th.resize(data.getFieldData().size());
593 
594  double def_VAL[9] = {0, 0, 0};
595 
596  switch (type) {
597  case MBTRI:
598  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
599  std::ostringstream ss;
600  ss << "HDIV_FACE_" << side << "_" << dd;
601  CHKERR postProcMesh.tag_get_handle(
602  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
603  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
604  }
605  break;
606  case MBTET:
607  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
608  std::ostringstream ss;
609  ss << "HDIV_TET_" << dd;
610  CHKERR postProcMesh.tag_get_handle(
611  ss.str().c_str(), 3, MB_TYPE_DOUBLE, th[dd],
612  MB_TAG_CREAT | MB_TAG_SPARSE, def_VAL);
613  }
614  break;
615  default:
616  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
617  "data inconsistency");
618  }
619 
620  for (unsigned int gg = 0; gg < data.getN().size1(); gg++) {
621  for (unsigned int dd = 0; dd < data.getN().size2() / 3; dd++) {
622  CHKERR postProcMesh.tag_set_data(th[dd], &mapGaussPts[gg], 1,
623  &data.getVectorN<3>(gg)(dd, 0));
624  }
625  }
626 
628  }
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:483
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:514
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:602
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:413

Member Data Documentation

◆ mapGaussPts

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

Definition at line 575 of file PostProcOnRefMesh.hpp.

◆ postProcMesh

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

Definition at line 574 of file PostProcOnRefMesh.hpp.


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