#ifndef VISU_Convertor_HeaderFile
#define VISU_Convertor_HeaderFile
+/*!
+ \file VISU_Convertor.hxx
+ \brief The file contains definitions for basic classes of the VISU CONVERTER package
+*/
+
#include "VISU_IDMapper.hxx"
#include "VISU_ConvertorDef.hxx"
typedef TVector<TName> TNames;
//---------------------------------------------------------------
+ //! Define a basic class for all MED entites which can be identified by its number
struct TIntId: virtual TBaseStructure
{
vtkIdType myId;
typedef std::map<TEntity,PMeshOnEntity> TMeshOnEntityMap;
typedef std::map<TName,PGroup> TGroupMap;
+ //! Define a basic class which corresponds to MED MESH entity
+ /*!
+ This class in its turn contains map of TMeshOnEntity and TGroup substructures,
+ also it keeps name and dimention of corresponding MED MESH entity.
+ */
struct TMesh: virtual TBaseStructure
{
- TMeshOnEntityMap myMeshOnEntityMap;
- TGroupMap myGroupMap;
- TName myName;
- int myDim;
+ TMeshOnEntityMap myMeshOnEntityMap; //!< Contains corresponding meshes for MED ENTITIES
+ TGroupMap myGroupMap; //!< Contains map of bounded MED GROUPS
+ TName myName; //! Name of the corresponding MED MESH
+ int myDim; //! Dimension of the corresponding MED MESH
TMesh(): myDim(0)
{}
//---------------------------------------------------------------
+ //! Define a basic class which corresponds to MED PROFILE entity
struct TSubProfile: virtual TBaseStructure
{};
//---------------------------------------------------------------
+ //! Define a containerfor MED PROFILE entities which belongs to the same MED ENTITY
struct TProfile: virtual TIDMapper
{};
//---------------------------------------------------------------
+ //! Define a basic class for MED GAUSS entity
struct TGauss: virtual TBaseStructure
{};
//---------------------------------------------------------------
+ //! Define a container for mesh generated from MED GAUSS and corresponding MED PROFILE
struct TGaussSubMesh: virtual TBaseStructure
{
PSubProfile mySubProfile;
//---------------------------------------------------------------
+ //! Define a container for all TGaussSubMesh that belongs to the same MED ENTITY
struct TGaussMesh: virtual TGaussPtsIDMapper
{};
typedef std::map<TName,PFamily> TFamilyMap;
typedef std::map<TName,PField> TFieldMap;
+ //! Define a basic class which corresponds to MED ENTITY
+ /*!
+ This class in its turn contains map of TGaussMesh and TProfile substructures,
+ also it keeps corresponding map of MED FAMILIES and FIELDS.
+ */
struct TMeshOnEntity: virtual TNamedIDMapper
{
- TGaussMeshMap myGaussMeshMap;
- TProfileMap myProfileMap;
+ TGaussMeshMap myGaussMeshMap; //!< Contains map of Gauss mesh which exist on it
+ TProfileMap myProfileMap; //!< Contains map of Profile mesh which exist on it
- TFamilyMap myFamilyMap;
- TFieldMap myFieldMap;
+ TFamilyMap myFamilyMap; //!< Contains map of MED FAMILIES which belongs to it
+ TFieldMap myFieldMap; //!< Contains map of MED FIELDS which belongs to it
- TName myMeshName;
- TEntity myEntity;
+ TName myMeshName; //!< Contains name of the MED MESH where the it belongs to.
+ TEntity myEntity; //!< Referes to MED ENTITY where the it belongs to.
};
//---------------------------------------------------------------
+ //! Define a basic class for MED FAMILY entity
struct TFamily: virtual TIntId,
virtual TIDMapper
{
- TEntity myEntity;
- TName myName;
+ TEntity myEntity; //!< Referes to MED ENTITY where the TFamily belongs to.
+ TName myName; //!< Contains name of the corresponding MED FAMILY
};
//---------------------------------------------------------------
typedef std::set<PFamily> TFamilySet;
+ //! Define a basic class for MED GROUP entity
struct TGroup: virtual TIDMapper
{
TFamilySet myFamilySet;
typedef std::map<vtkIdType,PValForTime> TValField;
typedef std::pair<float,float> TMinMax;
+ //! Define a basic class for MED FIELD entity
struct TField: virtual TIntId
{
- TEntity myEntity;
- TName myName;
- TName myMeshName;
- TValField myValField;
- TNames myCompNames;
- TNames myUnitNames;
- vtkIdType myNbComp;
-
+ TEntity myEntity; //!< Referes to MED ENTITY where it belongs to.
+ TName myName; //!< Contains name of the corresponding MED FIELD
+ TName myMeshName; //!< Contains name of the MED MESH where it belongs to.
+ TValField myValField; //!< Contains sequence of values for corresponding MED TIMESTAMPS
+ TNames myCompNames; //!< Contains names of components of the MED FIELD
+ TNames myUnitNames; //!< Contains names of units of the MED FIELD
+ vtkIdType myNbComp; //!< Keeps number of components for the MED FIELD
+
+ //! Calculate min/max values for each of the MED FIELD components among all its timestamps
+ /*!
+ Numeration of the components starts from 1.
+ Zero component contains min/max value for modulus of corresponding vector
+ */
virtual
TMinMax
GetMinMax(vtkIdType theCompID) = 0;
//---------------------------------------------------------------
typedef std::pair<double,std::string> TTime;
+ //! Define a basic class for MED TIMESTAMP entity
struct TValForTime: virtual TIntId
{
- TEntity myEntity;
- TName myMeshName;
- TName myFieldName;
+ TEntity myEntity; //!< Referes to MED ENTITY where it belongs to.
+ TName myMeshName; //!< Contains name of the MED MESH where it belongs to.
+ TName myFieldName; //!< Contains name of the MED FIELD where it belongs to.
TTime myTime;
- PProfile myProfile;
+ PProfile myProfile; //!< Contains corresponding MED PROFILE where the MED TIEMSTMAP attached to
PGaussMesh myGaussMesh;
};
//---------------------------------------------------------------
+ //! The utility function allows to write vtkUnstructuredGrid to a file with defined name
void
WriteToFile(vtkUnstructuredGrid* theDataSet,
const std::string& theFileName);
//---------------------------------------------------------------
+//! This class defines interface to read VTK interpretation of MED entities
+/*!
+ It is the main class of the VISU CONVERTER package.
+ Following MED entities can be retrived from any MED file:
+ - mesh from corresponding MED ENTITIES;
+ - MED TIMESTAMPS;
+ - MED FAMILIES;
+ - MED GROUPS.
+ The class produce its work in two main steps:
+ 1. Perfrom parsing of MED file to get known what MED entities are pressent in it
+ 2. Get VTK representation for any existing MED entity
+ Also, it can perform some additional work to calculate expected amount of memory to build defined VTK representation
+
+*/
class VISU_Convertor
{
protected:
~VISU_Convertor()
{};
+ //! Get brief name of the corresponding source MED file
virtual
const std::string&
GetName(){ return myName;}
+ //! Let known whether the source MED file parsed or not
virtual
int
IsDone() const { return myIsDone; }
+ //! Defines what subtype of vtkDataSet is used for MED to VTK mapping
typedef VISU::TVTKOutput TOutput;
+ //! This method perform first parsing of MED file to get known what MED entities are pressent in it
virtual
VISU_Convertor*
Build() = 0;
+ //! This method allow to get known what MED entities are present is the MED file
virtual
const VISU::TMeshMap&
GetMeshMap();
+ //! Get amount of memory to build VTK representations for all existing MED entities
virtual
float
GetSize() = 0;
+ //! Get mesh for corresponding MED ENTITY
virtual
VISU::PNamedIDMapper
GetMeshOnEntity(const std::string& theMeshName,
const VISU::TEntity& theEntity) = 0;
+ //! Get amount of memory to build mesh for corresponding MED ENTITY
virtual
float
GetMeshOnEntitySize(const std::string& theMeshName,
const VISU::TEntity& theEntity) = 0;
+ //! Get mesh for corresponding MED FAMILY
virtual
VISU::PIDMapper
GetFamilyOnEntity(const std::string& theMeshName,
const VISU::TEntity& theEntity,
const std::string& theFamilyName) = 0;
+
+ //! Get amount of memory to build mesh for corresponding MED FAMILY
virtual
float
GetFamilyOnEntitySize(const std::string& theMeshName,
const VISU::TEntity& theEntity,
const std::string& theFamilyName) = 0;
+
+ //! Get mesh for corresponding MED GROUP
virtual
VISU::PIDMapper
GetMeshOnGroup(const std::string& theMeshName,
const std::string& theGroupName) = 0;
+ //! Get amount of memory to build mesh for corresponding MED GROUP
virtual
float
GetMeshOnGroupSize(const std::string& theMeshName,
const std::string& theGroupName) = 0;
+ //! Get mesh with attached values for corresponding MED TIMESTAMP
virtual
VISU::PIDMapper
GetTimeStampOnMesh(const std::string& theMeshName,
const std::string& theFieldName,
int theStampsNum) = 0;
+ //! Get Gauss Points mesh with attached values for corresponding MED TIMESTAMP
virtual
VISU::PGaussPtsIDMapper
GetTimeStampOnGaussPts(const std::string& theMeshName,
const std::string& theFieldName,
int theStampsNum) = 0;
+ //! Get amount of memory to build mesh for corresponding MED TIMESTAMP
virtual
float
GetTimeStampSize(const std::string& theMeshName,
const std::string& theFieldName,
int theStampsNum) = 0;
+ //! Get amount of memory to build all MED TIMESTAMPS for corresponding MED FIELD
virtual
float
GetFieldOnMeshSize(const std::string& theMeshName,
const VISU::TEntity& theEntity,
const std::string& theFieldName) = 0;
+ //! Find MED FIELD container
virtual
const VISU::PField
GetField(const std::string& theMeshName,
VISU::TEntity theEntity,
const std::string& theFieldName) = 0;
+ //! Find MED TIMESTAMP container
virtual
const VISU::PValForTime
GetTimeStamp(const std::string& theMeshName,
const std::string& theFieldName,
int theStampsNum) = 0;
+ //! Allow to generate pretty name for MED TIMESTAMP
static
std::string
GenerateName(const VISU::TTime& aTime);
extern "C"
{
+ //! Instatiate proper VISU_Convertor subclass
VISU_Convertor*
CreateConvertor(const std::string& theFileName);
};
namespace VISU
{
+ //! Defines VISU enumeration of geometrical types
enum EGeometry {ePOINT1=1, eSEG2=102, eSEG3=103, eTRIA3=203,
eQUAD4=204, eTRIA6=206,eQUAD8=208, eTETRA4=304,
ePYRA5=305, ePENTA6=306, eHEXA8=308, eTETRA10=310,
ePYRA13=313, ePENTA15=315, eHEXA20=320,
ePOLYGONE=400, ePOLYEDRE=500, eNONE=-1};
+ //! Get number of nodes for defined geometrical type
vtkIdType
VISUGeom2NbNodes(EGeometry theGeom);
+ //! Maps VISU geometrical type to VTK one
vtkIdType
VISUGeom2VTK(EGeometry theGeom);
typedef float TCoord;
//---------------------------------------------------------------
+ //! Define an utility base class which is repsonsible for preventing repetion
struct TIsVTKDone: virtual TBaseStructure
{
TIsVTKDone();
- bool myIsDone;
- bool myIsVTKDone;
+ bool myIsDone; //!< Say, is the corresponding MED entity already loaded into intermediate data structure
+ bool myIsVTKDone; //!< Say, is the corresponding intermediate data structure already mapped into VTK representation
};
//---------------------------------------------------------------
+ //! Define an utility base class which allow to keep calculated number of cells and their size
struct TSizeCounter: virtual TIsVTKDone
{
TSizeCounter();
- vtkIdType myNbCells;
- vtkIdType myCellsSize;
+ vtkIdType myNbCells; //!< Number of cells contained into corresponding sublclass
+ vtkIdType myCellsSize; //!< Size of cells contained into corresponding sublclass
};
//---------------------------------------------------------------
+ //! Define a container for VTK representation
class TSource: public virtual TSizeCounter
{
protected:
public:
TSource();
+ //! This method allow to create corresponding VTK data set by demand (not at once)
const TVTKSource&
GetSource() const;
//---------------------------------------------------------------
+ //! Define a container for VTK representation
+ /*!
+ This container allow to combine other VTK representation into single one.
+ */
class TAppendFilter: public virtual TIsVTKDone,
public virtual TIDMapper
{
public:
TAppendFilter();
+ //! This method allow to create corresponding VTK filter by demand (not at once)
const TVTKAppendFilter&
GetFilter() const;
//---------------------------------------------------------------
+ //! Define a container for VTK representation
+ /*!
+ This container allow to assign data to mesh and represent them into single VTK representation
+ */
class TMergeFilter: public virtual TIsVTKDone,
public virtual TIDMapper
{
public:
TMergeFilter();
+ //! This method allow to create corresponding VTK filter by demand (not at once)
const TVTKMergeFilter&
GetFilter() const;
typedef TSlice<TCoordArray> TCoordSlice;
typedef TCSlice<TCoordArray> TCCoordSlice;
+ //! This class is responsible for representation of mesh nodes
class TPointCoords: public virtual TBaseStructure
{
protected:
- vtkIdType myDim;
- vtkIdType myNbPoints;
+ vtkIdType myDim; //!< Dimension of the nodal coordinates
+ vtkIdType myNbPoints; //!< Number of nodes in corresponding mesh
- TCoordArray myCoord;
- TVTKPoints myPoints;
+ //! An container for coordinates of the nodes
+ /*!
+ Usage of slices allow to minimize amount of memory to store the nodal coordinates and
+ provide unifirm way of conversation with this coordinates (independant from mesh dimension)
+ */
+ TCoordArray myCoord;
+ TVTKPoints myPoints; //!< VTK representation for the mesh nodes
public:
TPointCoords();
+ //! To initilize the class
void
Init(vtkIdType theNbPoints,
vtkIdType theDim);
+ //! Get slice of coordinates for defined node (const version)
TCCoordSlice
GetCoordSlice(vtkIdType theNodeId) const;
+ //! Get slice of coordinates for defined node
TCoordSlice
GetCoordSlice(vtkIdType theNodeId);
typedef TVector<vtkIdType> TVectorID;
typedef std::map<vtkIdType,vtkIdType> TObj2VTKID;
+ //! This class is responsible for representation of mesh nodes
+ /*!
+ In additition to its base functionlity it support mapping of VTK to object numeration and
+ keeps names for each of nodes.
+ */
class TNamedPointCoords: public virtual TPointCoords
{
protected:
typedef TVector<std::string> TPointsDim;
- TPointsDim myPointsDim;
- TVectorID myVectorID;
- TObj2VTKID myObj2VTKID;
+ TPointsDim myPointsDim; //!< Keeps name of each dimension
+ TVectorID myVectorID; //!< Keeps object¶ numeration
+ TObj2VTKID myObj2VTKID; //!< Keeps mapping from object number to VTK one
public:
+ //! To initilize the class (numeration of the nodes can be missed)
void
Init(vtkIdType theNbPoints,
vtkIdType theDim,
const TVectorID& theVectorID = TVectorID());
+ //! Get name for defined dimension
std::string&
GetName(vtkIdType theDim);
+ //! Get name for defined dimension (const version)
const std::string&
GetName(vtkIdType theDim) const;
+ //! Get object number for node by its VTK one
virtual
vtkIdType
GetObjID(vtkIdType theID) const;
+ //! Get VTK number for node by its object one
virtual
vtkIdType
GetVTKID(vtkIdType theID) const;
+ //! Get name of node by its object number
virtual
std::string
GetNodeName(vtkIdType theObjID) const;
//---------------------------------------------------------------
+ //! Specialize TMesh to provide VTK mapping for nodes
struct TMeshImpl: virtual TMesh,
virtual TIsVTKDone
{
typedef TVector<vtkIdType> TSubMeshID;
typedef enum {eRemoveAll, eAddAll, eAddPart, eNone} ESubMeshStatus;
+ //! Specialize TSubProfile to provide VTK mapping
struct TSubProfileImpl: virtual TSubProfile,
virtual TSource
{
TSubProfileImpl();
- EGeometry myGeom;
- std::string myName;
+ EGeometry myGeom; //!< Defines to what geometrical type the MED PROFILE belong to
+ std::string myName; //!< Keeps its name
+ //! Get object number of mesh cell by its VTK one
virtual
vtkIdType
GetElemObjID(int theVtkI) const;
- ESubMeshStatus myStatus;
- TSubMeshID mySubMeshID;
+ //! Keeps status of the structure
+ /*!
+ In some cases MED file does not use MED PROFILES, but at VISU creates corresponding data strucutre
+ in order to construct mesh for MED TIEMSTAMPS in uniform way.
+ */
+ ESubMeshStatus myStatus;
+ TSubMeshID mySubMeshID; //!< Keeps numbers of mesh cell which contain the MED PROFILE
};
typedef SharedPtr<TSubProfileImpl> PSubProfileImpl;
typedef TVector<PSubProfileImpl> TSubProfileArr;
typedef std::map<EGeometry,PSubProfileImpl> TGeom2SubProfile;
+ //! Specialize TProfile to provide VTK mapping for MED TIMESTAMP mesh
struct TProfileImpl: virtual TProfile,
virtual TAppendFilter
{
TProfileImpl();
- bool myIsAll;
+ bool myIsAll; //!< Say, whether the MED TIMESTAMP defined on all MED ENTITY or not
+ //! Reimplement the TIDMapper::GetNodeObjID
virtual
vtkIdType
GetNodeObjID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetNodeVTKID
virtual
vtkIdType
GetNodeVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetNodeCoord
virtual
float*
GetNodeCoord(vtkIdType theObjID);
+ //! Reimplement the TIDMapper::GetElemObjID
virtual
vtkIdType
GetElemObjID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemVTKID
virtual
vtkIdType
GetElemVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemCell
virtual
vtkCell*
GetElemCell(vtkIdType theObjID);
+ //! Get corresponding VTK output
virtual
TVTKOutput*
GetVTKOutput();
- TID2ID myElemObj2VTKID;
- TSubProfileArr mySubProfileArr;
- PNamedPointCoords myNamedPointCoords;
- TMeshOnEntityImpl* myMeshOnEntity;
+ TID2ID myElemObj2VTKID; //!< Keeps object to VTK numeration mapping
+ TSubProfileArr mySubProfileArr; //!< Keeps sequence of TSubProfiles as they was added into TAppendFilter
+ PNamedPointCoords myNamedPointCoords; //!< Keeps reference on the same TNamedPointCoords as TMesh
+ TMeshOnEntityImpl* myMeshOnEntity; //<! Keeps backward reference to corresponding MED ENTITY mesh
- TSource mySource;
- TGeom2SubProfile myGeom2SubProfile;
+ TSource mySource; //! Keeps VTK representation of the MED TIMESTAMP mesh
+ TGeom2SubProfile myGeom2SubProfile; //! Keeps TSubProfiles according to their geometrical type
};
typedef SharedPtr<TProfileImpl> PProfileImpl;
//---------------------------------------------------------------
+ //! Specialize TMergeFilter to provide VTK mapping for MED TIMESTAMP mesh
struct TIDMapperFilter: virtual TMergeFilter
{
- TAppendFilter myIDMapper;
- TSource mySource;
+ TAppendFilter myIDMapper; //!< Responsible for numbering
+ TSource mySource; //!< Keeps assigned data
+ //! Reimplement the TIDMapper::GetNodeObjID
virtual
vtkIdType
GetNodeObjID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetNodeVTKID
virtual
vtkIdType
GetNodeVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetNodeCoord
virtual
float*
GetNodeCoord(vtkIdType theObjID);
+ //! Reimplement the TIDMapper::GetElemObjID
virtual
vtkIdType
GetElemObjID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemVTKID
virtual
vtkIdType
GetElemVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemCell
virtual
vtkCell*
GetElemCell(vtkIdType theObjID);
//---------------------------------------------------------------
+ //! Specialize TGauss to provide more detail information for the MED GAUSS entity
struct TGaussImpl: virtual TGauss
{
- EGeometry myGeom;
- std::string myName;
- vtkIdType myNbPoints;
+ EGeometry myGeom; //!< Define, to which geometrical type the MED GAUSS entity belongs
+ std::string myName; //!< Keeps name of the MED GAUSS entity
+ vtkIdType myNbPoints; //<! Keeps number of points for the MED GAUSS entity
};
typedef SharedPtr<TGaussImpl> PGaussImpl;
//---------------------------------------------------------------
+ //! Specialize TGaussSubMesh to provide VTK mapping for the entity
struct TGaussSubMeshImpl: virtual TGaussSubMesh,
virtual TSource
{
TGaussSubMeshImpl();
+ //! To implement the TGaussPtsIDMapper::GetObjID
virtual
TGaussPointID
GetObjID(vtkIdType theID) const;
- PGaussImpl myGauss;
+ PGaussImpl myGauss; //<! Keep reference to corresponding TGauss structure
+
+ //! Keeps status of the structure
+ /*!
+ In some cases MED file does not use MED GAUSS, but at VISU creates corresponding data strucutre
+ in order to construct mesh for MED TIEMSTAMPS in uniform way.
+ */
ESubMeshStatus myStatus;
- TPointCoords myPointCoords;
+
+ TPointCoords myPointCoords; //!< Keeps coordinates of Gauss Points
};
typedef SharedPtr<TGaussSubMeshImpl> PGaussSubMeshImpl;
typedef TVector<PGaussSubMeshImpl> TGaussSubMeshArr;
typedef std::map<EGeometry,PGaussSubMeshImpl> TGeom2GaussSubMesh;
+ //! Specialize TGaussMesh to provide VTK mapping for the entity
struct TGaussMeshImpl: virtual TGaussMesh,
virtual TAppendFilter
{
TGaussMeshImpl();
+ //! Reimplement the TGaussPtsIDMapper::GetObjID
virtual
TGaussPointID
GetObjID(vtkIdType theID) const;
TVTKOutput*
GetVTKOutput();
+ //! Reimplement the TGaussPtsIDMapper::GetParent
virtual
TNamedIDMapper*
GetParent();
- TSource mySource;
- TNamedIDMapper* myParent;
- TGaussSubMeshArr myGaussSubMeshArr;
- TGeom2GaussSubMesh myGeom2GaussSubMesh;
+ TSource mySource; //!< Keeps VTK representation of the Gauss Points
+ TNamedIDMapper* myParent; //!< Refer to parent mesh
+ TGaussSubMeshArr myGaussSubMeshArr; //!< Keeps sequence of TGaussSubMesh as they was added into TAppendFilter
+ TGeom2GaussSubMesh myGeom2GaussSubMesh; //! Keeps TGaussSubMesh according to their geometrical type
};
typedef SharedPtr<TGaussMeshImpl> PGaussMeshImpl;
typedef TVector<vtkIdType> TConnect;
typedef TVector<TConnect> TCell2Connect;
+ //! The class is responsible for mapping of cells of defined geometrical type
struct TSubMeshImpl: virtual TSource
{
+
+ //! To implement the TIDMapper::GetElemObjID
virtual
vtkIdType
GetElemObjID(vtkIdType theID) const;
+ //! To implement the TNamedIDMapper::GetElemName
virtual
std::string
GetElemName(vtkIdType theObjID) const;
vtkIdType myStartID;
- TCell2Connect myCell2Connect;
+ TCell2Connect myCell2Connect; //!< Contains connectivity for the cells
};
typedef SharedPtr<TSubMeshImpl> PSubMeshImpl;
typedef std::map<EGeometry,PSubMeshImpl> TGeom2SubMesh;
typedef TVector<PSubMeshImpl> TSubMeshArr;
+ //! Specialize TMeshOnEntity to provide VTK mapping for the entity
struct TMeshOnEntityImpl: virtual TMeshOnEntity,
virtual TAppendFilter,
virtual TSizeCounter
{
+ //! Reimplement the TIDMapper::GetNodeVTKID
virtual
vtkIdType
GetNodeVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetNodeObjID
virtual
vtkIdType
GetNodeObjID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemVTKID
virtual
vtkIdType
GetElemVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemObjID
virtual
vtkIdType
GetElemObjID(vtkIdType theID) const;
+ //! Reimplement the TNamedIDMapper::GetNodeName
virtual
std::string
GetNodeName(vtkIdType theObjID) const;
+ //! Reimplement the TNamedIDMapper::GetElemName
virtual
std::string
GetElemName(vtkIdType theObjID) const;
- TID2ID myElemObj2VTKID;
- TSubMeshArr mySubMeshArr;
- PNamedPointCoords myNamedPointCoords;
+ TID2ID myElemObj2VTKID; //!< To support object to VTK number mapping
+ TSubMeshArr mySubMeshArr; //!< Keeps sequence of TSubMeshImpl as they were added into TAppendFilter
+ PNamedPointCoords myNamedPointCoords; //!< Share the same instance with TMesh to implement nodal mapping
- TGeom2SubMesh myGeom2SubMesh;
+ TGeom2SubMesh myGeom2SubMesh; //!< Keeps TSubMeshImpl according to their geometrical type
};
typedef SharedPtr<TMeshOnEntityImpl> PMeshOnEntityImpl;
//---------------------------------------------------------------
typedef std::map<EGeometry,TSubMeshID> TGeom2SubMeshID;
+ //! Specialize TFamily to provide VTK mapping for the entity
struct TFamilyImpl: virtual TFamily,
virtual TSource
{
+ //! Reimplement the TIDMapper::GetNodeObjID
vtkIdType
GetNodeObjID(vtkIdType theID) const ;
+ //! Reimplement the TIDMapper::GetNodeVTKID
virtual
vtkIdType
GetNodeVTKID(vtkIdType theID) const ;
+ //! Reimplement the TIDMapper::GetElemVTKID
virtual
vtkIdType
GetElemVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemObjID
virtual
vtkIdType
GetElemObjID(vtkIdType theID) const;
TVTKOutput*
GetVTKOutput();
- PNamedPointCoords myNamedPointCoords;
- TID2ID myElemObj2VTKID;
- TSubMeshID myMeshID;
+ PNamedPointCoords myNamedPointCoords; //!< Share the same instance with TMesh to implement nodal mapping
+ TID2ID myElemObj2VTKID; //!< To support object to VTK number mapping
+ TSubMeshID myMeshID; //!< Keeps numbers of mesh elements that belongs to the MED FAMILY
- TGeom2SubMeshID myGeom2SubMeshID;
+ TGeom2SubMeshID myGeom2SubMeshID; //!< Keeps TSubMeshID according to their geometrical type
};
typedef SharedPtr<TFamilyImpl> PFamilyImpl;
typedef std::pair<vtkIdType,vtkIdType> TNbASizeCells;
typedef TVector<PFamilyImpl> TFamilyArr;
+ //! Specialize TGroup to provide VTK mapping for the entity
struct TGroupImpl: virtual TGroup,
virtual TAppendFilter
{
+ //! Calculate pair of values - number of cells and its size
TNbASizeCells
GetNbASizeCells() const;
+ //! Reimplement the TIDMapper::GetElemVTKID
virtual
vtkIdType
GetElemVTKID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetElemObjID
virtual
vtkIdType
GetElemObjID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetNodeObjID
virtual
vtkIdType
GetNodeObjID(vtkIdType theID) const;
+ //! Reimplement the TIDMapper::GetNodeVTKID
virtual
vtkIdType
GetNodeVTKID(vtkIdType theID) const;
- TID2ID myElemObj2VTKID;
- TFamilyArr myFamilyArr;
- PNamedPointCoords myNamedPointCoords;
+ TID2ID myElemObj2VTKID; //!< To support object to VTK number mapping
+ TFamilyArr myFamilyArr; //!< Keeps sequence of TFamily as they were added into TAppendFilter
+ PNamedPointCoords myNamedPointCoords; //!< Share the same instance with TMesh to implement nodal mapping
};
typedef SharedPtr<TGroupImpl> PGroupImpl;
//---------------------------------------------------------------
typedef TVector<TMinMax> TMinMaxArr;
+ //! Specialize TField to provide VTK mapping for the entity
struct TFieldImpl: virtual TField
{
- vtkIdType myDataSize;
+ vtkIdType myDataSize; //!< Keeps size of the assigned data
- TMinMaxArr myMinMaxArr;
+ TMinMaxArr myMinMaxArr; //!< Keeps min/max values for each component of the MED FIELD
+ //! Implement the TField::GetMinMax
virtual
TMinMax
GetMinMax(vtkIdType theCompID);
+ //! To initialize the data structure
void
InitArrays(vtkIdType theNbComp);
typedef TVector<TCValueSlice> TCValueSliceArr;
typedef TVector<TValueSlice> TValueSliceArr;
+ //! Define a container to get access to data assigned to mesh
struct TMeshValue
{
- TValue myValue;
+ TValue myValue; //!< Keeps all values as one dimensional sequence
- vtkIdType myNbElem;
- vtkIdType myNbComp;
- vtkIdType myNbGauss;
- vtkIdType myStep;
+ vtkIdType myNbElem; //!< Defines number of mesh elements where the data assigned to
+ vtkIdType myNbComp; //!< Keeps number of components of corresponding MED FIELD
+ vtkIdType myNbGauss; //!< Defines number of Gauss Points
+ vtkIdType myStep; //! Internal variable
+ //! To intitilize the data strucutre
void
Init(vtkIdType theNbElem,
vtkIdType theNbGauss,
vtkIdType theNbComp);
+ //! To get assigned values first by Gauss Points and then by components (constant version)
TCValueSliceArr
GetGaussValueSliceArr(vtkIdType theElemId) const;
+ //! To get assigned values first by Gauss Points and then by components
TValueSliceArr
GetGaussValueSliceArr(vtkIdType theElemId);
+ //! To get assigned values first by components and then by Gauss Points (constant version)
TCValueSliceArr
GetCompValueSliceArr(vtkIdType theElemId) const;
+ //! To get assigned values first by components and then by Gauss Points
TValueSliceArr
GetCompValueSliceArr(vtkIdType theElemId);
};