moab
|
#include <SweptElementSeq.hpp>
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 () |
ScdElementData * | sdata () |
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 HomCoord & | min_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 HomCoord & | max_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 EntityHandle * | get_connectivity_array () |
virtual int | values_per_entity () const |
Integer value used in finding appropriate SequenceData. | |
virtual EntitySequence * | split (EntityHandle here) |
Split this sequence into two consecutive sequences. | |
virtual SequenceData * | create_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) |
Definition at line 30 of file SweptElementSeq.hpp.
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 ) ) { }
moab::SweptElementSeq::~SweptElementSeq | ( | ) | [virtual] |
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 ) {}
bool moab::SweptElementSeq::boundary_complete | ( | ) | const [inline] |
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.
bool moab::SweptElementSeq::contains | ( | const HomCoord & | coords | ) | const [inline] |
Definition at line 105 of file SweptElementSeq.hpp.
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; }
EntityHandle * moab::SweptElementSeq::get_connectivity_array | ( | ) | [virtual] |
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.
bytes_per_entity | The 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_sequence | The 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 ); }
ScdElementData* moab::SweptElementSeq::sdata | ( | ) | [inline] |
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; }
EntitySequence * moab::SweptElementSeq::split | ( | EntityHandle | here | ) | [virtual] |
Split this sequence into two consecutive sequences.
Split this sequence into two sequences.
here | New sequences should be [start_handle(),here) & [here,end_handle()] |
Implements moab::EntitySequence.
Definition at line 94 of file SweptElementSeq.cpp.
{ return new SweptElementSeq( *this, here ); }
int moab::SweptElementSeq::values_per_entity | ( | ) | const [virtual] |
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