Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
MeshAssocPairSide Class Reference

#include <MeshAssocPairSide.hpp>

+ Inheritance diagram for MeshAssocPairSide:
+ Collaboration diagram for MeshAssocPairSide:

Public Member Functions

 MeshAssocPairSide (iRel_Instance relation, iBase_Instance instance, int id)
virtual ~MeshAssocPairSide ()
virtual iBase_Instance instance () const
virtual iRel_IfaceType type () const
virtual int create_relation_side ()
virtual int destroy_relation_side ()
virtual int get_all_entities (int dimension, iBase_EntityHandle **entities, int *entities_alloc, int *entities_size)
virtual int get_all_sets (iBase_EntitySetHandle **sets, int *sets_alloc, int *sets_size)
virtual int get_entities (int dimension, iBase_EntitySetHandle set_handle, iBase_EntityHandle **entities, int *entities_alloc, int *entities_size)
virtual int get_ents_dims (iBase_EntityHandle *entities, int entities_size, int **ent_types, int *ent_types_alloc, int *ent_types_size)
virtual int get_related_ents (iBase_EntityHandle **entities, int *entities_alloc, int *entities_size)
virtual int get_related_sets (iBase_EntitySetHandle **sets, int *sets_alloc, int *sets_size)
virtual int get_relation_side (iBase_EntityHandle *entities, int num_entities, void *values)
virtual int get_relation_side (iBase_EntitySetHandle *sets, int num_sets, void *values)
virtual int set_relation_side (iBase_EntityHandle *entities, int num_entities, const void *values)
virtual int set_relation_side (iBase_EntitySetHandle *sets, int num_sets, const void *values)
virtual int rmv_relation_side (iBase_EntityHandle *entities, int num_entities)
virtual int rmv_relation_side (iBase_EntitySetHandle *sets, int num_sets)
virtual int get_iterator (iBase_EntitySetHandle set, iBase_EntityIterator *iter)
virtual int get_gids (iBase_EntityHandle *entities, int num_entities, int *values)
virtual int get_gids (iBase_EntitySetHandle *sets, int num_sets, int *values)
virtual int get_dims (iBase_EntityHandle *entities, int num_entities, int *values)
virtual int get_dims (iBase_EntitySetHandle *sets, int num_sets, int *values)

Private Attributes

iRel_Instance relation
iMesh_Instance instance_
int id
iBase_TagHandle relation_tag
iBase_TagHandle gid_tag
iBase_TagHandle dim_tag

Detailed Description

Definition at line 7 of file MeshAssocPairSide.hpp.


Constructor & Destructor Documentation


Member Function Documentation

Implements AssocPairSide.

Definition at line 64 of file MeshAssocPairSide.cpp.

References iBase_ENTITY_HANDLE, iBase_SUCCESS, iBase_TAG_NOT_FOUND, id, iMesh_createTag, iMesh_getTagHandle, instance_, PROCESS_ERROR, relation_tag, RELATION_TAG_NAME, and RETURNR.

Referenced by MeshAssocPairSide().

{
    int result;
    std::stringstream ss;
    ss << RELATION_TAG_NAME << id;
    std::string rel_tag_name( ss.str() );

    iMesh_getTagHandle( instance_, rel_tag_name.c_str(), &relation_tag, &result, rel_tag_name.size() );
    if( result == iBase_TAG_NOT_FOUND )
    {
        iMesh_createTag( instance_, rel_tag_name.c_str(), 1, iBase_ENTITY_HANDLE, &relation_tag, &result,
                         rel_tag_name.size() );
    }

    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_all_entities ( int  dimension,
iBase_EntityHandle **  entities,
int *  entities_alloc,
int *  entities_size 
) [virtual]

Implements AssocPairSide.

Definition at line 96 of file MeshAssocPairSide.cpp.

References iBase_ALL_TYPES, iBase_SUCCESS, iMesh_ALL_TOPOLOGIES, iMesh_getEntities, instance_, PROCESS_ERROR, and RETURNR.

{
    int this_type = ( dimension == -1 ? iBase_ALL_TYPES : dimension );
    int result;

    iMesh_getEntities( instance_, 0, this_type, iMesh_ALL_TOPOLOGIES, entities, entities_alloc, entities_size,
                       &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_all_sets ( iBase_EntitySetHandle **  sets,
int *  sets_alloc,
int *  sets_size 
) [virtual]

Implements AssocPairSide.

Definition at line 110 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_getEntSets, instance_, PROCESS_ERROR, and RETURNR.

{
    int result;

    iMesh_getEntSets( instance_, 0, 0, sets, sets_alloc, sets_size, &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_dims ( iBase_EntityHandle entities,
int  num_entities,
int *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 275 of file MeshAssocPairSide.cpp.

References dim_tag, iBase_SUCCESS, iMesh_getArrData, instance_, PROCESS_ERROR, and RETURNR.

{
    int values_alloc = num_entities * sizeof( int );
    int values_size;
    int result;

    iMesh_getArrData( instance_, entities, num_entities, dim_tag, &values, &values_alloc, &values_size, &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_dims ( iBase_EntitySetHandle sets,
int  num_sets,
int *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 286 of file MeshAssocPairSide.cpp.

References dim_tag, iBase_SUCCESS, iMesh_getEntSetData, instance_, PROCESS_ERROR, and RETURNR.

{
    char* data       = reinterpret_cast< char* >( values );
    int values_alloc = sizeof( int );
    int values_size;
    int result;

    for( int i = 0; i < num_sets; i++ )
    {
        iMesh_getEntSetData( instance_, sets[i], dim_tag, reinterpret_cast< void** >( &data ), &values_alloc,
                             &values_size, &result );
        data += values_size;
        PROCESS_ERROR;
    }
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_entities ( int  dimension,
iBase_EntitySetHandle  set_handle,
iBase_EntityHandle **  entities,
int *  entities_alloc,
int *  entities_size 
) [virtual]

Implements AssocPairSide.

Definition at line 119 of file MeshAssocPairSide.cpp.

References iBase_ALL_TYPES, iBase_SUCCESS, iMesh_ALL_TOPOLOGIES, iMesh_getEntities, instance_, PROCESS_ERROR, and RETURNR.

{
    int this_type = ( dimension == -1 ? iBase_ALL_TYPES : dimension );
    int result;

    iMesh_getEntities( instance_, set_handle, this_type, iMesh_ALL_TOPOLOGIES, entities, entities_alloc, entities_size,
                       &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_ents_dims ( iBase_EntityHandle entities,
int  entities_size,
int **  ent_types,
int *  ent_types_alloc,
int *  ent_types_size 
) [virtual]

Implements AssocPairSide.

Definition at line 134 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_getEntArrType, instance_, PROCESS_ERROR, and RETURNR.

{
    int result;

    iMesh_getEntArrType( instance_, entities, entities_size, ent_types, ent_types_alloc, ent_types_size, &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_gids ( iBase_EntityHandle entities,
int  num_entities,
int *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 247 of file MeshAssocPairSide.cpp.

References gid_tag, iBase_SUCCESS, iMesh_getArrData, instance_, PROCESS_ERROR, and RETURNR.

{
    int values_alloc = num_entities * sizeof( int );
    int values_size;
    int result;

    iMesh_getArrData( instance_, entities, num_entities, gid_tag, &values, &values_alloc, &values_size, &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_gids ( iBase_EntitySetHandle sets,
int  num_sets,
int *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 258 of file MeshAssocPairSide.cpp.

References gid_tag, iBase_SUCCESS, iMesh_getEntSetData, instance_, PROCESS_ERROR, and RETURNR.

{
    char* data       = reinterpret_cast< char* >( values );
    int values_alloc = sizeof( int );
    int values_size;
    int result;

    for( int i = 0; i < num_sets; i++ )
    {
        iMesh_getEntSetData( instance_, sets[i], gid_tag, reinterpret_cast< void** >( &data ), &values_alloc,
                             &values_size, &result );
        data += values_size;
        PROCESS_ERROR;
    }
    RETURNR( iBase_SUCCESS );
}

Implements AssocPairSide.

Definition at line 239 of file MeshAssocPairSide.cpp.

References iBase_ALL_TYPES, iBase_SUCCESS, iMesh_ALL_TOPOLOGIES, iMesh_initEntIter, instance_, and RETURNR.

{
    int result;
    int resilient = 0;
    iMesh_initEntIter( instance_, set, iBase_ALL_TYPES, iMesh_ALL_TOPOLOGIES, resilient, iter, &result );
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_related_ents ( iBase_EntityHandle **  entities,
int *  entities_alloc,
int *  entities_size 
) [virtual]
int MeshAssocPairSide::get_related_sets ( iBase_EntitySetHandle **  sets,
int *  sets_alloc,
int *  sets_size 
) [virtual]

Implements AssocPairSide.

Definition at line 156 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_getEntSetsByTagsRec, instance_, PROCESS_ERROR, relation_tag, and RETURNR.

{
    int result;
    iMesh_getEntSetsByTagsRec( instance_, 0, &relation_tag, NULL, 1, false, sets, sets_alloc, sets_size, &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_relation_side ( iBase_EntityHandle entities,
int  num_entities,
void *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 164 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_getArrData, instance_, PROCESS_ERROR, relation_tag, and RETURNR.

{
    int values_alloc = num_entities * sizeof( iBase_EntityHandle );
    int values_size;
    int result;

    iMesh_getArrData( instance_, entities, num_entities, relation_tag, &values, &values_alloc, &values_size, &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::get_relation_side ( iBase_EntitySetHandle sets,
int  num_sets,
void *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 175 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_getEntSetData, instance_, PROCESS_ERROR, relation_tag, and RETURNR.

{
    char* data       = static_cast< char* >( values );
    int values_alloc = sizeof( iBase_EntityHandle );
    int values_size;
    int result;

    for( int i = 0; i < num_sets; i++ )
    {
        iMesh_getEntSetData( instance_, sets[i], relation_tag, reinterpret_cast< void** >( &data ), &values_alloc,
                             &values_size, &result );
        data += values_size;
        PROCESS_ERROR;
    }
    RETURNR( iBase_SUCCESS );
}

Implements AssocPairSide.

Definition at line 54 of file MeshAssocPairSide.cpp.

References instance_.

{
    return instance_;
}
int MeshAssocPairSide::rmv_relation_side ( iBase_EntityHandle entities,
int  num_entities 
) [virtual]

Implements AssocPairSide.

Definition at line 217 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_rmvArrTag, instance_, PROCESS_ERROR, relation_tag, and RETURNR.

{
    int result;

    iMesh_rmvArrTag( instance_, entities, num_entities, relation_tag, &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::rmv_relation_side ( iBase_EntitySetHandle sets,
int  num_sets 
) [virtual]

Implements AssocPairSide.

Definition at line 226 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_rmvEntSetTag, instance_, PROCESS_ERROR, relation_tag, and RETURNR.

{
    int result;

    for( int i = 0; i < num_sets; i++ )
    {
        iMesh_rmvEntSetTag( instance_, sets[i], relation_tag, &result );
        PROCESS_ERROR;
    }

    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::set_relation_side ( iBase_EntityHandle entities,
int  num_entities,
const void *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 192 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_setArrData, instance_, PROCESS_ERROR, relation_tag, and RETURNR.

{
    int result;

    iMesh_setArrData( instance_, entities, num_entities, relation_tag, static_cast< const char* >( values ),
                      num_entities * sizeof( iBase_EntityHandle ), &result );
    PROCESS_ERROR;
    RETURNR( iBase_SUCCESS );
}
int MeshAssocPairSide::set_relation_side ( iBase_EntitySetHandle sets,
int  num_sets,
const void *  values 
) [virtual]

Implements AssocPairSide.

Definition at line 202 of file MeshAssocPairSide.cpp.

References iBase_SUCCESS, iMesh_setEntSetData, instance_, PROCESS_ERROR, relation_tag, RETURNR, and size.

{
    const char* data = static_cast< const char* >( values );
    int size         = sizeof( iBase_EntityHandle );
    int result;

    for( int i = 0; i < num_sets; i++ )
    {
        iMesh_setEntSetData( instance_, sets[i], relation_tag, data, size, &result );
        data += size;
        PROCESS_ERROR;
    }
    RETURNR( iBase_SUCCESS );
}

Implements AssocPairSide.

Definition at line 59 of file MeshAssocPairSide.cpp.

References iRel_IMESH_IFACE.

{
    return iRel_IMESH_IFACE;
}

Member Data Documentation

Definition at line 65 of file MeshAssocPairSide.hpp.

Referenced by get_dims(), and MeshAssocPairSide().

Definition at line 64 of file MeshAssocPairSide.hpp.

Referenced by get_gids(), and MeshAssocPairSide().

int MeshAssocPairSide::id [private]

Definition at line 61 of file MeshAssocPairSide.hpp.

Referenced by create_relation_side().

Definition at line 59 of file MeshAssocPairSide.hpp.

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