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 485 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 487 of file EntsMultiIndices.hpp.

488  : 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 489 of file EntsMultiIndices.hpp.

489  {
490  e->getBasicDataPtr()->pcommID = pcommID;
491  ParallelComm *pcomm =
492  ParallelComm::get_pcomm(&e->getBasicDataPtr()->moab, pcommID);
493  if (pcomm == NULL)
494  THROW_MESSAGE("pcomm is null");
495  if (e->getBasicDataPtr()->trueIfDistributedMesh()) {
496  THROW_MESSAGE("Can not change owner proc if distributed mesh, this will "
497  "make undetermined behavior");
498  }
499  rval = pcomm->get_owner_handle(e->getRefEnt(), e->getOwnerProc(),
500  e->getOwnerEnt());
501  MOAB_THROW(rval);
502  EntityHandle ent = e->getRefEnt();
503  rval = e->getBasicDataPtr()->moab.tag_get_data(pcomm->part_tag(), &ent, 1,
504  &e->getPartProc());
505  MOAB_THROW(rval);
506  }
#define THROW_MESSAGE(a)
Throw MoFEM exception.
Definition: definitions.h:619
#define MOAB_THROW(a)
Check error code of MoAB function and throw MoFEM exception.
Definition: definitions.h:601
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 486 of file EntsMultiIndices.hpp.


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