moab
moab::SweptElementSeq Class Reference

#include <SweptElementSeq.hpp>

Inheritance diagram for moab::SweptElementSeq:
moab::ElementSequence moab::EntitySequence

List of all members.

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 30 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 26 of file SweptElementSeq.cpp.

  : 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 43 of file SweptElementSeq.cpp.

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

Definition at line 149 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 99 of file SweptElementSeq.hpp.

  { 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 103 of file SweptElementSeq.hpp.

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

Definition at line 105 of file SweptElementSeq.hpp.

  { 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 97 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 47 of file SweptElementSeq.cpp.

{
  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 59 of file SweptElementSeq.cpp.

{
  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 88 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 100 of file SweptElementSeq.cpp.

{
  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 57 of file SweptElementSeq.hpp.

  { 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 61 of file SweptElementSeq.hpp.

  { 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 85 of file SweptElementSeq.hpp.

  { 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 109 of file SweptElementSeq.hpp.

  { 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 49 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 53 of file SweptElementSeq.hpp.

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

Definition at line 93 of file SweptElementSeq.hpp.

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

convenience functions for parameter extents

Definition at line 90 of file SweptElementSeq.hpp.

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

Definition at line 94 of file SweptElementSeq.hpp.

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

Definition at line 91 of file SweptElementSeq.hpp.

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

Definition at line 95 of file SweptElementSeq.hpp.

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

Definition at line 92 of file SweptElementSeq.hpp.

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

get max params for this element

Definition at line 73 of file SweptElementSeq.hpp.

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

Definition at line 75 of file SweptElementSeq.hpp.

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

Definition at line 77 of file SweptElementSeq.hpp.

  { 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 65 of file SweptElementSeq.hpp.

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

Definition at line 67 of file SweptElementSeq.hpp.

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

Definition at line 69 of file SweptElementSeq.hpp.

  { 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 81 of file SweptElementSeq.hpp.

  { sdata()->param_extents( di, dj, dk ); } 

Definition at line 43 of file SweptElementSeq.hpp.

  { return reinterpret_cast<ScdElementData*>(data()); } 
ScdElementData const* moab::SweptElementSeq::sdata ( ) const [inline]

Definition at line 45 of file SweptElementSeq.hpp.

  { 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 80 of file SweptElementSeq.cpp.

{
  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 94 of file SweptElementSeq.cpp.

  { 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 91 of file SweptElementSeq.cpp.

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

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