Version: 8.3.0
DriverMED_W_Field Class Reference

#include <DriverMED_W_Field.h>

Inheritance diagram for DriverMED_W_Field:

Public Types

enum  Status {
  DRS_OK, DRS_EMPTY, DRS_WARN_RENUMBER, DRS_WARN_SKIP_ELEM,
  DRS_WARN_DESCENDING, DRS_FAIL
}
 

Public Member Functions

 DriverMED_W_Field ()
 Constructor. More...
 
void AddODOnVertices (bool toAdd)
 
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. More...
 
void AddValue (double val)
 Adds a float field value. More...
 
void AddValue (int val)
 Adds an integer field value. More...
 
SMDS_ElemIteratorPtr GetOrderedElems ()
 Returns elements in the order they are written in MED file. More...
 
virtual Status Perform ()
 Writes a field to the file. More...
 
void SetMesh (SMESHDS_Mesh *theMesh)
 
void SetMeshId (int theMeshId)
 
virtual void SetFile (const std::string &theFileName)
 
virtual void SetMeshName (const std::string &theMeshName)
 
virtual std::string GetMeshName () const
 
virtual void SetOption (const std::string &optionName, const std::string &optionValue)
 
virtual SMESH_ComputeErrorPtr GetError ()
 Return a structure containing description of errors. More...
 

Protected Member Functions

Status addMessage (const std::string &msg, const bool isFatal=false)
 Stores an error message. More...
 

Protected Attributes

SMESHDS_MeshmyMesh
 
std::string myFile
 
std::string myMeshName
 
int myMeshId
 
std::vector< std::string > myErrorMessages
 
Status myStatus
 

Private Attributes

std::string _fieldName
 
SMDSAbs_ElementType _elemType
 
std::vector< std::string > _compNames
 
std::vector< double > _dblValues
 
std::vector< int_intValues
 
int _dt
 
int _it
 
bool _addODOnVertices
 
std::vector< const
SMDS_MeshElement * > 
_elemsByGeom [SMDSEntity_Last]
 
std::vector< std::pair
< SMDSAbs_EntityType, int > > 
_nbElemsByGeom
 

Member Enumeration Documentation

enum Driver_Mesh::Status
inherited
Enumerator
DRS_OK 
DRS_EMPTY 
DRS_WARN_RENUMBER 
DRS_WARN_SKIP_ELEM 
DRS_WARN_DESCENDING 
DRS_FAIL 

Constructor & Destructor Documentation

DriverMED_W_Field::DriverMED_W_Field ( )

Constructor.

Member Function Documentation

Driver_Mesh::Status Driver_Mesh::addMessage ( const std::string &  msg,
const bool  isFatal = false 
)
protectedinherited
void DriverMED_W_Field::AddODOnVertices ( bool  toAdd)
void DriverMED_W_Field::AddValue ( double  val)

Adds a float field value.

References _dblValues.

Referenced by SMESH_Mesh_i::exportMEDFields().

void DriverMED_W_Field::AddValue ( int  val)

Adds an integer field value.

References _intValues.

SMESH_ComputeErrorPtr Driver_Mesh::GetError ( )
virtualinherited
std::string Driver_Mesh::GetMeshName ( ) const
virtualinherited
SMDS_ElemIteratorPtr DriverMED_W_Field::GetOrderedElems ( )

Returns elements in the order they are written in MED file.

References _elemsByGeom, _elemType, _nbElemsByGeom, SMDS_Mesh::elementsIterator(), and Driver_SMESHDS_Mesh::myMesh.

Referenced by SMESH_Mesh_i::exportMEDFields().

bool DriverMED_W_Field::Set ( SMESHDS_Mesh mesh,
const std::string &  fieldName,
SMDSAbs_ElementType  type,
const int  nbComps,
const bool  isIntData 
)
void DriverMED_W_Field::SetCompName ( const int  iComp,
const char *  name 
)

Set a name of a component countered from zero.

References _compNames.

Referenced by SMESH_Mesh_i::exportMEDFields().

void DriverMED_W_Field::SetDtIt ( const int  dt,
const int  it 
)

Sets numdt and numit field features.

Call this fun before AddValue()!

References _dblValues, _dt, _intValues, and _it.

Referenced by SMESH_Mesh_i::exportMEDFields().

void Driver_SMESHDS_Mesh::SetMesh ( SMESHDS_Mesh theMesh)
inherited
void Driver_Mesh::SetMeshName ( const std::string &  theMeshName)
virtualinherited
virtual void Driver_Mesh::SetOption ( const std::string &  optionName,
const std::string &  optionValue 
)
virtualinherited

Field Documentation

bool DriverMED_W_Field::_addODOnVertices
private

Referenced by Set().

std::vector< std::string > DriverMED_W_Field::_compNames
private

Referenced by Perform(), Set(), and SetCompName().

std::vector< double > DriverMED_W_Field::_dblValues
private

Referenced by AddValue(), Perform(), Set(), and SetDtIt().

int DriverMED_W_Field::_dt
private

Referenced by Perform(), and SetDtIt().

std::vector< const SMDS_MeshElement* > DriverMED_W_Field::_elemsByGeom[SMDSEntity_Last]
private

Referenced by GetOrderedElems(), and Set().

SMDSAbs_ElementType DriverMED_W_Field::_elemType
private

Referenced by GetOrderedElems(), Perform(), and Set().

std::string DriverMED_W_Field::_fieldName
private

Referenced by Perform(), and Set().

std::vector< int > DriverMED_W_Field::_intValues
private

Referenced by AddValue(), Perform(), Set(), and SetDtIt().

int DriverMED_W_Field::_it
private

Referenced by Perform(), and SetDtIt().

std::vector< std::pair< SMDSAbs_EntityType, int > > DriverMED_W_Field::_nbElemsByGeom
private

Referenced by GetOrderedElems(), Perform(), and Set().

std::vector< std::string > Driver_Mesh::myErrorMessages
protectedinherited
int Driver_Mesh::myMeshId
protectedinherited
std::string Driver_Mesh::myMeshName
protectedinherited
Status Driver_Mesh::myStatus
protectedinherited