Enables working with files in the XML Format. More...
Public Member Functions | |
| IOField () | |
| Default constructor. | |
| IOField (const string &file, int access, bool compact=true) | |
| Constructor using file name. | |
| IOField (const string &mesh_file, const string &file, Mesh &ms, int access, bool compact=true) | |
| Constructor using file name, mesh file and mesh. | |
| IOField (const string &file, Mesh &ms, int access, bool compact=true) | |
| Constructor using file name and mesh. | |
| ~IOField () | |
| Destructor. | |
| void | setMeshFile (const string &file) |
| Set mesh file. | |
| void | open () |
| Open file. | |
| void | open (const string &file, int access) |
| Open file. | |
| void | close () |
| Close file. | |
| void | put (Mesh &ms) |
| Store mesh in file. | |
| void | put (const Vect< double > &v) |
| Store Vect instance v in file with time value t. | |
| double | get (Vect< double > &v) |
| Get Vect v instance from file. | |
| int | get (Vect< double > &v, double t) |
| Get Vect v instance from file corresponding to a specific time value. | |
| void | saveGMSH (string output_file, string mesh_file) |
| Save field vectors in a file using GMSH format. | |
Detailed Description
Enables working with files in the XML Format.
This class has methods to store vectors in files and read from files.
Constructor & Destructor Documentation
| IOField | ( | const string & | file, |
| int | access, | ||
| bool | compact = true |
||
| ) |
Constructor using file name.
- Parameters:
-
[in] file File name. [in] access Access code. This number is to be chosen among two enumerated values: - IN to read the file
- OUT to write on it
[in] compact Flag to choose a compact storage or not [default: true]
| IOField | ( | const string & | mesh_file, |
| const string & | file, | ||
| Mesh & | ms, | ||
| int | access, | ||
| bool | compact = true |
||
| ) |
Constructor using file name, mesh file and mesh.
- Parameters:
-
[in] mesh_file File containing mesh [in] file File that contains field stored or to store [in] ms Mesh instance [in] access Access code. This number is to be chosen among two enumerated values: - IN to read the file
- OUT to write on it
[in] compact Flag to choose a compact storage or not [default: true]
Constructor using file name and mesh.
- Parameters:
-
[in] file File that contains field stored or to store [in] ms Mesh instance [in] access Access code. This number is to be chosen among two enumerated values: - IN to read the file
- OUT to write on it
[in] compact Flag to choose a compact storage or not [default: true]
Member Function Documentation
| void setMeshFile | ( | const string & | file | ) |
Set mesh file.
- Parameters:
-
[in] file Mesh file
| void open | ( | ) |
Open file.
Case where file name has been previously given (in the constructor).
| void open | ( | const string & | file, |
| int | access | ||
| ) |
Open file.
- Parameters:
-
[in] file File name. [in] access Access code. This number is to be chosen among two enumerated values: - IN to read file
- OUT to write on it
Get Vect v instance from file.
First time step is read from the XML file.
Get Vect v instance from file corresponding to a specific time value.
First time step is read from the XML file.
- Parameters:
-
[in,out] v Vector instance [in] t Time value
| void saveGMSH | ( | string | output_file, |
| string | mesh_file | ||
| ) |
Save field vectors in a file using GMSH format.
This member function enables avoiding the use of cfield. It must be used once all field vectors have been stored in output file. It closes this file and copies its contents to a GMSH file.
- Parameters:
-
[in] output_file Output file name where to store using GMSH format [in] mesh_file File containing mesh data
- OFELI
- IOField