Version: 6.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ParaMEDMEM::MEDFileField1TSWithoutDAS Class Reference
Inheritance diagram for ParaMEDMEM::MEDFileField1TSWithoutDAS:
Inheritance graph
[legend]
Collaboration diagram for ParaMEDMEM::MEDFileField1TSWithoutDAS:
Collaboration graph
[legend]

Public Member Functions

int copyTinyInfoFrom (const MEDCouplingFieldDouble *field) throw (INTERP_KERNEL::Exception)
int getDimension () const
int getIteration () const
int getOrder () const
double getTime (int &iteration, int &order) const
void setTime (double val, int iteration, int order)
std::string getName () const
void simpleRepr (int bkOffset, std::ostream &oss, int f1tsId) const
const std::string & getDtUnit () const
std::string getMeshName () const throw (INTERP_KERNEL::Exception)
int getMeshIteration () const throw (INTERP_KERNEL::Exception)
int getMeshOrder () const throw (INTERP_KERNEL::Exception)
int getNumberOfComponents () const
void simpleReprWithoutHeader (std::ostream &oss) const
bool isDealingTS (int iteration, int order) const
std::pair< int, int > getDtIt () const
void fillIteration (std::pair< int, int > &p) const
void fillTypesOfFieldAvailable (std::vector< TypeOfField > &types) const throw (INTERP_KERNEL::Exception)
const std::vector< std::string > & getInfo () const
std::vector< std::string > & getInfo ()
void finishLoading (med_idt fid) throw (INTERP_KERNEL::Exception)
virtual void writeLL (med_idt fid) const throw (INTERP_KERNEL::Exception)
std::vector< std::string > getPflsReallyUsed2 () const
std::vector< std::string > getLocsReallyUsed2 () const
std::vector< std::string > getPflsReallyUsedMulti2 () const
std::vector< std::string > getLocsReallyUsedMulti2 () const
void changePflsRefsNamesGen2 (const std::vector< std::pair< std::vector< std::string >, std::string > > &mapOfModif) throw (INTERP_KERNEL::Exception)
void changeLocsRefsNamesGen2 (const std::vector< std::pair< std::vector< std::string >, std::string > > &mapOfModif) throw (INTERP_KERNEL::Exception)
void setFieldNoProfileSBT (const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal &glob) throw (INTERP_KERNEL::Exception)
void setFieldProfile (const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFieldFieldGlobsReal &glob) throw (INTERP_KERNEL::Exception)
int getNonEmptyLevels (const char *mname, std::vector< int > &levs) const throw (INTERP_KERNEL::Exception)
std::vector< TypeOfFieldgetTypesOfFieldAvailable () const throw (INTERP_KERNEL::Exception)
std::vector< std::vector
< std::pair< int, int > > > 
getFieldSplitedByType (const char *mname, std::vector< INTERP_KERNEL::NormalizedCellType > &types, std::vector< std::vector< TypeOfField > > &typesF, std::vector< std::vector< std::string > > &pfls, std::vector< std::vector< std::string > > &locs) const throw (INTERP_KERNEL::Exception)
std::vector< std::vector
< DataArrayDouble * > > 
getFieldSplitedByType2 (const char *mname, std::vector< INTERP_KERNEL::NormalizedCellType > &types, std::vector< std::vector< TypeOfField > > &typesF, std::vector< std::vector< std::string > > &pfls, std::vector< std::vector< std::string > > &locs) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublegetFieldAtLevel (TypeOfField type, int meshDimRelToMax, const char *mName, int renumPol, const MEDFieldFieldGlobsReal *glob) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublegetFieldOnMeshAtLevel (TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFieldFieldGlobsReal *glob, const MEDFileMesh *mesh) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublegetFieldAtTopLevel (TypeOfField type, const char *mName, int renumPol, const MEDFieldFieldGlobsReal *glob) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublegetFieldOnMeshAtLevel (TypeOfField type, int renumPol, const MEDFieldFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayInt *cellRenum, const DataArrayInt *nodeRenum) const throw (INTERP_KERNEL::Exception)
DataArrayDoublegetFieldWithProfile (TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFieldFieldGlobsReal *glob) const throw (INTERP_KERNEL::Exception)
DataArrayDoublegetUndergroundDataArray () const throw (INTERP_KERNEL::Exception)
DataArrayDoublegetUndergroundDataArrayExt (std::vector< std::pair< std::pair< INTERP_KERNEL::NormalizedCellType, int >, std::pair< int, int > > > &entries) const throw (INTERP_KERNEL::Exception)
 MEDFileField1TSWithoutDAS ()
DataArrayDoublegetOrCreateAndGetArray ()
const DataArrayDoublegetOrCreateAndGetArray () const
- Public Member Functions inherited from ParaMEDMEM::RefCountObject
bool decrRef () const
void incrRef () const

Static Public Member Functions

static MEDFileField1TSWithoutDASNew (const char *fieldName, int csit, int fieldtype, int iteration, int order, const std::vector< std::string > &infos)
static void CheckMeshDimRel (int meshDimRelToMax) throw (INTERP_KERNEL::Exception)
static std::vector< int > CheckSBTMesh (const MEDCouplingMesh *mesh) throw (INTERP_KERNEL::Exception)

Protected Member Functions

int addNewEntryIfNecessary (const MEDCouplingMesh *mesh) throw (INTERP_KERNEL::Exception)
int getMeshIdFromMeshName (const char *mName) const throw (INTERP_KERNEL::Exception)
MEDFileFieldPerMeshPerTypePerDisc * getLeafGivenMeshAndTypeAndLocId (const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) throw (INTERP_KERNEL::Exception)
const
MEDFileFieldPerMeshPerTypePerDisc * 
getLeafGivenMeshAndTypeAndLocId (const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const throw (INTERP_KERNEL::Exception)
 MEDFileField1TSWithoutDAS (const char *fieldName, int csit, int fieldtype, int iteration, int order, const std::vector< std::string > &infos)
- Protected Member Functions inherited from ParaMEDMEM::RefCountObject
 RefCountObject ()
 RefCountObject (const RefCountObject &other)
virtual ~RefCountObject ()

Protected Attributes

std::string _dt_unit
MEDCouplingAutoRefCountObjectPtr
< DataArrayDouble
_arr
std::vector
< MEDCouplingAutoRefCountObjectPtr
< MEDFileFieldPerMesh > > 
_field_per_mesh
int _csit
int _field_type
int _iteration
int _order
double _dt

Detailed Description

DAS is for Shared Data Arrays such as profiles.

Constructor & Destructor Documentation

MEDFileField1TSWithoutDAS::MEDFileField1TSWithoutDAS ( const char *  fieldName,
int  csit,
int  fieldtype,
int  iteration,
int  order,
const std::vector< std::string > &  infos 
)
protected
MEDFileField1TSWithoutDAS::MEDFileField1TSWithoutDAS ( )

Referenced by New().

Member Function Documentation

int MEDFileField1TSWithoutDAS::copyTinyInfoFrom ( const MEDCouplingFieldDouble field) throw (INTERP_KERNEL::Exception)

This method copyies tiny info but also preallocated the DataArrayDouble instance in this->_arr. This not allocated it allocates to the size of 'field' array. If already allocated it grows the array to the previous size + the size of the array of the input 'field'. This method returns the position (in tuple id) where to start to feed 'this->_arr'

References ParaMEDMEM::DataArray::getInfoOnComponents(), ParaMEDMEM::DataArray::getNumberOfComponents(), ParaMEDMEM::DataArray::getNumberOfTuples(), and ParaMEDMEM::DataArrayDouble::New().

int MEDFileField1TSWithoutDAS::getDimension ( ) const

This method returns the max dimension of 'this'. This method returns -2 if 'this' is empty, -1 if only nodes are defined.

References _field_per_mesh.

int ParaMEDMEM::MEDFileField1TSWithoutDAS::getIteration ( ) const
int ParaMEDMEM::MEDFileField1TSWithoutDAS::getOrder ( ) const
double ParaMEDMEM::MEDFileField1TSWithoutDAS::getTime ( int &  iteration,
int &  order 
) const
void ParaMEDMEM::MEDFileField1TSWithoutDAS::setTime ( double  val,
int  iteration,
int  order 
)
std::string MEDFileField1TSWithoutDAS::getName ( ) const
void MEDFileField1TSWithoutDAS::simpleRepr ( int  bkOffset,
std::ostream &  oss,
int  f1tsId 
) const
const std::string& ParaMEDMEM::MEDFileField1TSWithoutDAS::getDtUnit ( ) const
std::string MEDFileField1TSWithoutDAS::getMeshName ( ) const throw (INTERP_KERNEL::Exception)

References _field_per_mesh.

int MEDFileField1TSWithoutDAS::getMeshIteration ( ) const throw (INTERP_KERNEL::Exception)

References _field_per_mesh.

int MEDFileField1TSWithoutDAS::getMeshOrder ( ) const throw (INTERP_KERNEL::Exception)

References _field_per_mesh.

int MEDFileField1TSWithoutDAS::getNumberOfComponents ( ) const
void ParaMEDMEM::MEDFileField1TSWithoutDAS::simpleReprWithoutHeader ( std::ostream &  oss) const
bool MEDFileField1TSWithoutDAS::isDealingTS ( int  iteration,
int  order 
) const

References _iteration, and _order.

std::pair< int, int > MEDFileField1TSWithoutDAS::getDtIt ( ) const

References fillIteration().

void MEDFileField1TSWithoutDAS::fillIteration ( std::pair< int, int > &  p) const

References _iteration, and _order.

Referenced by getDtIt().

void MEDFileField1TSWithoutDAS::fillTypesOfFieldAvailable ( std::vector< TypeOfField > &  types) const throw (INTERP_KERNEL::Exception)
const std::vector< std::string > & MEDFileField1TSWithoutDAS::getInfo ( ) const
std::vector< std::string > & MEDFileField1TSWithoutDAS::getInfo ( )
MEDFileField1TSWithoutDAS * MEDFileField1TSWithoutDAS::New ( const char *  fieldName,
int  csit,
int  fieldtype,
int  iteration,
int  order,
const std::vector< std::string > &  infos 
)
static
void MEDFileField1TSWithoutDAS::finishLoading ( med_idt  fid) throw (INTERP_KERNEL::Exception)
void MEDFileField1TSWithoutDAS::writeLL ( med_idt  fid) const throw (INTERP_KERNEL::Exception)
virtual
std::vector< std::string > MEDFileField1TSWithoutDAS::getPflsReallyUsed2 ( ) const

References _field_per_mesh.

std::vector< std::string > MEDFileField1TSWithoutDAS::getLocsReallyUsed2 ( ) const

References _field_per_mesh.

std::vector< std::string > MEDFileField1TSWithoutDAS::getPflsReallyUsedMulti2 ( ) const

References _field_per_mesh.

std::vector< std::string > MEDFileField1TSWithoutDAS::getLocsReallyUsedMulti2 ( ) const

References _field_per_mesh.

void MEDFileField1TSWithoutDAS::changePflsRefsNamesGen2 ( const std::vector< std::pair< std::vector< std::string >, std::string > > &  mapOfModif) throw (INTERP_KERNEL::Exception)

References _field_per_mesh.

void MEDFileField1TSWithoutDAS::changeLocsRefsNamesGen2 ( const std::vector< std::pair< std::vector< std::string >, std::string > > &  mapOfModif) throw (INTERP_KERNEL::Exception)

References _field_per_mesh.

void MEDFileField1TSWithoutDAS::CheckMeshDimRel ( int  meshDimRelToMax) throw (INTERP_KERNEL::Exception)
static
std::vector< int > MEDFileField1TSWithoutDAS::CheckSBTMesh ( const MEDCouplingMesh mesh) throw (INTERP_KERNEL::Exception)
static
void MEDFileField1TSWithoutDAS::setFieldNoProfileSBT ( const MEDCouplingFieldDouble field,
MEDFieldFieldGlobsReal glob 
) throw (INTERP_KERNEL::Exception)

SBT means Sort By Type. This method is the most basic method to assign field in this. Basic in sense that no renumbering is done. Underlying mesh in 'field' is globaly ignored except for type contiguous check.

References CheckSBTMesh(), and ParaMEDMEM::ON_NODES.

Referenced by ParaMEDMEM::MEDFileFieldMultiTS::appendFieldNoProfileSBT(), and ParaMEDMEM::MEDFileField1TS::setFieldNoProfileSBT().

void MEDFileField1TSWithoutDAS::setFieldProfile ( const MEDCouplingFieldDouble field,
const MEDFileMesh mesh,
int  meshDimRelToMax,
const DataArrayInt profile,
MEDFieldFieldGlobsReal glob 
) throw (INTERP_KERNEL::Exception)
int MEDFileField1TSWithoutDAS::getNonEmptyLevels ( const char *  mname,
std::vector< int > &  levs 
) const throw (INTERP_KERNEL::Exception)

This method has one input 'mname'. It can be null if the user is the general case where there is only one meshName lying on 'this' This method returns two things.

  • The absolute dimension of 'this' in first parameter.
  • The available ext levels relative to the absolute dimension returned in first parameter. These relative levels are relative to the first output parameter. The values in 'levs' will be returned in decreasing order.

This method is designed for MEDFileField1TS instances that have a discritization ON_CELLS, ON_GAUSS_NE and ON_GAUSS. Only these 3 discretizations will be taken into account here.

If 'this' is empty this method will throw an INTERP_KERNEL::Exception. If there is only node fields defined in 'this' -1 is returned and 'levs' output parameter will be empty. In this case the caller has to know the underlying mesh it refers to. By defaut it is the level 0 of the corresponding mesh.

This method is usefull to make the link between meshDimension of the underlying mesh in 'this' and the levels on 'this'. It is possible (even if it is not common) that the highest level in 'this' were not equal to the meshDimension of the underlying mesh in 'this'.

Let's consider the typical following case :

  • a mesh 'm1' has a meshDimension 3 and has the following non empty levels [0,-1,-2] for example 'm1' lies on TETRA4, HEXA8 TRI3 and SEG2
  • 'f1' lies on 'm1' and is defined on 3D and 1D cells for example TETRA4 and SEG2
  • 'f2' lies on 'm1' too and is defined on 2D and 1D cells for example TRI3 and SEG2

In this case f1->getNonEmptyLevelsExt will return (3,[0,-2]) and f2->getNonEmptyLevelsExt will return (2,[0,-1])

To retrieve the highest level of f1 it should be done, f1->getFieldAtLevel(ON_CELLS,3-3+0);//absDim-meshDim+relativeLev To retrieve the lowest level of f1 it should be done, f1->getFieldAtLevel(ON_CELLS,3-3+(-2));//absDim-meshDim+relativeLev To retrieve the highest level of f2 it should be done, f1->getFieldAtLevel(ON_CELLS,2-3+0);//absDim-meshDim+relativeLev To retrieve the lowest level of f2 it should be done, f1->getFieldAtLevel(ON_CELLS,2-3+(-1));//absDim-meshDim+relativeLev

References INTERP_KERNEL::NORM_ERROR.

std::vector< TypeOfField > MEDFileField1TSWithoutDAS::getTypesOfFieldAvailable ( ) const throw (INTERP_KERNEL::Exception)
std::vector< std::vector< std::pair< int, int > > > MEDFileField1TSWithoutDAS::getFieldSplitedByType ( const char *  mname,
std::vector< INTERP_KERNEL::NormalizedCellType > &  types,
std::vector< std::vector< TypeOfField > > &  typesF,
std::vector< std::vector< std::string > > &  pfls,
std::vector< std::vector< std::string > > &  locs 
) const throw (INTERP_KERNEL::Exception)

entry point for users that want to iterate into MEDFile DataStructure without any overhead.

References _field_per_mesh, and getMeshIdFromMeshName().

Referenced by ParaMEDMEM::MEDFileFieldMultiTSWithoutDAS::getFieldSplitedByType().

std::vector< std::vector< DataArrayDouble * > > MEDFileField1TSWithoutDAS::getFieldSplitedByType2 ( const char *  mname,
std::vector< INTERP_KERNEL::NormalizedCellType > &  types,
std::vector< std::vector< TypeOfField > > &  typesF,
std::vector< std::vector< std::string > > &  pfls,
std::vector< std::vector< std::string > > &  locs 
) const throw (INTERP_KERNEL::Exception)

entry point for users that want to iterate into MEDFile DataStructure with a reduced overhead because output arrays are extracted (created) specially for the call of this method. That's why the DataArrayDouble instance in returned vector of vector should be dealed by the caller.

References _arr, _field_per_mesh, and getMeshIdFromMeshName().

Referenced by ParaMEDMEM::MEDFileFieldMultiTSWithoutDAS::getFieldSplitedByType2().

MEDCouplingFieldDouble * MEDFileField1TSWithoutDAS::getFieldAtLevel ( TypeOfField  type,
int  meshDimRelToMax,
const char *  mName,
int  renumPol,
const MEDFieldFieldGlobsReal glob 
) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDouble * MEDFileField1TSWithoutDAS::getFieldOnMeshAtLevel ( TypeOfField  type,
int  meshDimRelToMax,
int  renumPol,
const MEDFieldFieldGlobsReal glob,
const MEDFileMesh mesh 
) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDouble * MEDFileField1TSWithoutDAS::getFieldAtTopLevel ( TypeOfField  type,
const char *  mName,
int  renumPol,
const MEDFieldFieldGlobsReal glob 
) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDouble * MEDFileField1TSWithoutDAS::getFieldOnMeshAtLevel ( TypeOfField  type,
int  renumPol,
const MEDFieldFieldGlobsReal glob,
const MEDCouplingMesh mesh,
const DataArrayInt cellRenum,
const DataArrayInt nodeRenum 
) const throw (INTERP_KERNEL::Exception)
DataArrayDouble * MEDFileField1TSWithoutDAS::getFieldWithProfile ( TypeOfField  type,
int  meshDimRelToMax,
const MEDFileMesh mesh,
DataArrayInt *&  pfl,
const MEDFieldFieldGlobsReal glob 
) const throw (INTERP_KERNEL::Exception)
DataArrayDouble * MEDFileField1TSWithoutDAS::getUndergroundDataArray ( ) const throw (INTERP_KERNEL::Exception)

This method retrieves direct access to the underground ParaMEDMEM::DataArrayDouble instance. The returned array is not a newly created array so it should not be dealed by the caller. This method allows to the user a direct access to the values. This method is quite unusable if there is more than a nodal field or a cell field on single geometric cell type.

References _arr.

DataArrayDouble * MEDFileField1TSWithoutDAS::getUndergroundDataArrayExt ( std::vector< std::pair< std::pair< INTERP_KERNEL::NormalizedCellType, int >, std::pair< int, int > > > &  entries) const throw (INTERP_KERNEL::Exception)

This method returns an array that the caller must deal with (contrary to those returned by MEDFileField1TSWithoutDAS::getUndergroundDataArray method). The returned array is the result of the aggregation of all sub arrays stored in the MED file. So to allow the caller to select the output param 'entries' is returned. This output param is a vector of a pair of 2 pairs. The first pair of pair informs of the geometric type it refers to and the discretization id attached to it. The second pair of pair precise the range [begin,end) into the returned array. This method makes the hypothesis that the field lies only on one mesh. If it is not the case an exception will be thrown.

References _field_per_mesh.

Referenced by ParaMEDMEM::MEDFileFieldMultiTSWithoutDAS::getUndergroundDataArrayExt().

int MEDFileField1TSWithoutDAS::addNewEntryIfNecessary ( const MEDCouplingMesh mesh) throw (INTERP_KERNEL::Exception)
protected
int MEDFileField1TSWithoutDAS::getMeshIdFromMeshName ( const char *  mName) const throw (INTERP_KERNEL::Exception)
protected
Parameters
[in]mNamespecifies the underlying mesh name. This value can be pointer 0 for users that do not deal with fields on multi mesh.

Referenced by getFieldSplitedByType(), and getFieldSplitedByType2().

MEDFileFieldPerMeshPerTypePerDisc * MEDFileField1TSWithoutDAS::getLeafGivenMeshAndTypeAndLocId ( const char *  mName,
INTERP_KERNEL::NormalizedCellType  typ,
int  locId 
) throw (INTERP_KERNEL::Exception)
protected
Parameters
[in]mNamespecifies the underlying mesh name. This value can be pointer 0 for users that do not deal with fields on multi mesh.
[in]typis for the geometric cell type (or INTERP_KERNEL::NORM_ERROR for node field) entry to find the right MEDFileFieldPerMeshPerTypePerDisc instance to set.
[in]locIdis the localization id to find the right MEDFileFieldPerMeshPerTypePerDisc instance to set. It corresponds to the position of pfls[std::distance(types.begin(),std::find(types.begin(),typ)] vector in MEDFileField1TSWithoutDAS::getFieldSplitedByType. For non gausspoints field users, the value is 0.
const MEDFileFieldPerMeshPerTypePerDisc * MEDFileField1TSWithoutDAS::getLeafGivenMeshAndTypeAndLocId ( const char *  mName,
INTERP_KERNEL::NormalizedCellType  typ,
int  locId 
) const throw (INTERP_KERNEL::Exception)
protected
Parameters
[in]mNamespecifies the underlying mesh name. This value can be pointer 0 for users that do not deal with fields on multi mesh.
[in]typis for the geometric cell type (or INTERP_KERNEL::NORM_ERROR for node field) entry to find the right MEDFileFieldPerMeshPerTypePerDisc instance to set.
[in]locIdis the localization id to find the right MEDFileFieldPerMeshPerTypePerDisc instance to set. It corresponds to the position of pfls[std::distance(types.begin(),std::find(types.begin(),typ)] vector in MEDFileField1TSWithoutDAS::getFieldSplitedByType. For non gausspoints field users, the value is 0.
DataArrayDouble * MEDFileField1TSWithoutDAS::getOrCreateAndGetArray ( )
const DataArrayDouble * MEDFileField1TSWithoutDAS::getOrCreateAndGetArray ( ) const

Member Data Documentation

std::string ParaMEDMEM::MEDFileField1TSWithoutDAS::_dt_unit
protected

Referenced by simpleRepr().

MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > ParaMEDMEM::MEDFileField1TSWithoutDAS::_arr
protected
std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > > ParaMEDMEM::MEDFileField1TSWithoutDAS::_field_per_mesh
protected
int ParaMEDMEM::MEDFileField1TSWithoutDAS::_csit
mutableprotected

only useable on reading

int ParaMEDMEM::MEDFileField1TSWithoutDAS::_field_type
mutableprotected

only useable on reading. 0 is for float, 1 for int32, 2 for int64

int ParaMEDMEM::MEDFileField1TSWithoutDAS::_iteration
protected
int ParaMEDMEM::MEDFileField1TSWithoutDAS::_order
protected
double ParaMEDMEM::MEDFileField1TSWithoutDAS::_dt
protected

Referenced by simpleRepr().

Copyright © 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS