MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <VertexSequence.hpp>
Public Member Functions | |
VertexSequence (EntityHandle start, EntityID count, SequenceData *dat) | |
VertexSequence (EntityHandle start, EntityID count, EntityID data_size) | |
virtual | ~VertexSequence () |
ErrorCode | get_coordinates (EntityHandle handle, double &x, double &y, double &z) const |
ErrorCode | get_coordinates (EntityHandle handle, double coords[3]) const |
ErrorCode | get_coordinates_ref (EntityHandle handle, const double *&x, const double *&y, const double *&z) const |
ErrorCode | set_coordinates (EntityHandle entity, double x, double y, double z) |
ErrorCode | set_coordinates (EntityHandle entity, const double xyz[3]) |
ErrorCode | get_coordinate_arrays (double *&x, double *&y, double *&z) |
ErrorCode | get_coordinate_arrays (const double *&x, const double *&y, const double *&z) const |
EntitySequence * | split (EntityHandle here) |
Split this sequence into two consecutive sequences. | |
SequenceData * | create_data_subset (EntityHandle start, EntityHandle end) const |
Create a new SequenceData that is a copy of a subset of the one referenced by this sequence. | |
ErrorCode | push_front (EntityID count) |
ErrorCode | push_back (EntityID count) |
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. | |
Private Types | |
enum | Coord { X = 0, Y = 1, Z = 2 } |
Private Member Functions | |
double * | array (Coord coord) |
const double * | array (Coord coord) const |
double * | x_array () |
double * | y_array () |
double * | z_array () |
const double * | x_array () const |
const double * | y_array () const |
const double * | z_array () const |
VertexSequence (VertexSequence &split_from, EntityHandle here) |
Definition at line 10 of file VertexSequence.hpp.
enum moab::VertexSequence::Coord [private] |
moab::VertexSequence::VertexSequence | ( | EntityHandle | start, |
EntityID | count, | ||
SequenceData * | dat | ||
) | [inline] |
Definition at line 13 of file VertexSequence.hpp.
Referenced by split().
: EntitySequence( start, count, dat ) {}
moab::VertexSequence::VertexSequence | ( | EntityHandle | start, |
EntityID | count, | ||
EntityID | data_size | ||
) | [inline] |
Definition at line 15 of file VertexSequence.hpp.
References moab::SequenceData::create_sequence_data(), moab::EntitySequence::data(), X, Y, and Z.
: EntitySequence( start, count, new SequenceData( 3, start, start + data_size - 1 ) ) { data()->create_sequence_data( X, sizeof( double ) ); data()->create_sequence_data( Y, sizeof( double ) ); data()->create_sequence_data( Z, sizeof( double ) ); }
moab::VertexSequence::~VertexSequence | ( | ) | [virtual] |
Definition at line 6 of file VertexSequence.cpp.
{}
moab::VertexSequence::VertexSequence | ( | VertexSequence & | split_from, |
EntityHandle | here | ||
) | [inline, private] |
Definition at line 95 of file VertexSequence.hpp.
: EntitySequence( split_from, here ) {}
double* moab::VertexSequence::array | ( | Coord | coord | ) | [inline, private] |
Definition at line 59 of file VertexSequence.hpp.
References moab::EntitySequence::data(), and moab::SequenceData::get_sequence_data().
Referenced by x_array(), y_array(), and z_array().
{ return reinterpret_cast< double* >( data()->get_sequence_data( coord ) ); }
const double* moab::VertexSequence::array | ( | Coord | coord | ) | const [inline, private] |
Definition at line 64 of file VertexSequence.hpp.
References moab::EntitySequence::data(), and moab::SequenceData::get_sequence_data().
{ return reinterpret_cast< const double* >( data()->get_sequence_data( coord ) ); }
SequenceData * moab::VertexSequence::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 13 of file VertexSequence.cpp.
References moab::EntitySequence::data(), sizes, and moab::SequenceData::subset().
void moab::VertexSequence::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 29 of file VertexSequence.cpp.
{ per_ent = 3 * sizeof( double ); seq = sizeof( *this ); }
ErrorCode moab::VertexSequence::get_coordinate_arrays | ( | double *& | x, |
double *& | y, | ||
double *& | z | ||
) | [inline] |
Definition at line 146 of file VertexSequence.hpp.
References moab::EntitySequence::data(), MB_SUCCESS, moab::SequenceData::start_handle(), moab::EntitySequence::start_handle(), x_array(), y_array(), and z_array().
Referenced by moab::Core::get_coords(), and moab::WriteUtil::get_node_coords().
{ EntityID offset = start_handle() - data()->start_handle(); x = x_array() + offset; y = y_array() + offset; z = z_array() + offset; return MB_SUCCESS; }
ErrorCode moab::VertexSequence::get_coordinate_arrays | ( | const double *& | x, |
const double *& | y, | ||
const double *& | z | ||
) | const [inline] |
Definition at line 155 of file VertexSequence.hpp.
References get_coordinates_ref(), and moab::EntitySequence::start_handle().
{ return get_coordinates_ref( start_handle(), x, y, z ); }
ErrorCode moab::VertexSequence::get_coordinates | ( | EntityHandle | handle, |
double & | x, | ||
double & | y, | ||
double & | z | ||
) | const [inline] |
Definition at line 98 of file VertexSequence.hpp.
References moab::EntitySequence::data(), MB_SUCCESS, moab::SequenceData::start_handle(), x_array(), y_array(), and z_array().
Referenced by moab::Core::get_coords(), and moab::Core::print_database().
{ EntityID offset = handle - data()->start_handle(); x = x_array()[offset]; y = y_array()[offset]; z = z_array()[offset]; return MB_SUCCESS; }
ErrorCode moab::VertexSequence::get_coordinates | ( | EntityHandle | handle, |
double | coords[3] | ||
) | const [inline] |
Definition at line 107 of file VertexSequence.hpp.
References moab::EntitySequence::data(), MB_SUCCESS, moab::SequenceData::start_handle(), X, x_array(), Y, y_array(), Z, and z_array().
{ EntityID offset = handle - data()->start_handle(); coords[X] = x_array()[offset]; coords[Y] = y_array()[offset]; coords[Z] = z_array()[offset]; return MB_SUCCESS; }
ErrorCode moab::VertexSequence::get_coordinates_ref | ( | EntityHandle | handle, |
const double *& | x, | ||
const double *& | y, | ||
const double *& | z | ||
) | const [inline] |
Definition at line 116 of file VertexSequence.hpp.
References moab::EntitySequence::data(), MB_SUCCESS, moab::SequenceData::start_handle(), x_array(), y_array(), and z_array().
Referenced by get_coordinate_arrays().
{ EntityID offset = handle - data()->start_handle(); x = x_array() + offset; y = y_array() + offset; z = z_array() + offset; return MB_SUCCESS; }
Definition at line 19 of file VertexSequence.cpp.
References moab::EntitySequence::append_entities().
Referenced by moab::SequenceManager::create_vertex().
{ return EntitySequence::append_entities( count ); }
Definition at line 24 of file VertexSequence.cpp.
References moab::EntitySequence::prepend_entities().
Referenced by moab::SequenceManager::create_vertex().
{ return EntitySequence::prepend_entities( count ); }
ErrorCode moab::VertexSequence::set_coordinates | ( | EntityHandle | entity, |
double | x, | ||
double | y, | ||
double | z | ||
) | [inline] |
Definition at line 128 of file VertexSequence.hpp.
References moab::EntitySequence::data(), MB_SUCCESS, moab::SequenceData::start_handle(), x_array(), y_array(), and z_array().
Referenced by moab::SequenceManager::create_vertex().
{ EntityID offset = entity - data()->start_handle(); x_array()[offset] = x; y_array()[offset] = y; z_array()[offset] = z; return MB_SUCCESS; }
ErrorCode moab::VertexSequence::set_coordinates | ( | EntityHandle | entity, |
const double | xyz[3] | ||
) | [inline] |
EntitySequence * moab::VertexSequence::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 8 of file VertexSequence.cpp.
References VertexSequence().
{ return new VertexSequence( *this, here ); }
double* moab::VertexSequence::x_array | ( | ) | [inline, private] |
Definition at line 69 of file VertexSequence.hpp.
Referenced by get_coordinate_arrays(), get_coordinates(), get_coordinates_ref(), and set_coordinates().
const double* moab::VertexSequence::x_array | ( | ) | const [inline, private] |
double* moab::VertexSequence::y_array | ( | ) | [inline, private] |
Definition at line 73 of file VertexSequence.hpp.
Referenced by get_coordinate_arrays(), get_coordinates(), get_coordinates_ref(), and set_coordinates().
const double* moab::VertexSequence::y_array | ( | ) | const [inline, private] |
double* moab::VertexSequence::z_array | ( | ) | [inline, private] |
Definition at line 77 of file VertexSequence.hpp.
Referenced by get_coordinate_arrays(), get_coordinates(), get_coordinates_ref(), and set_coordinates().
const double* moab::VertexSequence::z_array | ( | ) | const [inline, private] |