v0.8.23
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 491 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 493 of file EntsMultiIndices.hpp.

494  : 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 495 of file EntsMultiIndices.hpp.

495  {
496  e->getBasicDataPtr()->pcommID = pcommID;
497  ParallelComm *pcomm =
498  ParallelComm::get_pcomm(&e->getBasicDataPtr()->moab, pcommID);
499  if (pcomm == NULL)
500  THROW_MESSAGE("pcomm is null");
501  if (e->getBasicDataPtr()->trueIfDistributedMesh()) {
502  THROW_MESSAGE("Can not change owner proc if distributed mesh, this will "
503  "make undetermined behavior");
504  }
505  rval = pcomm->get_owner_handle(e->getRefEnt(), e->getOwnerProc(),
506  e->getOwnerEnt());
507  MOAB_THROW(rval);
508  EntityHandle ent = e->getRefEnt();
509  rval = e->getBasicDataPtr()->moab.tag_get_data(pcomm->part_tag(), &ent, 1,
510  &e->getPartProc());
511  MOAB_THROW(rval);
512  }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:620
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:602
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84

Member Data Documentation

◆ pcommID

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

Definition at line 492 of file EntsMultiIndices.hpp.


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