Detailed Description
These methods describe how to read and write meshes. Generally speaking, meshes should be read via a constructor and should be written with the write() method.
Function Documentation
int GMESH::addDriver |
( |
driverTypes |
driverType, |
|
|
const std::string & |
fileName = "Default File Name.med" , |
|
|
const std::string & |
driverName = "Default Mesh Name" , |
|
|
MED_EN::med_mode_acces |
access = MED_EN::RDWR |
|
) |
| |
Add a MESH driver of type driverTypes (MED_DRIVER, ....) associated with file fileName. The meshname used in the file is driverName. addDriver returns an integer handler.
int GMESH::addDriver |
( |
GENDRIVER & |
driver | ) |
|
Add an existing MESH driver.
void GMESH::rmDriver |
( |
int |
index = 0 | ) |
|
Remove an existing MESH driver.
void GMESH::read |
( |
int |
index = 0 | ) |
|
|
virtual |
Read mesh from the file using given driver.
- Parameters
-
index | - index of driver to use for reading |
void GMESH::read |
( |
const GENDRIVER & |
driver | ) |
|
|
virtual |
Reads GMESH using the given driver.
void GMESH::read |
( |
driverTypes |
driverType, |
|
|
const std::string & |
filename, |
|
|
const std::string & |
meshname |
|
) |
| |
|
virtual |
Reads the GMESH.
- Parameters
-
driverType | - type of driver to use for reading |
filename | - file to read from |
meshname | - name of a mesh to read |
void GMESH::write |
( |
int |
index = 0 | ) |
const |
|
virtual |
Writes all the content of the MESH using driver referenced by the integer handle returned by a addDriver call.
Example :
//...
// Attaching the driver to file "output.med", meshname "Mesh"
int driver_handle = mesh.addDriver(MED_DRIVER, "output.med", "Mesh");
// Writing the content of mesh to the file
mesh.write(driver_handle);
void GMESH::write |
( |
const GENDRIVER & |
driver, |
|
|
MED_EN::med_mode_acces |
medMode = MED_EN::WRONLY |
|
) |
| const |
|
virtual |
Writes all the content of the GMESH using the given driver.
void GMESH::write |
( |
driverTypes |
driverType, |
|
|
const std::string & |
filename, |
|
|
const std::string & |
meshname = "" , |
|
|
MED_EN::med_mode_acces |
medMode = MED_EN::WRONLY |
|
) |
| const |
|
virtual |
Writes all the content of the GMESH.
- Parameters
-
driverType | - type of driver to use for writing |
filename | - file to write into |
meshname | - mesh name |
medMode | - file access mode |