MOAB: Mesh Oriented datABase  (version 5.2.1)
moab::SweptElementSeq Class Reference

#include <SweptElementSeq.hpp>

+ Inheritance diagram for moab::SweptElementSeq:
+ Collaboration diagram for moab::SweptElementSeq:

Public Member Functions

 SweptElementSeq (EntityHandle start_handle, const int imin, const int jmin, const int kmin, const int imax, const int jmax, const int kmax, const int *Cq)
 constructor
virtual ~SweptElementSeq ()
ScdElementDatasdata ()
ScdElementData const * sdata () const
EntityHandle get_vertex (const int i, const int j, const int k) const
 get handle of vertex at i, j, k
EntityHandle get_vertex (const HomCoord &coords) const
 get handle of vertex at homogeneous coords
EntityHandle get_element (const int i, const int j, const int k) const
 get handle of element at i, j, k
EntityHandle get_element (const HomCoord &coords) const
 get handle of element at homogeneous coords
const HomCoordmin_params () const
 get min params for this element
void min_params (HomCoord &coords) const
void min_params (int &i, int &j, int &k) const
const HomCoordmax_params () const
 get max params for this element
void max_params (HomCoord &coords) const
void max_params (int &i, int &j, int &k) const
void param_extents (int &di, int &dj, int &dk) const
 get the number of vertices in each direction, inclusive
ErrorCode get_params (const EntityHandle ehandle, int &i, int &j, int &k) const
 given a handle, get the corresponding parameters
int i_min () const
 convenience functions for parameter extents
int j_min () const
int k_min () const
int i_max () const
int j_max () const
int k_max () const
bool boundary_complete () const
bool contains (const int i, const int j, const int k) const
 test whether this sequence contains these parameters
bool contains (const HomCoord &coords) const
ErrorCode get_params_connectivity (const int i, const int j, const int k, std::vector< EntityHandle > &connectivity) const
 get connectivity of an entity given entity's parameters
virtual ErrorCode get_connectivity (EntityHandle handle, std::vector< EntityHandle > &connect, bool topological=false) const
virtual ErrorCode get_connectivity (EntityHandle handle, EntityHandle const *&connect, int &connect_length, bool topological=false, std::vector< EntityHandle > *storage=0) const
virtual ErrorCode set_connectivity (EntityHandle handle, EntityHandle const *connect, int connect_length)
virtual EntityHandleget_connectivity_array ()
virtual int values_per_entity () const
 Integer value used in finding appropriate SequenceData.
virtual EntitySequencesplit (EntityHandle here)
 Split this sequence into two consecutive sequences.
virtual SequenceDatacreate_data_subset (EntityHandle start_handle, EntityHandle end_handle) const
 Create a new SequenceData that is a copy of a subset of the one referenced by this sequence.
virtual void get_const_memory_use (unsigned long &bytes_per_entity, unsigned long &size_of_sequence) const
 Get memory characteristcs that are the same for all entities.

Protected Member Functions

 SweptElementSeq (SweptElementSeq &split_from, EntityHandle here)

Detailed Description

Definition at line 31 of file SweptElementSeq.hpp.


Constructor & Destructor Documentation

moab::SweptElementSeq::SweptElementSeq ( EntityHandle  start_handle,
const int  imin,
const int  jmin,
const int  kmin,
const int  imax,
const int  jmax,
const int  kmax,
const int *  Cq 
)

constructor

Definition at line 27 of file SweptElementSeq.cpp.

Referenced by split().

    : ElementSequence( shandle, ScdElementData::calc_num_entities( shandle, imax - imin, jmax - jmin, kmax - kmin ),
                       CN::VerticesPerEntity( TYPE_FROM_HANDLE( shandle ) ),
                       new SweptElementData( shandle, imin, jmin, kmin, imax, jmax, kmax, Cq ) )
{
}

Definition at line 35 of file SweptElementSeq.cpp.

{}
moab::SweptElementSeq::SweptElementSeq ( SweptElementSeq split_from,
EntityHandle  here 
) [inline, protected]

Definition at line 194 of file SweptElementSeq.hpp.

: ElementSequence( split_from, here ) {}

Member Function Documentation

test the bounding vertex sequences and determine whether they fully define the vertices covering this element block's parameter space

Definition at line 145 of file SweptElementSeq.hpp.

References moab::ScdElementData::boundary_complete(), and sdata().

    {
        return sdata()->boundary_complete();
    }
bool moab::SweptElementSeq::contains ( const int  i,
const int  j,
const int  k 
) const [inline]

test whether this sequence contains these parameters

Definition at line 151 of file SweptElementSeq.hpp.

References moab::ScdElementData::contains(), and sdata().

    {
        return sdata()->contains( HomCoord( i, j, k ) );
    }
bool moab::SweptElementSeq::contains ( const HomCoord coords) const [inline]

Definition at line 155 of file SweptElementSeq.hpp.

References moab::ScdElementData::contains(), and sdata().

    {
        return sdata()->contains( coords );
    }
SequenceData * moab::SweptElementSeq::create_data_subset ( EntityHandle  start_handle,
EntityHandle  end_handle 
) const [virtual]

Create a new SequenceData that is a copy of a subset of the one referenced by this sequence.

Create a new SequenceData that is a copy of a subset of the SequenceData referenced by this EntitySequence. Do not make any changes to this EntitySequence or the current SequenceData.

Implements moab::EntitySequence.

Definition at line 83 of file SweptElementSeq.cpp.

{
    return 0;
}
ErrorCode moab::SweptElementSeq::get_connectivity ( EntityHandle  handle,
std::vector< EntityHandle > &  connect,
bool  topological = false 
) const [virtual]

Implements moab::ElementSequence.

Definition at line 37 of file SweptElementSeq.cpp.

References get_params(), get_params_connectivity(), and MB_SUCCESS.

Referenced by get_connectivity().

{
    int i, j, k;
    ErrorCode rval = get_params( handle, i, j, k );
    if( MB_SUCCESS == rval ) rval = get_params_connectivity( i, j, k, connect );
    return rval;
}
ErrorCode moab::SweptElementSeq::get_connectivity ( EntityHandle  handle,
EntityHandle const *&  connect,
int &  connect_length,
bool  topological = false,
std::vector< EntityHandle > *  storage = 0 
) const [virtual]

Implements moab::ElementSequence.

Definition at line 46 of file SweptElementSeq.cpp.

References get_connectivity(), and MB_NOT_IMPLEMENTED.

{
    if( !storage )
    {
        connect        = 0;
        connect_length = 0;
        return MB_NOT_IMPLEMENTED;
    }

    storage->clear();
    ErrorCode rval = get_connectivity( handle, *storage, topo );
    connect        = &( *storage )[0];
    connect_length = storage->size();
    return rval;
}

Implements moab::ElementSequence.

Definition at line 68 of file SweptElementSeq.cpp.

{
    return 0;
}
void moab::SweptElementSeq::get_const_memory_use ( unsigned long &  bytes_per_entity,
unsigned long &  size_of_sequence 
) const [virtual]

Get memory characteristcs that are the same for all entities.

Get charactersitic constant memory use for all entities in sequence.

Parameters:
bytes_per_entityThe total bytes consumed for each entity in the underlying SequenceData. It is assumed that the same amount of memory is consumed for unused portions of the SequenceData.
size_of_sequenceThe size of the leaf subclass of this class

Implements moab::EntitySequence.

Definition at line 88 of file SweptElementSeq.cpp.

References moab::ScdElementData::get_memory_use(), sdata(), and moab::SequenceData::size().

{
    sequence_size    = sizeof( *this );
    bytes_per_entity = sdata()->get_memory_use() / sdata()->size();
}
EntityHandle moab::SweptElementSeq::get_element ( const int  i,
const int  j,
const int  k 
) const [inline]

get handle of element at i, j, k

Definition at line 62 of file SweptElementSeq.hpp.

References moab::ScdElementData::get_element(), and sdata().

    {
        return sdata()->get_element( i, j, k );
    }
EntityHandle moab::SweptElementSeq::get_element ( const HomCoord coords) const [inline]

get handle of element at homogeneous coords

Definition at line 68 of file SweptElementSeq.hpp.

References moab::ScdElementData::get_element(), moab::HomCoord::i(), moab::HomCoord::j(), moab::HomCoord::k(), and sdata().

    {
        return sdata()->get_element( coords.i(), coords.j(), coords.k() );
    }
ErrorCode moab::SweptElementSeq::get_params ( const EntityHandle  ehandle,
int &  i,
int &  j,
int &  k 
) const [inline]

given a handle, get the corresponding parameters

Definition at line 112 of file SweptElementSeq.hpp.

References moab::ScdElementData::get_params(), and sdata().

Referenced by get_connectivity().

    {
        return sdata()->get_params( ehandle, i, j, k );
    }
ErrorCode moab::SweptElementSeq::get_params_connectivity ( const int  i,
const int  j,
const int  k,
std::vector< EntityHandle > &  connectivity 
) const [inline]

get connectivity of an entity given entity's parameters

Definition at line 161 of file SweptElementSeq.hpp.

References moab::ScdElementData::get_params_connectivity(), and sdata().

Referenced by get_connectivity().

    {
        return sdata()->get_params_connectivity( i, j, k, connectivity );
    }
EntityHandle moab::SweptElementSeq::get_vertex ( const int  i,
const int  j,
const int  k 
) const [inline]

get handle of vertex at i, j, k

Definition at line 50 of file SweptElementSeq.hpp.

    {
        return get_vertex( HomCoord( i, j, k ) );
    }
EntityHandle moab::SweptElementSeq::get_vertex ( const HomCoord coords) const [inline]

get handle of vertex at homogeneous coords

Definition at line 56 of file SweptElementSeq.hpp.

References moab::ScdElementData::get_vertex(), and sdata().

    {
        return sdata()->get_vertex( coords );
    }
int moab::SweptElementSeq::i_max ( ) const [inline]

Definition at line 130 of file SweptElementSeq.hpp.

References moab::HomCoord::i(), and max_params().

    {
        return max_params().i();
    }
int moab::SweptElementSeq::i_min ( ) const [inline]

convenience functions for parameter extents

Definition at line 118 of file SweptElementSeq.hpp.

References moab::HomCoord::i(), and min_params().

    {
        return min_params().i();
    }
int moab::SweptElementSeq::j_max ( ) const [inline]

Definition at line 134 of file SweptElementSeq.hpp.

References moab::HomCoord::j(), and max_params().

    {
        return max_params().j();
    }
int moab::SweptElementSeq::j_min ( ) const [inline]

Definition at line 122 of file SweptElementSeq.hpp.

References moab::HomCoord::j(), and min_params().

    {
        return min_params().j();
    }
int moab::SweptElementSeq::k_max ( ) const [inline]

Definition at line 138 of file SweptElementSeq.hpp.

References moab::HomCoord::k(), and max_params().

    {
        return max_params().k();
    }
int moab::SweptElementSeq::k_min ( ) const [inline]

Definition at line 126 of file SweptElementSeq.hpp.

References moab::HomCoord::k(), and min_params().

    {
        return min_params().k();
    }
const HomCoord& moab::SweptElementSeq::max_params ( ) const [inline]

get max params for this element

Definition at line 90 of file SweptElementSeq.hpp.

References moab::ScdElementData::max_params(), and sdata().

Referenced by i_max(), j_max(), k_max(), and max_params().

    {
        return sdata()->max_params();
    }
void moab::SweptElementSeq::max_params ( HomCoord coords) const [inline]

Definition at line 94 of file SweptElementSeq.hpp.

References max_params().

    {
        coords = max_params();
    }
void moab::SweptElementSeq::max_params ( int &  i,
int &  j,
int &  k 
) const [inline]

Definition at line 98 of file SweptElementSeq.hpp.

References moab::HomCoord::i(), moab::HomCoord::j(), moab::HomCoord::k(), and max_params().

    {
        i = max_params().i();
        j = max_params().j();
        k = max_params().k();
    }
const HomCoord& moab::SweptElementSeq::min_params ( ) const [inline]

get min params for this element

Definition at line 74 of file SweptElementSeq.hpp.

References moab::ScdElementData::min_params(), and sdata().

Referenced by i_min(), j_min(), k_min(), and min_params().

    {
        return sdata()->min_params();
    }
void moab::SweptElementSeq::min_params ( HomCoord coords) const [inline]

Definition at line 78 of file SweptElementSeq.hpp.

References min_params().

    {
        coords = min_params();
    }
void moab::SweptElementSeq::min_params ( int &  i,
int &  j,
int &  k 
) const [inline]

Definition at line 82 of file SweptElementSeq.hpp.

References moab::HomCoord::i(), moab::HomCoord::j(), moab::HomCoord::k(), and min_params().

    {
        i = min_params().i();
        j = min_params().j();
        k = min_params().k();
    }
void moab::SweptElementSeq::param_extents ( int &  di,
int &  dj,
int &  dk 
) const [inline]

get the number of vertices in each direction, inclusive

Definition at line 106 of file SweptElementSeq.hpp.

References moab::ScdElementData::param_extents(), and sdata().

    {
        sdata()->param_extents( di, dj, dk );
    }
ScdElementData const* moab::SweptElementSeq::sdata ( ) const [inline]

Definition at line 44 of file SweptElementSeq.hpp.

References moab::EntitySequence::data().

    {
        return reinterpret_cast< const ScdElementData* >( data() );
    }
ErrorCode moab::SweptElementSeq::set_connectivity ( EntityHandle  handle,
EntityHandle const *  connect,
int  connect_length 
) [virtual]

Implements moab::ElementSequence.

Definition at line 63 of file SweptElementSeq.cpp.

References MB_NOT_IMPLEMENTED.

{
    return MB_NOT_IMPLEMENTED;
}

Split this sequence into two consecutive sequences.

Split this sequence into two sequences.

Parameters:
hereNew sequences should be [start_handle(),here) & [here,end_handle()]
Returns:
New sequence containing [here,end_handle()]

Implements moab::EntitySequence.

Definition at line 78 of file SweptElementSeq.cpp.

References SweptElementSeq().

{
    return new SweptElementSeq( *this, here );
}

Integer value used in finding appropriate SequenceData.

This value is matched to input values by TypeSequenceManager to determine if an available, unused portino of a SequenceData can be used for a specific entity allocation. For example, it is used to find a SequenceData with the appropriate number of vertices per element when allocating elements. The default value is zero.

Reimplemented from moab::EntitySequence.

Definition at line 73 of file SweptElementSeq.cpp.

{
    return -1;
}  // never reuse freed handles for swept elements

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