#include <mesh_data.h>
Public Member Functions | |
MeshDataUnvHeader () | |
~MeshDataUnvHeader () | |
void | which_dataset (const unsigned int ds_label) |
void | operator= (const MeshDataUnvHeader &omduh) |
bool | operator== (const MeshDataUnvHeader &omduh) const |
Public Attributes | |
unsigned int | dataset_label |
std::string | dataset_name |
unsigned int | dataset_location |
std::vector< std::string > | id_lines_1_to_5 |
unsigned int | model_type |
unsigned int | analysis_type |
unsigned int | data_characteristic |
unsigned int | result_type |
unsigned int | data_type |
unsigned int | nvaldc |
std::vector< int > | record_10 |
std::vector< int > | record_11 |
std::vector< Real > | record_12 |
std::vector< Real > | record_13 |
Protected Member Functions | |
bool | read (std::istream &in_file) |
void | write (std::ostream &out_file) |
Static Private Member Functions | |
static bool | need_D_to_e (std::string &number) |
Private Attributes | |
unsigned int | _desired_dataset_label |
Friends | |
class | MeshData |
Class MeshDataUnvHeader
handles the data specified at the beginning of a dataset 2414 in a universal file. This header is structured in records 1 to 13. A typical header is described here. The text after the # are comments and are not part of such a dataset. The text in brackets after the # are the corresponding class members names.
* * -1 # beginning of dataset * 2414 # type of dataset: data at mesh entities * 1 # R. 1: unique number of dataset (dataset_label) * STRUCTURAL MODE 1 # R. 2: text describing content (dataset_name) * 1 # R. 3: data belongs to: nodes, elements,... * # (dataset_location) * Default Model # R. 4: user-specified text (id_lines_1_to_5[0]) * I-DEAS Master Series # R. 5: user-specified text (id_lines_1_to_5[1]) * 18-AUG-2003 20:00:12 HPUX11_64 MAR2003 # R. 6: user-specified text (id_lines_1_to_5[2]) * MODE 1 FREQUENCY 501.25 Hz # R. 7: user-specified text (id_lines_1_to_5[3]) * STRUCTURAL MODE 1 # R. 8: user-specified text (id_lines_1_to_5[4]) * 0 2 3 8 2 6 # R. 9: (model_type) (analysis_type) * # (data_characteristic) (result_type) * # (data_type) (nvaldc) * 0 0 0 0 0 1 0 0 # R. 10: analysis-specific data (record_10) * 0 0 # R. 11: analysis-specific data (record_11) * 0.00000E+00 0.50125E+03 0.99192E+07 0.10000E+01 0.00000E+00 0.00000E+00 # R. 12: analysis-specific data (record_12) * 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 # R. 13: analysis-specific data (record_13) *
For more details we refer to the general description of the I-DEAS universal file format.
An instance of this class may be attached to the MeshData
of some mesh. Then the read()
and write()
methods of MeshData
use this MeshDataUnvHeader
instead of some empty default. Also files that contain multiple datasets of type 2414
may be handled through the which_dataset()
method. Note that an instance of this class has to be attached to the MeshData
prior to using the read()
or write()
methods of the MeshData
.
Definition at line 673 of file mesh_data.h.
libMesh::MeshDataUnvHeader::MeshDataUnvHeader | ( | ) |
Default Constructor. Initializes the respective data.
Definition at line 591 of file mesh_data_unv_support.C.
References id_lines_1_to_5, record_10, record_11, record_12, and record_13.
libMesh::MeshDataUnvHeader::~MeshDataUnvHeader | ( | ) |
|
staticprivate |
true
when the string number
has a 'D' that needs to be replaced by 'e', false
otherwise. Also actually replaces the 'D' by an 'e'. Definition at line 788 of file mesh_data_unv_support.C.
Referenced by read(), and libMesh::MeshData::read_unv_implementation().
void libMesh::MeshDataUnvHeader::operator= | ( | const MeshDataUnvHeader & | omduh | ) |
Assignment operator. Simply assigns all values from omduh
to this
.
Definition at line 814 of file mesh_data_unv_support.C.
References _desired_dataset_label, analysis_type, data_characteristic, data_type, dataset_label, dataset_location, dataset_name, libMesh::err, id_lines_1_to_5, model_type, nvaldc, record_10, record_11, record_12, record_13, and result_type.
bool libMesh::MeshDataUnvHeader::operator== | ( | const MeshDataUnvHeader & | omduh | ) | const |
true
when this
and omduh
are equal, false
otherwise. Definition at line 879 of file mesh_data_unv_support.C.
References _desired_dataset_label, analysis_type, data_characteristic, data_type, dataset_label, dataset_location, dataset_name, id_lines_1_to_5, model_type, nvaldc, record_10, record_11, record_12, record_13, and result_type.
|
protected |
true
when this dataset is the one that the user wants, false
otherwise. When no desired dataset is given, always returns true
. Aside from this return value, this method also reads the header information from the stream in_file
. Definition at line 630 of file mesh_data_unv_support.C.
References _desired_dataset_label, analysis_type, data_characteristic, data_type, dataset_label, dataset_location, dataset_name, id_lines_1_to_5, libMesh::invalid_uint, model_type, need_D_to_e(), nvaldc, record_10, record_11, record_12, record_13, and result_type.
Referenced by libMesh::MeshData::read_unv_implementation().
void libMesh::MeshDataUnvHeader::which_dataset | ( | const unsigned int | ds_label | ) |
Universal files may contain multiple data sets of type 2414
. These sets are identified through their labels (not to be confused with the dataset label 2414!
). The user may provide a label of the dataset that she wants. Then the file is scanned for this dataset, and datasets with a different label are skipped.
When this method is not called, then simply the first dataset in the file is used. Note that for this method to have any effect, this method has to be called prior to using the MeshData::read()
or MeshData::write()
methods.
Definition at line 807 of file mesh_data_unv_support.C.
References _desired_dataset_label.
|
protected |
Write the header information to the stream out_file
.
Definition at line 729 of file mesh_data_unv_support.C.
References analysis_type, data_characteristic, data_type, dataset_label, dataset_location, dataset_name, id_lines_1_to_5, model_type, nvaldc, record_10, record_11, record_12, record_13, and result_type.
Referenced by libMesh::MeshData::write_unv_implementation().
|
friend |
Make the MeshData
class a friend.
Definition at line 816 of file mesh_data.h.
|
private |
the desired dataset label. defaults to -1 if not given
Definition at line 803 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), and which_dataset().
unsigned int libMesh::MeshDataUnvHeader::analysis_type |
Definition at line 746 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), and write().
unsigned int libMesh::MeshDataUnvHeader::data_characteristic |
Definition at line 746 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), and write().
unsigned int libMesh::MeshDataUnvHeader::data_type |
Record 9, second part. See first part, then we have: the data type (currently supported: 2,4 for Real
, and 5,6 for Complex
. other possibilities: e.g. integer),
Definition at line 756 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), libMesh::MeshData::read_unv_implementation(), write(), and libMesh::MeshData::write_unv_implementation().
unsigned int libMesh::MeshDataUnvHeader::dataset_label |
Record 1. User specified analysis dataset label.
Definition at line 719 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), and write().
unsigned int libMesh::MeshDataUnvHeader::dataset_location |
Record 3. The dataset location (e.g. data at nodes, data on elements, etc.).
Definition at line 730 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), libMesh::MeshData::read_unv_implementation(), and write().
std::string libMesh::MeshDataUnvHeader::dataset_name |
Record 2. User specified analysis dataset name.
Definition at line 724 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), and write().
std::vector<std::string> libMesh::MeshDataUnvHeader::id_lines_1_to_5 |
Record 4 trough 8 are ID lines.
Definition at line 735 of file mesh_data.h.
Referenced by MeshDataUnvHeader(), operator=(), operator==(), read(), and write().
unsigned int libMesh::MeshDataUnvHeader::model_type |
Record 9, first part. This record contains data specifying the model type (e.g. unknown, structural, etc.), the analysis type (e.g. unknown, static, transient, normal mode, etc.), the data characteristics (such as scalar, 3 dof global translation vector, etc.), the result type (e.g. stress, strain, velocity, etc.).
Definition at line 746 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), and write().
unsigned int libMesh::MeshDataUnvHeader::nvaldc |
Record 9, third and last part. See first and second part, then we have: the number of data values for the mesh data.
Definition at line 762 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), libMesh::MeshData::read_unv_implementation(), write(), and libMesh::MeshData::write_unv_implementation().
std::vector<int> libMesh::MeshDataUnvHeader::record_10 |
Record 10 and 11 are analysis specific data of type integer.
Definition at line 768 of file mesh_data.h.
Referenced by MeshDataUnvHeader(), operator=(), operator==(), read(), and write().
std::vector<int> libMesh::MeshDataUnvHeader::record_11 |
Definition at line 768 of file mesh_data.h.
Referenced by MeshDataUnvHeader(), operator=(), operator==(), read(), and write().
std::vector<Real> libMesh::MeshDataUnvHeader::record_12 |
Record 12 and 13 are analysis specific data of type Real.
Definition at line 775 of file mesh_data.h.
Referenced by MeshDataUnvHeader(), operator=(), operator==(), read(), and write().
std::vector<Real> libMesh::MeshDataUnvHeader::record_13 |
Definition at line 775 of file mesh_data.h.
Referenced by MeshDataUnvHeader(), operator=(), operator==(), read(), and write().
unsigned int libMesh::MeshDataUnvHeader::result_type |
Definition at line 746 of file mesh_data.h.
Referenced by operator=(), operator==(), read(), and write().