#include <DriverMED_W_Field.h>
Public Member Functions | |
void | AddODOnVertices (bool toAdd) |
void | AddValue (double val) |
Adds a float field value. More... | |
void | AddValue (int val) |
Adds an integer field value. More... | |
DriverMED_W_Field () | |
Constructor. More... | |
SMDS_ElemIteratorPtr | GetOrderedElems () |
virtual Status | Perform () |
bool | Set (SMESHDS_Mesh *mesh, const std::string &fieldName, SMDSAbs_ElementType type, const int nbComps, const bool isIntData) |
Sets basic data. More... | |
void | SetCompName (const int iComp, const char *name) |
Set a name of a component countered from zero. More... | |
void | SetDtIt (const int dt, const int it) |
Sets numdt and numit field features. Call this fun before AddValue()! More... | |
Public Member Functions inherited from Driver_SMESHDS_Mesh | |
Driver_SMESHDS_Mesh () | |
void | SetMesh (SMESHDS_Mesh *theMesh) |
Public Member Functions inherited from Driver_Mesh | |
Driver_Mesh () | |
virtual SMESH_ComputeErrorPtr | GetError () |
Return a structure containing description of errors. More... | |
virtual std::string | GetMeshName () const |
virtual Status | Perform ()=0 |
virtual void | SetFile (const std::string &theFileName) |
void | SetMeshId (int theMeshId) |
virtual void | SetMeshName (const std::string &theMeshName) |
virtual void | SetOption (const std::string &optionName, const std::string &optionValue) |
virtual | ~Driver_Mesh () |
Additional Inherited Members | |
Public Types inherited from Driver_Mesh | |
enum | Status { DRS_OK , DRS_EMPTY , DRS_WARN_RENUMBER , DRS_WARN_SKIP_ELEM , DRS_WARN_DESCENDING , DRS_FAIL } |
Protected Member Functions inherited from Driver_Mesh | |
Status | addMessage (const std::string &msg, const bool isFatal=false) |
Stores an error message. More... | |
Protected Attributes inherited from Driver_SMESHDS_Mesh | |
SMESHDS_Mesh * | myMesh |
Protected Attributes inherited from Driver_Mesh | |
std::vector< std::string > | myErrorMessages |
std::string | myFile |
int | myMeshId |
std::string | myMeshName |
Status | myStatus |
DriverMED_W_Field::DriverMED_W_Field | ( | ) |
Constructor.
void DriverMED_W_Field::AddODOnVertices | ( | bool | toAdd | ) |
void DriverMED_W_Field::AddValue | ( | double | val | ) |
Adds a float field value.
void DriverMED_W_Field::AddValue | ( | int | val | ) |
Adds an integer field value.
SMDS_ElemIteratorPtr DriverMED_W_Field::GetOrderedElems | ( | ) |
Returns elements in the order they are written in MED file
References SMDS_Mesh::elementsIterator(), and Driver_SMESHDS_Mesh::myMesh.
|
virtual |
Writes a field to the file
Implements Driver_Mesh.
References Driver_Mesh::addMessage(), MED::CrWrapper(), Driver_Mesh::DRS_OK, MED::eFLOAT64, MED::eINT, MED::eMAILLE, MED::eNOEUD, MED::eV2_2, DriverMED::GetMedGeoType(), Driver_Mesh::myFile, Driver_SMESHDS_Mesh::myMesh, Driver_Mesh::myMeshId, and Driver_Mesh::myMeshName.
bool DriverMED_W_Field::Set | ( | SMESHDS_Mesh * | mesh, |
const std::string & | fieldName, | ||
SMDSAbs_ElementType | type, | ||
const int | nbComps, | ||
const bool | isIntData | ||
) |
Sets basic data.
[in] | mesh | - supporting mesh |
[in] | fieldName | - name of a field |
[in] | type | - type of supporting elements |
[in] | nbComps | - number of components |
[in] | isIntData | - type of data: double or integer |
References DriverMED_W_SMESHDS_Mesh::getNodesOfMissing0DOnVert(), Driver_SMESHDS_Mesh::myMesh, Driver_SMESHDS_Mesh::SetMesh(), and SMDS_MeshCell::toSmdsType().
void DriverMED_W_Field::SetCompName | ( | const int | iComp, |
const char * | name | ||
) |
Set a name of a component countered from zero.
Sets numdt and numit field features. Call this fun before AddValue()!