v0.8.4
Public Member Functions | Public Attributes | List of all members
MoFEM::Entity_update_pcomm_data< T > Struct Template Reference

#include <src/multi_indices/EntsMultiIndices.hpp>

Collaboration diagram for MoFEM::Entity_update_pcomm_data< T >:
[legend]

Public Member Functions

 Entity_update_pcomm_data (const int pcomm_id=MYPCOMM_INDEX)
 
void operator() (boost::shared_ptr< T > &e)
 

Public Attributes

const int pcommID
 

Detailed Description

template<class T>
struct MoFEM::Entity_update_pcomm_data< T >

Definition at line 470 of file EntsMultiIndices.hpp.

Constructor & Destructor Documentation

◆ Entity_update_pcomm_data()

template<class T >
MoFEM::Entity_update_pcomm_data< T >::Entity_update_pcomm_data ( const int  pcomm_id = MYPCOMM_INDEX)

Definition at line 472 of file EntsMultiIndices.hpp.

473  : pcommID(pcomm_id) {}

Member Function Documentation

◆ operator()()

template<class T >
void MoFEM::Entity_update_pcomm_data< T >::operator() ( boost::shared_ptr< T > &  e)

Definition at line 474 of file EntsMultiIndices.hpp.

474  {
475  e->getBasicDataPtr()->pcommID = pcommID;
476  ParallelComm *pcomm =
477  ParallelComm::get_pcomm(&e->getBasicDataPtr()->moab, pcommID);
478  if (pcomm == NULL)
479  THROW_MESSAGE("pcomm is null");
480  if (e->getBasicDataPtr()->trueIfDistributedMesh()) {
481  THROW_MESSAGE("Can not change owner proc if distributed mesh, this will "
482  "make undetermined behavior");
483  }
484  rval = pcomm->get_owner_handle(e->getRefEnt(), e->getOwnerProc(),
485  e->getOwnerEnt());
486  MOAB_THROW(rval);
487  EntityHandle ent = e->getRefEnt();
488  rval = e->getBasicDataPtr()->moab.tag_get_data(pcomm->part_tag(), &ent, 1,
489  &e->getPartProc());
490  MOAB_THROW(rval);
491  }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:641
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:623
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Common.hpp:78

Member Data Documentation

◆ pcommID

template<class T >
const int MoFEM::Entity_update_pcomm_data< T >::pcommID

Definition at line 471 of file EntsMultiIndices.hpp.


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