MOAB: Mesh Oriented datABase  (version 5.2.1)
MBMesquite::ExtraData Class Reference

Object used to attach auxiliary data to PatchData. More...

#include <ExtraData.hpp>

+ Inheritance diagram for MBMesquite::ExtraData:
+ Collaboration diagram for MBMesquite::ExtraData:

Public Member Functions

 ExtraData (PatchData &patch)
virtual ~ExtraData ()
PatchDataget_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

ExtraDatapatchNext
PatchDatapatchPtr

Friends

class PatchData

Detailed Description

Object used to attach auxiliary data to PatchData.

Definition at line 45 of file ExtraData.hpp.


Constructor & Destructor Documentation

Definition at line 40 of file ExtraData.cpp.

References MBMesquite::PatchData::attach_extra_data(), and patchPtr.

                                       : patchNext( 0 ), patchPtr( &patch )
{
    if( !patch.attach_extra_data( this ) )
    {
        assert( false );
        patchPtr = 0;
    }
}

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 );
}

Member Function Documentation

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.

Parameters:
sub_patchThe new, populated subpatch
vertex_index_mapThe indices in the original patch for each vertex in the subpatch.
element_index_mapThe 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.


Friends And Related Function Documentation

friend class PatchData [friend]

Definition at line 88 of file ExtraData.hpp.


Member Data Documentation

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines