Version: 6.3.1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

ParaMEDMEM.MEDFileFieldPerMesh Class Reference

#include <MEDFileField.hxx>

Inheritance diagram for ParaMEDMEM.MEDFileFieldPerMesh:
Inheritance graph

Public Member Functions

void copyTinyInfoFrom (const MEDCouplingMesh *mesh) throw (INTERP_KERNEL::Exception)
void assignFieldProfile (const std::vector< int > &code, const std::vector< DataArrayInt * > &globIdsPerType, const std::vector< DataArrayInt * > &idsPerType, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobs &glob) throw (INTERP_KERNEL::Exception)
void assignFieldProfileGeneral (const std::vector< int > &code, const std::vector< DataArrayInt * > &globIdsPerType, const std::vector< DataArrayInt * > &idsPerType, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobs &glob) throw (INTERP_KERNEL::Exception)
void assignFieldNoProfileNoRenum (const std::vector< int > &code, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobs &glob) throw (INTERP_KERNEL::Exception)
void assignNodeFieldNoProfile (const MEDCouplingFieldDouble *field, MEDFieldFieldGlobs &glob) throw (INTERP_KERNEL::Exception)
void assignNodeFieldProfile (const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobs &glob) throw (INTERP_KERNEL::Exception)
void finishLoading (med_idt fid) throw (INTERP_KERNEL::Exception)
void writeLL (med_idt fid) const throw (INTERP_KERNEL::Exception)
void getDimension (int &dim) const
double getTime () const
int getIteration () const
int getOrder () const
int getMeshIteration () const
int getMeshOrder () const
const std::string & getDtUnit () const
std::string getName () const
std::string getMeshName () const
int getNumberOfComponents () const
const std::vector< std::string > & getInfo () const
std::vector< std::string > getPflsReallyUsed () const
std::vector< std::string > getLocsReallyUsed () const
MEDCouplingFieldDoublegetFieldOnMeshAtLevel (TypeOfField type, const MEDFieldFieldGlobs *glob, const MEDCouplingMesh *mesh, bool &isPfl) const throw (INTERP_KERNEL::Exception)
DataArrayDoublegetFieldOnMeshAtLevelWithPfl (TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFieldFieldGlobs *glob) const throw (INTERP_KERNEL::Exception)

Static Public Member Functions

static MEDFileFieldPerMeshNew (MEDFileField1TSWithoutDAS *fath, const MEDCouplingMesh *mesh)
static MEDFileFieldPerMeshNew (MEDFileField1TSWithoutDAS *fath, int meshCsit, int meshIteration, int meshOrder)

Private Member Functions

int addNewEntryIfNecessary (INTERP_KERNEL::NormalizedCellType type)
MEDCouplingFieldDoublefinishField (TypeOfField type, const MEDFieldFieldGlobs *glob, const std::vector< const DataArrayDouble * > &dads, const std::vector< int > &locs, const MEDCouplingMesh *mesh, bool &isPfl) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublefinishField2 (TypeOfField type, const MEDFieldFieldGlobs *glob, const std::vector< const DataArrayDouble * > &dads, const std::vector< int > &locs, const MEDCouplingMesh *mesh, const DataArrayInt *da, bool &isPfl) const throw (INTERP_KERNEL::Exception)
MEDCouplingFieldDoublefinishField3 (const MEDFieldFieldGlobs *glob, const std::vector< const DataArrayDouble * > &dads, const std::vector< int > &locs, const MEDCouplingMesh *mesh, const DataArrayInt *da, bool &isPfl) const throw (INTERP_KERNEL::Exception)
DataArrayDoublefinishField4 (const std::vector< const DataArrayDouble * > &dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const throw (INTERP_KERNEL::Exception)
 MEDFileFieldPerMesh (MEDFileField1TSWithoutDAS *fath, int meshCsit, int meshIteration, int meshOrder)
 MEDFileFieldPerMesh (MEDFileField1TSWithoutDAS *fath, const MEDCouplingMesh *mesh)

Static Private Member Functions

static void SortArraysPerType (const MEDFieldFieldGlobs *glob, const std::vector< INTERP_KERNEL::NormalizedCellType > &geoTypes, const std::vector< const DataArrayDouble * > &dads, const std::vector< const DataArrayInt * > &pfls, const std::vector< int > &locs, std::vector< int > &code, std::vector< DataArrayInt * > &notNullPfls)
static int ComputeNbOfElems (const MEDFieldFieldGlobs *glob, const std::vector< const DataArrayDouble * > &dads, const std::vector< int > &locs) throw (INTERP_KERNEL::Exception)

Private Attributes

std::string _mesh_name
int _mesh_iteration
int _mesh_order
int _mesh_csit
MEDFileField1TSWithoutDAS_father
std::vector
< MEDCouplingAutoRefCountObjectPtr
< MEDFileFieldPerMeshPerType > > 
_field_pm_pt

Constructor & Destructor Documentation

MEDFileFieldPerMesh::MEDFileFieldPerMesh ( MEDFileField1TSWithoutDAS fath,
int  meshCsit,
int  meshIteration,
int  meshOrder 
) [private]
MEDFileFieldPerMesh::MEDFileFieldPerMesh ( MEDFileField1TSWithoutDAS fath,
const MEDCouplingMesh mesh 
) [private]

Member Function Documentation

MEDFileFieldPerMesh * MEDFileFieldPerMesh::New ( MEDFileField1TSWithoutDAS fath,
const MEDCouplingMesh mesh 
) [static]
MEDFileFieldPerMesh * MEDFileFieldPerMesh::New ( MEDFileField1TSWithoutDAS fath,
int  meshCsit,
int  meshIteration,
int  meshOrder 
) [static]
void MEDFileFieldPerMesh::copyTinyInfoFrom ( const MEDCouplingMesh mesh) throw (INTERP_KERNEL::Exception)

References MED_test2.mesh.

void MEDFileFieldPerMesh::assignFieldProfile ( const std::vector< int > &  code,
const std::vector< DataArrayInt * > &  globIdsPerType,
const std::vector< DataArrayInt * > &  idsPerType,
const MEDCouplingFieldDouble field,
MEDFieldFieldGlobs glob 
) throw (INTERP_KERNEL::Exception)
void MEDFileFieldPerMesh::assignFieldProfileGeneral ( const std::vector< int > &  code,
const std::vector< DataArrayInt * > &  globIdsPerType,
const std::vector< DataArrayInt * > &  idsPerType,
const MEDCouplingFieldDouble field,
MEDFieldFieldGlobs glob 
) throw (INTERP_KERNEL::Exception)

This method is the most general one. No optimization is done here.

References MED_test2.field, batchmode_medcorba_test.nbOfTypes, and medClient_test.type.

void MEDFileFieldPerMesh::assignFieldNoProfileNoRenum ( const std::vector< int > &  code,
const MEDCouplingFieldDouble field,
MEDFieldFieldGlobs glob 
) throw (INTERP_KERNEL::Exception)
void MEDFileFieldPerMesh::assignNodeFieldNoProfile ( const MEDCouplingFieldDouble field,
MEDFieldFieldGlobs glob 
) throw (INTERP_KERNEL::Exception)
void MEDFileFieldPerMesh::assignNodeFieldProfile ( const DataArrayInt pfl,
const MEDCouplingFieldDouble field,
MEDFieldFieldGlobs glob 
) throw (INTERP_KERNEL::Exception)
void MEDFileFieldPerMesh::finishLoading ( med_idt  fid) throw (INTERP_KERNEL::Exception)
void MEDFileFieldPerMesh::writeLL ( med_idt  fid) const throw (INTERP_KERNEL::Exception)
void MEDFileFieldPerMesh::getDimension ( int dim) const
double MEDFileFieldPerMesh::getTime ( ) const
int MEDFileFieldPerMesh::getIteration ( ) const
int MEDFileFieldPerMesh::getOrder ( ) const
int ParaMEDMEM.MEDFileFieldPerMesh.getMeshIteration ( ) const
int ParaMEDMEM.MEDFileFieldPerMesh.getMeshOrder ( ) const
const std::string & MEDFileFieldPerMesh::getDtUnit ( ) const
std::string MEDFileFieldPerMesh::getName ( ) const
std::string ParaMEDMEM.MEDFileFieldPerMesh.getMeshName ( ) const
int MEDFileFieldPerMesh::getNumberOfComponents ( ) const
const std::vector< std::string > & MEDFileFieldPerMesh::getInfo ( ) const
std::vector< std::string > MEDFileFieldPerMesh::getPflsReallyUsed ( ) const
std::vector< std::string > MEDFileFieldPerMesh::getLocsReallyUsed ( ) const
MEDCouplingFieldDouble * MEDFileFieldPerMesh::getFieldOnMeshAtLevel ( TypeOfField  type,
const MEDFieldFieldGlobs glob,
const MEDCouplingMesh mesh,
bool &  isPfl 
) const throw (INTERP_KERNEL::Exception)
DataArrayDouble * MEDFileFieldPerMesh::getFieldOnMeshAtLevelWithPfl ( TypeOfField  type,
const MEDCouplingMesh mesh,
DataArrayInt *&  pfl,
const MEDFieldFieldGlobs glob 
) const throw (INTERP_KERNEL::Exception)
int MEDFileFieldPerMesh::addNewEntryIfNecessary ( INTERP_KERNEL::NormalizedCellType  type) [private]
MEDCouplingFieldDouble * MEDFileFieldPerMesh::finishField ( TypeOfField  type,
const MEDFieldFieldGlobs glob,
const std::vector< const DataArrayDouble * > &  dads,
const std::vector< int > &  locs,
const MEDCouplingMesh mesh,
bool &  isPfl 
) const throw (INTERP_KERNEL::Exception) [private]
MEDCouplingFieldDouble * MEDFileFieldPerMesh::finishField2 ( TypeOfField  type,
const MEDFieldFieldGlobs glob,
const std::vector< const DataArrayDouble * > &  dads,
const std::vector< int > &  locs,
const MEDCouplingMesh mesh,
const DataArrayInt da,
bool &  isPfl 
) const throw (INTERP_KERNEL::Exception) [private]

This method is an extension of MEDFileFieldPerMesh.finishField method. It deals with profiles. This method should be called when type is different from ON_NODES. No check of this is performed. 'da' array contains an array in old2New style to be applyied to mesh to obtain the right support. The order of cells in the returned field is those imposed by the profile.

References ParaMEDMEM.MEDCouplingFieldDouble.getNumberOfTuples(), MED_test2.mesh, testMEDMEM.ret, and medClient_test.type.

MEDCouplingFieldDouble * MEDFileFieldPerMesh::finishField3 ( const MEDFieldFieldGlobs glob,
const std::vector< const DataArrayDouble * > &  dads,
const std::vector< int > &  locs,
const MEDCouplingMesh mesh,
const DataArrayInt da,
bool &  isPfl 
) const throw (INTERP_KERNEL::Exception) [private]
DataArrayDouble * MEDFileFieldPerMesh::finishField4 ( const std::vector< const DataArrayDouble * > &  dads,
const DataArrayInt pflIn,
int  nbOfElems,
DataArrayInt *&  pflOut 
) const throw (INTERP_KERNEL::Exception) [private]
void MEDFileFieldPerMesh::SortArraysPerType ( const MEDFieldFieldGlobs glob,
const std::vector< INTERP_KERNEL::NormalizedCellType > &  geoTypes,
const std::vector< const DataArrayDouble * > &  dads,
const std::vector< const DataArrayInt * > &  pfls,
const std::vector< int > &  locs,
std::vector< int > &  code,
std::vector< DataArrayInt * > &  notNullPfls 
) [static, private]

geoTypes,dads,pfls,locs are input parameters. They should have the same size. Before the call of this method 'geoTypes','dads','pfls','locs' must be reorganized so that types in geoTypes are contiguous and ordered following typmai2 array. It returns 2 output vectors :

  • 'code' of size 3*sz where sz is the number of different values into 'geoTypes'
  • 'notNullPfls' contains sz2 values that are extracted from 'pfls' in which null profiles have been removed. 'code' and 'notNullPfls' are in MEDCouplingUMesh.checkTypeConsistencyAndContig format.

References ParaMEDMEM.DataArrayInt.Aggregate(), and ParaMEDMEM.MEDFileFieldPerMesh.ComputeNbOfElems().

int MEDFileFieldPerMesh::ComputeNbOfElems ( const MEDFieldFieldGlobs glob,
const std::vector< const DataArrayDouble * > &  dads,
const std::vector< int > &  locs 
) throw (INTERP_KERNEL::Exception) [static, private]

'dads' and 'locs' are input parameters that should have same size sz. sz should be >=1.

References testMEDMEM.ret.


Field Documentation

Copyright © 2007-2011 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