MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <StructuredElementSeq.hpp>
Public Member Functions | |
StructuredElementSeq (EntityHandle start_handle, const int imin, const int jmin, const int kmin, const int imax, const int jmax, const int kmax, int *is_periodic=NULL) | |
constructor | |
virtual | ~StructuredElementSeq () |
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 | |
int | is_periodic_i () const |
Return whether box is periodic in i. | |
int | is_periodic_j () const |
Return whether box is periodic in j. | |
void | is_periodic (int is_periodic_ij[2]) const |
Return whether box is periodic in i and j. | |
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 | |
StructuredElementSeq (StructuredElementSeq &split_from, EntityHandle here) |
Definition at line 36 of file StructuredElementSeq.hpp.
moab::StructuredElementSeq::StructuredElementSeq | ( | EntityHandle | start_handle, |
const int | imin, | ||
const int | jmin, | ||
const int | kmin, | ||
const int | imax, | ||
const int | jmax, | ||
const int | kmax, | ||
int * | is_periodic = NULL |
||
) |
constructor
Definition at line 27 of file StructuredElementSeq.cpp.
Referenced by split().
: ElementSequence( shandle, ScdElementData::calc_num_entities( shandle, imax - imin, jmax - jmin, kmax - kmin, is_per ), CN::VerticesPerEntity( TYPE_FROM_HANDLE( shandle ) ), new ScdElementData( shandle, imin, jmin, kmin, imax, jmax, kmax, is_per ) ) { }
moab::StructuredElementSeq::~StructuredElementSeq | ( | ) | [virtual] |
Definition at line 42 of file StructuredElementSeq.cpp.
{}
moab::StructuredElementSeq::StructuredElementSeq | ( | StructuredElementSeq & | split_from, |
EntityHandle | here | ||
) | [inline, protected] |
Definition at line 238 of file StructuredElementSeq.hpp.
: ElementSequence( split_from, here ) {}
bool moab::StructuredElementSeq::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 156 of file StructuredElementSeq.hpp.
References moab::ScdElementData::boundary_complete(), and sdata().
Referenced by moab::ScdBox::boundary_complete().
{ return sdata()->boundary_complete(); }
bool moab::StructuredElementSeq::contains | ( | const int | i, |
const int | j, | ||
const int | k | ||
) | const [inline] |
test whether this sequence contains these parameters
Definition at line 162 of file StructuredElementSeq.hpp.
References moab::ScdElementData::contains(), and sdata().
bool moab::StructuredElementSeq::contains | ( | const HomCoord & | coords | ) | const [inline] |
Definition at line 166 of file StructuredElementSeq.hpp.
References moab::ScdElementData::contains(), and sdata().
SequenceData * moab::StructuredElementSeq::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 94 of file StructuredElementSeq.cpp.
{
return 0;
}
ErrorCode moab::StructuredElementSeq::get_connectivity | ( | EntityHandle | handle, |
std::vector< EntityHandle > & | connect, | ||
bool | topological = false |
||
) | const [virtual] |
Implements moab::ElementSequence.
Definition at line 44 of file StructuredElementSeq.cpp.
References ErrorCode, 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::StructuredElementSeq::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 54 of file StructuredElementSeq.cpp.
References ErrorCode, get_connectivity(), and MB_STRUCTURED_MESH.
{ if( !storage ) { connect = 0; connect_length = 0; return MB_STRUCTURED_MESH; } storage->clear(); ErrorCode rval = get_connectivity( handle, *storage, topo ); connect = &( *storage )[0]; connect_length = storage->size(); return rval; }
EntityHandle * moab::StructuredElementSeq::get_connectivity_array | ( | ) | [virtual] |
Implements moab::ElementSequence.
Definition at line 79 of file StructuredElementSeq.cpp.
{
return 0;
}
void moab::StructuredElementSeq::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 99 of file StructuredElementSeq.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::StructuredElementSeq::get_element | ( | const int | i, |
const int | j, | ||
const int | k | ||
) | const [inline] |
get handle of element at i, j, k
Definition at line 73 of file StructuredElementSeq.hpp.
References moab::ScdElementData::get_element(), and sdata().
{ return sdata()->get_element( i, j, k ); }
EntityHandle moab::StructuredElementSeq::get_element | ( | const HomCoord & | coords | ) | const [inline] |
get handle of element at homogeneous coords
Definition at line 79 of file StructuredElementSeq.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::StructuredElementSeq::get_params | ( | const EntityHandle | ehandle, |
int & | i, | ||
int & | j, | ||
int & | k | ||
) | const [inline] |
given a handle, get the corresponding parameters
Definition at line 123 of file StructuredElementSeq.hpp.
References moab::ScdElementData::get_params(), and sdata().
Referenced by get_connectivity(), and moab::ScdBox::get_params().
{ return sdata()->get_params( ehandle, i, j, k ); }
ErrorCode moab::StructuredElementSeq::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 172 of file StructuredElementSeq.hpp.
References moab::ScdElementData::get_params_connectivity(), and sdata().
Referenced by get_connectivity().
{ return sdata()->get_params_connectivity( i, j, k, connectivity ); }
EntityHandle moab::StructuredElementSeq::get_vertex | ( | const int | i, |
const int | j, | ||
const int | k | ||
) | const [inline] |
get handle of vertex at i, j, k
Definition at line 61 of file StructuredElementSeq.hpp.
Referenced by moab::ScdBox::get_vertex_from_seq().
{ return get_vertex( HomCoord( i, j, k ) ); }
EntityHandle moab::StructuredElementSeq::get_vertex | ( | const HomCoord & | coords | ) | const [inline] |
get handle of vertex at homogeneous coords
Definition at line 67 of file StructuredElementSeq.hpp.
References moab::ScdElementData::get_vertex(), and sdata().
{ return sdata()->get_vertex( coords ); }
int moab::StructuredElementSeq::i_max | ( | ) | const [inline] |
Definition at line 141 of file StructuredElementSeq.hpp.
References moab::HomCoord::i(), and max_params().
{ return max_params().i(); }
int moab::StructuredElementSeq::i_min | ( | ) | const [inline] |
convenience functions for parameter extents
Definition at line 129 of file StructuredElementSeq.hpp.
References moab::HomCoord::i(), and min_params().
{ return min_params().i(); }
void moab::StructuredElementSeq::is_periodic | ( | int | is_periodic_ij[2] | ) | const [inline] |
Return whether box is periodic in i and j.
Return whether box is periodic in i and j
is_periodic_ij | Non-zero if periodic in i [0] or j [1] |
Definition at line 202 of file StructuredElementSeq.hpp.
References moab::ScdElementData::is_periodic(), and sdata().
Referenced by moab::ScdBox::elem_seq().
{ sdata()->is_periodic( is_periodic_ij ); };
int moab::StructuredElementSeq::is_periodic_i | ( | ) | const [inline] |
Return whether box is periodic in i.
Return whether box is periodic in i
Definition at line 184 of file StructuredElementSeq.hpp.
References moab::ScdElementData::is_periodic_i(), and sdata().
{ return sdata()->is_periodic_i(); };
int moab::StructuredElementSeq::is_periodic_j | ( | ) | const [inline] |
Return whether box is periodic in j.
Return whether box is periodic in j
Definition at line 193 of file StructuredElementSeq.hpp.
References moab::ScdElementData::is_periodic_j(), and sdata().
{ return sdata()->is_periodic_j(); };
int moab::StructuredElementSeq::j_max | ( | ) | const [inline] |
Definition at line 145 of file StructuredElementSeq.hpp.
References moab::HomCoord::j(), and max_params().
{ return max_params().j(); }
int moab::StructuredElementSeq::j_min | ( | ) | const [inline] |
Definition at line 133 of file StructuredElementSeq.hpp.
References moab::HomCoord::j(), and min_params().
{ return min_params().j(); }
int moab::StructuredElementSeq::k_max | ( | ) | const [inline] |
Definition at line 149 of file StructuredElementSeq.hpp.
References moab::HomCoord::k(), and max_params().
{ return max_params().k(); }
int moab::StructuredElementSeq::k_min | ( | ) | const [inline] |
Definition at line 137 of file StructuredElementSeq.hpp.
References moab::HomCoord::k(), and min_params().
{ return min_params().k(); }
const HomCoord& moab::StructuredElementSeq::max_params | ( | ) | const [inline] |
get max params for this element
Definition at line 101 of file StructuredElementSeq.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::StructuredElementSeq::max_params | ( | HomCoord & | coords | ) | const [inline] |
Definition at line 105 of file StructuredElementSeq.hpp.
References max_params().
{ coords = max_params(); }
void moab::StructuredElementSeq::max_params | ( | int & | i, |
int & | j, | ||
int & | k | ||
) | const [inline] |
Definition at line 109 of file StructuredElementSeq.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::StructuredElementSeq::min_params | ( | ) | const [inline] |
get min params for this element
Definition at line 85 of file StructuredElementSeq.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::StructuredElementSeq::min_params | ( | HomCoord & | coords | ) | const [inline] |
Definition at line 89 of file StructuredElementSeq.hpp.
References min_params().
{ coords = min_params(); }
void moab::StructuredElementSeq::min_params | ( | int & | i, |
int & | j, | ||
int & | k | ||
) | const [inline] |
Definition at line 93 of file StructuredElementSeq.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::StructuredElementSeq::param_extents | ( | int & | di, |
int & | dj, | ||
int & | dk | ||
) | const [inline] |
get the number of vertices in each direction, inclusive
Definition at line 117 of file StructuredElementSeq.hpp.
References moab::ScdElementData::param_extents(), and sdata().
{ sdata()->param_extents( di, dj, dk ); }
ScdElementData* moab::StructuredElementSeq::sdata | ( | ) | [inline] |
Definition at line 51 of file StructuredElementSeq.hpp.
References moab::EntitySequence::data().
Referenced by moab::ScdBox::add_vbox(), boundary_complete(), contains(), get_const_memory_use(), get_element(), get_params(), get_params_connectivity(), get_vertex(), is_periodic(), is_periodic_i(), is_periodic_j(), max_params(), min_params(), param_extents(), moab::ScdBox::ScdBox(), and testA().
{ return reinterpret_cast< ScdElementData* >( data() ); }
ScdElementData const* moab::StructuredElementSeq::sdata | ( | ) | const [inline] |
Definition at line 55 of file StructuredElementSeq.hpp.
References moab::EntitySequence::data().
{ return reinterpret_cast< const ScdElementData* >( data() ); }
ErrorCode moab::StructuredElementSeq::set_connectivity | ( | EntityHandle | handle, |
EntityHandle const * | connect, | ||
int | connect_length | ||
) | [virtual] |
Implements moab::ElementSequence.
Definition at line 74 of file StructuredElementSeq.cpp.
References MB_STRUCTURED_MESH.
{ return MB_STRUCTURED_MESH; }
EntitySequence * moab::StructuredElementSeq::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 89 of file StructuredElementSeq.cpp.
References StructuredElementSeq().
{ return new StructuredElementSeq( *this, here ); }
int moab::StructuredElementSeq::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 84 of file StructuredElementSeq.cpp.
{ return -1; } // never reuse freed handles for structured elements