MOAB: Mesh Oriented datABase
(version 5.4.1)
|
Public Types | |
enum | EventType { NONE = 0, DESTROYED, NEW, SUB } |
Public Member Functions | |
TestExtraData (PatchData &patch) | |
void | clear () |
EventType | get_last_event () const |
PatchData * | get_sub_patch_ptr () const |
virtual void | notify_patch_destroyed () |
Notify that the owning PatchData is being destroyed. | |
virtual void | notify_new_patch () |
Notify that the patch (mesh) in the PatchData is changing. | |
virtual void | notify_sub_patch (PatchData &sub_patch, const size_t *vertex_map, const size_t *element_map, MsqError &err) |
Nofity that a subpatch is being created from this patch. | |
Public Attributes | |
std::vector< size_t > | vertexMap |
std::vector< size_t > | elementMap |
Private Attributes | |
EventType | lastEvent |
PatchData * | subPatchPtr |
Definition at line 67 of file ExtraDataTest.cpp.
TestExtraData::TestExtraData | ( | PatchData & | patch | ) | [inline] |
Definition at line 83 of file ExtraDataTest.cpp.
void TestExtraData::clear | ( | ) | [inline] |
Definition at line 88 of file ExtraDataTest.cpp.
References MBMesquite::NONE.
Referenced by ExtraDataTest::test_notify_new_patch_fill().
{ lastEvent = NONE; subPatchPtr = 0; }
EventType TestExtraData::get_last_event | ( | ) | const [inline] |
Definition at line 93 of file ExtraDataTest.cpp.
Referenced by ExtraDataTest::test_initialize(), ExtraDataTest::test_multiple_data(), ExtraDataTest::test_notify_destroyed(), ExtraDataTest::test_notify_new_patch_fill(), ExtraDataTest::test_notify_new_patch_sub(), and ExtraDataTest::test_notify_subpatch().
{ return lastEvent; }
PatchData* TestExtraData::get_sub_patch_ptr | ( | ) | const [inline] |
Definition at line 97 of file ExtraDataTest.cpp.
Referenced by ExtraDataTest::test_notify_subpatch().
{ return subPatchPtr; }
void TestExtraData::notify_new_patch | ( | ) | [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.)
Implements MBMesquite::ExtraData.
Definition at line 116 of file ExtraDataTest.cpp.
void TestExtraData::notify_patch_destroyed | ( | ) | [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.
Implements MBMesquite::ExtraData.
Definition at line 112 of file ExtraDataTest.cpp.
void TestExtraData::notify_sub_patch | ( | PatchData & | sub_patch, |
const size_t * | vertex_index_map, | ||
const size_t * | element_index_map, | ||
MsqError & | err | ||
) | [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. |
Implements MBMesquite::ExtraData.
Definition at line 120 of file ExtraDataTest.cpp.
References MBMesquite::PatchData::num_elements(), and MBMesquite::PatchData::num_nodes().
{ lastEvent = SUB; subPatchPtr = &p; vertexMap.resize( p.num_nodes() ); elementMap.resize( p.num_elements() ); std::copy( vertex_map, vertex_map + p.num_nodes(), vertexMap.begin() ); std::copy( element_map, element_map + p.num_elements(), elementMap.begin() ); }
std::vector< size_t > TestExtraData::elementMap |
Definition at line 109 of file ExtraDataTest.cpp.
Referenced by ExtraDataTest::test_notify_subpatch().
EventType TestExtraData::lastEvent [private] |
Definition at line 79 of file ExtraDataTest.cpp.
PatchData* TestExtraData::subPatchPtr [private] |
Definition at line 80 of file ExtraDataTest.cpp.
std::vector< size_t > TestExtraData::vertexMap |
Definition at line 109 of file ExtraDataTest.cpp.
Referenced by ExtraDataTest::test_notify_subpatch().