MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Object used to attach auxiliary data to PatchData. More...
#include <ExtraData.hpp>
Public Member Functions | |
ExtraData (PatchData &patch) | |
virtual | ~ExtraData () |
PatchData * | get_patch_data () const |
virtual void | notify_patch_destroyed ()=0 |
Notify that the owning PatchData is being destroyed. | |
virtual void | notify_new_patch ()=0 |
Notify that the patch (mesh) in the PatchData is changing. | |
virtual void | notify_sub_patch (PatchData &sub_patch, const size_t *vertex_index_map, const size_t *element_index_map, MsqError &err)=0 |
Nofity that a subpatch is being created from this patch. | |
Private Attributes | |
ExtraData * | patchNext |
PatchData * | patchPtr |
Friends | |
class | PatchData |
Object used to attach auxiliary data to PatchData.
Definition at line 45 of file ExtraData.hpp.
MBMesquite::ExtraData::ExtraData | ( | PatchData & | patch | ) |
Definition at line 40 of file ExtraData.cpp.
References MBMesquite::PatchData::attach_extra_data(), and patchPtr.
MBMesquite::ExtraData::~ExtraData | ( | ) | [virtual] |
Definition at line 49 of file ExtraData.cpp.
References patchPtr, and MBMesquite::PatchData::remove_extra_data().
{ if( patchPtr && !patchPtr->remove_extra_data( this ) ) assert( false ); }
PatchData* MBMesquite::ExtraData::get_patch_data | ( | ) | const [inline] |
Definition at line 52 of file ExtraData.hpp.
References patchPtr.
Referenced by ExtraDataTest::test_initialize(), ExtraDataTest::test_multiple_data(), ExtraDataTest::test_notify_destroyed(), and ExtraDataTest::test_notify_subpatch().
{ return patchPtr; }
virtual void MBMesquite::ExtraData::notify_new_patch | ( | ) | [pure virtual] |
Notify that the patch (mesh) in the PatchData is changing.
Notify attached ExtraData that the PatchData is being changed to contain an new patch (set of mesh entities.)
Implemented in MBMesquite::ExtraUserData< T >, MBMesquite::ExtraUserData< WeightReaderData >, MBMesquite::ExtraUserData< CachedTargetData >, MBMesquite::ExtraUserData< TargetReaderData >, and TestExtraData.
virtual void MBMesquite::ExtraData::notify_patch_destroyed | ( | ) | [pure virtual] |
Notify that the owning PatchData is being destroyed.
Notify an ExtraData object that the patch it is attached to is being destroyed. The ExtraData will have been removed from the PatchData before being notified. Therefore this->get_patch_data() will return NULL.
ExtraData instances will also be notified via this method and removed and removed from the PatchData if the attached MBMesquite::Mesh or MBMesquite::MeshDomain instance is changed.
Implemented in MBMesquite::ExtraUserData< T >, MBMesquite::ExtraUserData< WeightReaderData >, MBMesquite::ExtraUserData< CachedTargetData >, MBMesquite::ExtraUserData< TargetReaderData >, and TestExtraData.
Referenced by MBMesquite::PatchData::notify_patch_destroyed().
virtual void MBMesquite::ExtraData::notify_sub_patch | ( | PatchData & | sub_patch, |
const size_t * | vertex_index_map, | ||
const size_t * | element_index_map, | ||
MsqError & | err | ||
) | [pure virtual] |
Nofity that a subpatch is being created from this patch.
sub_patch | The new, populated subpatch |
vertex_index_map | The indices in the original patch for each vertex in the subpatch. |
element_index_map | The indices in the original patch for each element in the subpatch. |
Implemented in MBMesquite::ExtraUserData< T >, MBMesquite::ExtraUserData< WeightReaderData >, MBMesquite::ExtraUserData< CachedTargetData >, MBMesquite::ExtraUserData< TargetReaderData >, and TestExtraData.
friend class PatchData [friend] |
Definition at line 90 of file ExtraData.hpp.
ExtraData* MBMesquite::ExtraData::patchNext [private] |
Definition at line 91 of file ExtraData.hpp.
Referenced by MBMesquite::PatchData::attach_extra_data(), MBMesquite::PatchData::notify_new_patch(), MBMesquite::PatchData::notify_patch_destroyed(), MBMesquite::PatchData::notify_sub_patch(), and MBMesquite::PatchData::remove_extra_data().
PatchData* MBMesquite::ExtraData::patchPtr [private] |
Definition at line 92 of file ExtraData.hpp.
Referenced by MBMesquite::PatchData::attach_extra_data(), ExtraData(), get_patch_data(), MBMesquite::PatchData::notify_patch_destroyed(), MBMesquite::PatchData::remove_extra_data(), and ~ExtraData().