Interface to DGF I/O function. More...
Public Member Functions | |
DGFObj (const std::string &) | |
DGFObj (void) | |
template<typename T , typename ... T2> | |
void | appendSData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
template<typename T , typename ... T2> | |
void | appendSData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
template<typename T , typename ... T2> | |
void | appendVData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
template<typename T , typename ... T2> | |
void | appendVData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
void | check (void) |
void | clear (void) |
void | close (const std::string &a="inout") |
void | display (std::ostream &) |
void | load (int &, int &, std::vector< std::array< double, 3 > > &, std::vector< std::vector< int > > &) |
void | load (int &, int &, std::vector< std::array< double, 3 > > &, std::vector< std::vector< int > > &, std::vector< int > &, const std::string &pidName="PID") |
void | load (int &, int &, std::vector< std::vector< double > > &, std::vector< std::vector< int > > &) |
template<typename T , typename ... T2> | |
void | loadSData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
template<typename T , typename ... T2> | |
void | loadSData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
template<typename T , typename ... T2> | |
void | loadVData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
template<typename T , typename ... T2> | |
void | loadVData (const std::string &data_name, int &n, std::vector< T > &data, T2 &... others) |
void | open (const std::string &) |
void | save (int &, int &, std::vector< std::array< double, 3 > > &, std::vector< std::vector< int > > &) |
void | save (int &, int &, std::vector< std::vector< double > > &, std::vector< std::vector< int > > &) |
void | scan (void) |
Public Attributes | |
DGFData | data |
std::string | dgf_name |
unsigned int | err |
Interface to DGF I/O function.
This class has been designed to allow an easy interface between end-user and DGF I/O functions.
bitpit::DGFObj::DGFObj | ( | void | ) |
bitpit::DGFObj::DGFObj | ( | const std::string & | filename | ) |
void bitpit::DGFObj::appendSData | ( | const std::string & | data_name, |
int & | n, | ||
std::vector< T > & | data, | ||
T2 &... | others ) |
void bitpit::DGFObj::appendVData | ( | const std::string & | data_name, |
int & | n, | ||
std::vector< T > & | data, | ||
T2 &... | others ) |
void bitpit::DGFObj::check | ( | void | ) |
void bitpit::DGFObj::clear | ( | void | ) |
void bitpit::DGFObj::close | ( | const std::string & | mode = "inout" | ) |
void bitpit::DGFObj::display | ( | std::ostream & | out | ) |
void bitpit::DGFObj::load | ( | int & | nV, |
int & | nS, | ||
std::vector< std::array< double, 3 > > & | V, | ||
std::vector< std::vector< int > > & | S ) |
Load mesh data from DGF file. Overloading of member function DGFObj::load() for container vector<array<double,3>>
[in,out] | nV | on input stores the number of vertices already acquired from the dgf file. On output stores the input value incremented by the number of mesh vertices loaded from the dgf file. |
[in,out] | nS | on input stores the number of cells already acquired from the dgf file. On output stores the input value incremented by the number of mesh cells loaded from the dgf file. |
[in,out] | V | vertex coordinate list. On output stores the coordinates of the vertices already acquired from the dgf file. New coordinates are appended at the end of V. |
[in,out] | S | cell->vertex connectivity data. On output stores the connectivity entries for cells acquired from the dgf file. New connectivity entries are appended at the and of S. |
void bitpit::DGFObj::load | ( | int & | nV, |
int & | nS, | ||
std::vector< std::array< double, 3 > > & | V, | ||
std::vector< std::vector< int > > & | S, | ||
std::vector< int > & | PID, | ||
const std::string & | pidName = "PID" ) |
Load mesh data from DGF file. Overloading of member function DGFObj::load() for container vector<array<double,3>>
[in,out] | nV | on input stores the number of vertices already acquired from the dgf file. On output stores the input value incremented by the number of mesh vertices loaded from the dgf file. |
[in,out] | nS | on input stores the number of cells already acquired from the dgf file. On output stores the input value incremented by the number of mesh cells loaded from the dgf file. |
[in,out] | V | vertex coordinate list. On output stores the coordinates of the vertices already acquired from the dgf file. New coordinates are appended at the end of V. |
[in,out] | S | cell->vertex connectivity data. On output stores the connectivity entries for cells acquired from the dgf file. New connectivity entries are appended at the and of S. |
[out] | PID | part identifier list for each simplex. |
[in] | pidName | name of the SIMPLEXDATA to be used as PID. |
void bitpit::DGFObj::load | ( | int & | nV, |
int & | nS, | ||
std::vector< std::vector< double > > & | V, | ||
std::vector< std::vector< int > > & | S ) |
Load mesh data from DGF file.
[in,out] | nV | on input stores the number of vertices already acquired from the dgf file. On output stores the input value incremented by the number of mesh vertices loaded from the dgf file. |
[in,out] | nS | on input stores the number of cells already acquired from the dgf file. On output stores the input value incremented by the number of mesh cells loaded from the dgf file. |
[in,out] | V | vertex coordinate list. On output stores the coordinates of the vertices already acquired from the dgf file. New coordinates are appended at the end of V. |
[in,out] | S | cell->vertex connectivity data. On output stores the connectivity entries for cells acquired from the dgf file. New connectivity entries are appended at the and of S. |
void bitpit::DGFObj::loadSData | ( | const std::string & | data_name, |
int & | n, | ||
std::vector< T > & | data, | ||
T2 &... | others ) |
Load cell data from dgf file.
[in] | data_name | name of cell data block to be loaded. If no name is specified (i.e. data_name = "") the first cell data block found in the dgf file is returned. If no cell datablock is found with the specified name no data is loaded. |
[in,out] | n | number data entries loaded from the data set |
[in,out] | data | on output stores the data loaded from the data block |
[in] | others | other data to be loaded. |
void bitpit::DGFObj::loadVData | ( | const std::string & | data_name, |
int & | n, | ||
std::vector< T > & | data, | ||
T2 &... | others ) |
Load vertex data from dgf file.
[in] | data_name | name of vertex data block to be loaded. If no name is specified (i.e. data_name = "") the first vertex data block found in the dgf file is returned. If no vertex datablock is found with the specified name no data is loaded. |
[in,out] | n | number data entries loaded from the data set |
[in,out] | data | on output stores the data loaded from the data block |
[in] | others | other data to be loaded. |
void bitpit::DGFObj::open | ( | const std::string & | mode | ) |
void bitpit::DGFObj::save | ( | int & | nV, |
int & | nS, | ||
std::vector< std::array< double, 3 > > & | V, | ||
std::vector< std::vector< int > > & | S ) |
Save mesh data from DGF file. Overloading of member function DGFObj::save() for container vector<array<double,3>>
[in] | nV | number of vertices in the mesh |
[in] | nS | number of cells in the mesh |
[in] | V | vertex coordinate list. |
[in] | S | cell->vertex connectivity data. |
void bitpit::DGFObj::save | ( | int & | nV, |
int & | nS, | ||
std::vector< std::vector< double > > & | V, | ||
std::vector< std::vector< int > > & | S ) |
void bitpit::DGFObj::scan | ( | void | ) |