Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA Class Referenceabstract
Inheritance diagram for MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA:
Collaboration diagram for MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA:

Public Member Functions

void accept (MEDFileFieldVisitor &visitor) const
 
bool allocIfNecessaryTheArrayToReceiveDataFromFile ()
 
void allocNotFromFile (int newNbOfTuples)
 
void changeLocsRefsNamesGen2 (const std::vector< std::pair< std::vector< std::string >, std::string > > &mapOfModif)
 
bool changeMeshNames (const std::vector< std::pair< std::string, std::string > > &modifTab)
 
void changePflsRefsNamesGen2 (const std::vector< std::pair< std::vector< std::string >, std::string > > &mapOfModif)
 
void convertMedBallIntoClassic ()
 
int copyTinyInfoFrom (const MEDCouplingFieldDouble *field, const DataArray *arr)
 
virtual DataArraycreateNewEmptyDataArrayInstance () const =0
 
virtual
MEDFileAnyTypeField1TSWithoutSDA
deepCopy () const =0
 
void deepCpyLeavesFrom (const MEDFileAnyTypeField1TSWithoutSDA &other)
 
MEDCouplingFieldDoublefieldOnMesh (const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto< DataArray > &arrOut, const MEDFileFieldNameScope &nasc) const
 
void fillIteration (std::pair< int, int > &p) const
 
void fillTypesOfFieldAvailable (std::vector< TypeOfField > &types) const
 
int getDimension () const
 
std::vector< const
BigMemoryObject * > 
getDirectChildrenWithNull () const
 
std::pair< int, int > getDtIt () const
 
MEDCouplingFieldDoublegetFieldAtLevel (TypeOfField type, int meshDimRelToMax, const std::string &mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto< DataArray > &arrOut, const MEDFileFieldNameScope &nasc) const
 
MEDCouplingFieldDoublegetFieldAtTopLevel (TypeOfField type, const std::string &mName, int renumPol, const MEDFileFieldGlobsReal *glob, MCAuto< DataArray > &arrOut, const MEDFileFieldNameScope &nasc) const
 
MEDCouplingFieldDoublegetFieldOnMeshAtLevel (TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDFileMesh *mesh, MCAuto< DataArray > &arrOut, const MEDFileFieldNameScope &nasc) const
 
MEDCouplingFieldDoublegetFieldOnMeshAtLevel (TypeOfField type, int renumPol, const MEDFileFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayInt *cellRenum, const DataArrayInt *nodeRenum, MCAuto< DataArray > &arrOut, const MEDFileFieldNameScope &nasc) const
 
std::vector< std::vector
< std::pair< int, int > > > 
getFieldSplitedByType (const std::string &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
 
DataArraygetFieldWithProfile (TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFileFieldGlobsReal *glob, const MEDFileFieldNameScope &nasc) const
 
std::size_t getHeapMemorySizeWithoutChildren () const
 
const std::vector< std::string > & getInfo () const
 
std::vector< std::string > & getInfo ()
 
int getIteration () const
 
MEDFileFieldPerMeshPerTypePerDisc * getLeafGivenMeshAndTypeAndLocId (const std::string &mName, INTERP_KERNEL::NormalizedCellType typ, int locId)
 
const
MEDFileFieldPerMeshPerTypePerDisc * 
getLeafGivenMeshAndTypeAndLocId (const std::string &mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const
 
std::vector< std::string > getLocsReallyUsed2 () const
 
std::vector< std::string > getLocsReallyUsedMulti2 () const
 
int getMeshIteration () const
 
int getMeshOrder () const
 
void getMeshSENames (std::vector< std::pair< std::string, std::string > > &ps) const
 
int getNonEmptyLevels (const std::string &mname, std::vector< int > &levs) const
 
int getNumberOfComponents () const
 
virtual DataArraygetOrCreateAndGetArray ()=0
 
virtual const DataArraygetOrCreateAndGetArray () const =0
 
int getOrder () const
 
std::vector< std::string > getPflsReallyUsed2 () const
 
std::vector< std::string > getPflsReallyUsedMulti2 () const
 
double getTime (int &iteration, int &order) const
 
std::vector< TypeOfFieldgetTypesOfFieldAvailable () const
 
virtual const char * getTypeStr () const =0
 
virtual DataArraygetUndergroundDataArray () const =0
 
virtual DataArraygetUndergroundDataArrayExt (std::vector< std::pair< std::pair< INTERP_KERNEL::NormalizedCellType, int >, std::pair< int, int > > > &entries) const =0
 
bool isDealingTS (int iteration, int order) const
 
int keepOnlyGaussDiscretization (std::size_t idOfDisc, std::vector< std::pair< int, int > > &its)
 
void keepOnlyOnSE (const std::string &seName)
 
int keepOnlySpatialDiscretization (TypeOfField tof, std::vector< std::pair< int, int > > &its)
 
void keepOnlyStructureElements ()
 
void killStructureElements ()
 
void loadBigArraysRecursively (med_idt fid, const MEDFileFieldNameScope &nasc)
 
void loadBigArraysRecursivelyIfNecessary (med_idt fid, const MEDFileFieldNameScope &nasc)
 
void loadOnlyStructureOfDataRecursively (med_idt fid, const MEDFileFieldNameScope &nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities)
 
void loadStructureAndBigArraysRecursively (med_idt fid, const MEDFileFieldNameScope &nasc, const MEDFileMeshes *ms, const MEDFileEntities *entities)
 
void makeReduction (INTERP_KERNEL::NormalizedCellType ct, TypeOfField tof, const DataArrayInt *pfl)
 
 MEDFileAnyTypeField1TSWithoutSDA ()
 
 MEDFileAnyTypeField1TSWithoutSDA (const std::string &fieldName, const std::string &meshName, int csit, int iteration, int order)
 
bool onlyStructureElements () const
 
bool presenceOfMultiDiscPerGeoType () const
 
bool presenceOfStructureElements () const
 
bool renumberEntitiesLyingOnMesh (const std::string &meshName, const std::vector< int > &oldCode, const std::vector< int > &newCode, const DataArrayInt *renumO2N, MEDFileFieldGlobsReal &glob)
 
virtual void setArray (DataArray *arr)=0
 
void setFieldNoProfileSBT (const MEDCouplingFieldDouble *field, const DataArray *arr, MEDFileFieldGlobsReal &glob, const MEDFileFieldNameScope &nasc)
 
void setFieldProfile (const MEDCouplingFieldDouble *field, const DataArray *arrOfVals, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFileFieldGlobsReal &glob, const MEDFileFieldNameScope &nasc)
 
void setInfo (const std::vector< std::string > &infos)
 
void setTime (int iteration, int order, double val)
 
virtual
MEDFileAnyTypeField1TSWithoutSDA
shallowCpy () const =0
 
virtual void simpleRepr (int bkOffset, std::ostream &oss, int f1tsId) const
 
virtual std::vector< MCAuto
< MEDFileAnyTypeField1TSWithoutSDA > > 
splitComponents () const
 
std::vector< MCAuto
< MEDFileAnyTypeField1TSWithoutSDA > > 
splitDiscretizations () const
 
std::vector< MCAuto
< MEDFileAnyTypeField1TSWithoutSDA > > 
splitMultiDiscrPerGeoTypes () const
 
void unloadArrays ()
 
void writeLL (med_idt fid, const MEDFileWritable &opts, const MEDFileFieldNameScope &nasc) const
 
- Public Member Functions inherited from MEDCoupling::MEDFileFieldNameScope
void copyNameScope (const MEDFileFieldNameScope &other)
 
std::string getDtUnit () const
 
std::string getMeshName () const
 
std::string getName () const
 
 MEDFileFieldNameScope ()
 
 MEDFileFieldNameScope (const std::string &fieldName, const std::string &meshName)
 
void setDtUnit (const std::string &dtUnit)
 
void setMeshName (const std::string &meshName)
 
void setName (const std::string &fieldName)
 

Public Attributes

int _csit
 
int _nb_of_tuples_to_be_allocated
 

Protected Member Functions

int addNewEntryIfNecessary (const MEDCouplingMesh *mesh)
 
int getMeshIdFromMeshName (const std::string &mName) const
 
void updateData (int newLgth, const std::vector< std::pair< int, int > > &oldStartStops)
 
- Protected Member Functions inherited from MEDCoupling::RefCountObject
 RefCountObject ()
 
 RefCountObject (const RefCountObject &other)
 
virtual ~RefCountObject ()
 
- Protected Member Functions inherited from MEDCoupling::RefCountObjectOnly
 RefCountObjectOnly ()
 
 RefCountObjectOnly (const RefCountObjectOnly &other)
 
virtual ~RefCountObjectOnly ()
 

Protected Attributes

double _dt
 
std::vector< MCAuto
< MEDFileFieldPerMesh > > 
_field_per_mesh
 
int _iteration
 
int _order
 
- Protected Attributes inherited from MEDCoupling::MEDFileFieldNameScope
std::string _dt_unit
 
std::string _mesh_name
 
std::string _name
 

Additional Inherited Members

- Static Public Member Functions inherited from MEDCoupling::BigMemoryObject
static std::size_t GetHeapMemorySizeOfObjs (const std::vector< const BigMemoryObject * > &objs)
 

Detailed Description

SDA is for Shared Data Arrays such as profiles.

Constructor & Destructor Documentation

MEDFileAnyTypeField1TSWithoutSDA::MEDFileAnyTypeField1TSWithoutSDA ( )
MEDFileAnyTypeField1TSWithoutSDA::MEDFileAnyTypeField1TSWithoutSDA ( const std::string &  fieldName,
const std::string &  meshName,
int  csit,
int  iteration,
int  order 
)

Member Function Documentation

void MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::setTime ( int  iteration,
int  order,
double  val 
)
int MEDFileAnyTypeField1TSWithoutSDA::getDimension ( ) const

Returns the maximal dimension of supporting elements. Returns -2 if this is empty. Returns -1 if this in on nodes.

Returns
int - the dimension of this.

References _field_per_mesh.

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::getDimension(), and getFieldAtTopLevel().

bool MEDFileAnyTypeField1TSWithoutSDA::changeMeshNames ( const std::vector< std::pair< std::string, std::string > > &  modifTab)
int MEDFileAnyTypeField1TSWithoutSDA::getMeshIteration ( ) const

Returns the number of iteration of the state of underlying mesh.

Returns
int - the iteration number.
Exceptions
If_field_per_mesh.empty()

References _field_per_mesh.

Referenced by getFieldAtLevel(), getFieldAtTopLevel(), and MEDCoupling::MEDFileAnyTypeField1TS::getMeshIteration().

int MEDFileAnyTypeField1TSWithoutSDA::getMeshOrder ( ) const

Returns the order number of iteration of the state of underlying mesh.

Returns
int - the order number.
Exceptions
If_field_per_mesh.empty()

References _field_per_mesh.

Referenced by getFieldAtLevel(), getFieldAtTopLevel(), and MEDCoupling::MEDFileAnyTypeField1TS::getMeshOrder().

bool MEDFileAnyTypeField1TSWithoutSDA::isDealingTS ( int  iteration,
int  order 
) const

Checks if this field is tagged by a given iteration number and a given iteration order number.

Parameters
[in]iteration- the iteration number of interest.
[in]order- the iteration order number of interest.
Returns
bool - true if this->getIteration() == iteration && this->getOrder() == order.

References _iteration, and _order.

Referenced by MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::getTimeStepPos(), and MEDCoupling::MEDFileAnyTypeField1TS::isDealingTS().

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

Returns number of iteration and order number of iteration when this field has been calculated.

Returns
std::pair<int,int> - a pair of the iteration number and the iteration order number.

References fillIteration().

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::getDtIt().

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

Returns number of iteration and order number of iteration when this field has been calculated.

Parameters
[in,out]p- a pair returning the iteration number and the iteration order number.

References _iteration, and _order.

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::fillIteration(), and getDtIt().

void MEDFileAnyTypeField1TSWithoutSDA::fillTypesOfFieldAvailable ( std::vector< TypeOfField > &  types) const

Returns all types of spatial discretization of this field.

Parameters
[in,out]types- a sequence of types of this field.

References _field_per_mesh.

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::fillTypesOfFieldAvailable(), and getTypesOfFieldAvailable().

std::vector< TypeOfField > MEDFileAnyTypeField1TSWithoutSDA::getTypesOfFieldAvailable ( ) const

Returns all types of spatial discretization of this field.

Returns
std::vector<TypeOfField> - a sequence of types of spatial discretization of this field.

References fillTypesOfFieldAvailable().

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::getTypesOfFieldAvailable(), and MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::splitDiscretizations().

std::vector< std::string > MEDFileAnyTypeField1TSWithoutSDA::getPflsReallyUsed2 ( ) const
std::vector< std::string > MEDFileAnyTypeField1TSWithoutSDA::getLocsReallyUsed2 ( ) const
std::vector< std::string > MEDFileAnyTypeField1TSWithoutSDA::getPflsReallyUsedMulti2 ( ) const
std::vector< std::string > MEDFileAnyTypeField1TSWithoutSDA::getLocsReallyUsedMulti2 ( ) const
void MEDFileAnyTypeField1TSWithoutSDA::changePflsRefsNamesGen2 ( const std::vector< std::pair< std::vector< std::string >, std::string > > &  mapOfModif)
void MEDFileAnyTypeField1TSWithoutSDA::changeLocsRefsNamesGen2 ( const std::vector< std::pair< std::vector< std::string >, std::string > > &  mapOfModif)
int MEDFileAnyTypeField1TSWithoutSDA::getNonEmptyLevels ( const std::string &  mname,
std::vector< int > &  levs 
) const

Returns dimensions of mesh elements this field lies on. The returned value is a maximal absolute dimension and values returned via the out parameter levs are dimensions relative to the maximal absolute dimension.
This method is designed for MEDFileField1TS instances that have a discretization ON_CELLS, ON_GAUSS_PT, ON_GAUSS_NE. Only these 3 discretizations will be taken into account here. If this is ON_NODES, -1 is returned and levs are empty.
This method is useful to make the link between the dimension of the underlying mesh and the levels of this, because it is possible that the highest dimension of this field is not equal to the dimension of the underlying mesh.

Let's consider the following case:

  • mesh m1 has a meshDimension 3 and has non empty levels [0,-1,-2] with elements TETRA4, HEXA8, TRI3 and SEG2.
  • field f1 lies on m1 and is defined on 3D and 1D elements TETRA4 and SEG2.
  • field f2 lies on m1 and is defined on 2D and 1D elements TRI3 and SEG2.

In this case f1->getNonEmptyLevels() returns (3,[0,-2]) and f2->getNonEmptyLevels() returns (2,[0,-1]).
The returned values can be used for example to retrieve a MEDCouplingFieldDouble lying on elements of a certain relative level by calling getFieldAtLevel(). meshDimRelToMax parameter of getFieldAtLevel() is computed basing on the returned values as this: meshDimRelToMax = absDim - meshDim + relativeLev . For example
to retrieve the highest level of f1: f1->getFieldAtLevel( ON_CELLS, 3-3+0 ); // absDim - meshDim + relativeLev
to retrieve the lowest level of f1: f1->getFieldAtLevel( ON_CELLS, 3-3+(-2) );
to retrieve the highest level of f2: f2->getFieldAtLevel( ON_CELLS, 2-3+0 );
to retrieve the lowest level of f2: f2->getFieldAtLevel( ON_CELLS, 2-3+(-1) ).

Parameters
[in]mname- a name of a mesh of interest. It can be NULL, which is valid for the case with only one underlying mesh. (Actually, the number of meshes is not checked if mname == NULL).
[in,out]levs- a sequence returning the dimensions relative to the maximal absolute one. They are in decreasing order. This sequence is cleared before filling it in.
Returns
int - the maximal absolute dimension of elements this fields lies on.
Exceptions
Ifno field is lying on mname.

References _field_per_mesh, and INTERP_KERNEL::NORM_ERROR.

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::getNonEmptyLevels(), and MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::getNonEmptyLevels().

void MEDFileAnyTypeField1TSWithoutSDA::convertMedBallIntoClassic ( )
std::vector< std::vector< std::pair< int, int > > > MEDFileAnyTypeField1TSWithoutSDA::getFieldSplitedByType ( const std::string &  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

Returns all attributes of parts of this field lying on a given mesh. Each part differs from other ones by a type of supporting mesh entity. The i-th item of every of returned sequences refers to the i-th part of this field. Thus all sequences returned by this method are of the same length equal to number of different types of supporting entities.
A field part can include sub-parts with several different spatial discretizations, ON_CELLS and ON_GAUSS_PT for example. Hence, some of the returned sequences contains nested sequences, and an item of a nested sequence corresponds to a type of spatial discretization.
This method allows for iteration over MEDFile DataStructure without any overhead.

Parameters
[in]mname- a name of a mesh of interest. It can be NULL, which is valid for the case with only one underlying mesh. (Actually, the number of meshes is not checked if mname == NULL).
[in,out]types- a sequence of types of underlying mesh entities. A type per a field part is returned.
[in,out]typesF- a sequence of sequences of types of spatial discretizations. This sequence is of the same length as types.
[in,out]pfls- a sequence returning a profile name per each type of spatial discretization. A profile name can be empty. Length of this and of nested sequences is the same as that of typesF.
[in,out]locs- a sequence returning a localization name per each type of spatial discretization. A localization name can be empty. Length of this and of nested sequences is the same as that of typesF.
Returns
std::vector< std::vector< std::pair<int,int> > > - a sequence holding a range of ids of tuples within the data array, per each type of spatial discretization within one mesh entity type. Length of this and of nested sequences is the same as that of typesF.
Exceptions
Ifno field is lying on mname.

References _field_per_mesh.

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::getFieldSplitedByType(), MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::getFieldSplitedByType(), splitDiscretizations(), and splitMultiDiscrPerGeoTypes().

MEDFileFieldPerMeshPerTypePerDisc * MEDFileAnyTypeField1TSWithoutSDA::getLeafGivenMeshAndTypeAndLocId ( const std::string &  mName,
INTERP_KERNEL::NormalizedCellType  typ,
int  locId 
)
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 MEDFileField1TSWithoutSDA::getFieldSplitedByType. For non gausspoints field users, the value is 0.

References _field_per_mesh.

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::getLeafGivenMeshAndTypeAndLocId().

const MEDFileFieldPerMeshPerTypePerDisc * MEDFileAnyTypeField1TSWithoutSDA::getLeafGivenMeshAndTypeAndLocId ( const std::string &  mName,
INTERP_KERNEL::NormalizedCellType  typ,
int  locId 
) const
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 MEDFileField1TSWithoutSDA::getFieldSplitedByType. For non gausspoints field users, the value is 0.

References _field_per_mesh.

void MEDFileAnyTypeField1TSWithoutSDA::accept ( MEDFileFieldVisitor &  visitor) const

References _field_per_mesh.

int MEDFileAnyTypeField1TSWithoutSDA::getNumberOfComponents ( ) const
const std::vector< std::string > & MEDFileAnyTypeField1TSWithoutSDA::getInfo ( ) const
std::vector< std::string > & MEDFileAnyTypeField1TSWithoutSDA::getInfo ( )

Returns a mutable info on components of this field.

Returns
std::vector<std::string>& - a sequence of strings each being an information on i-th component.

References MEDCoupling::DataArray::getInfoOnComponents(), and getOrCreateAndGetArray().

bool MEDFileAnyTypeField1TSWithoutSDA::presenceOfMultiDiscPerGeoType ( ) const
bool MEDFileAnyTypeField1TSWithoutSDA::presenceOfStructureElements ( ) const

References _field_per_mesh.

bool MEDFileAnyTypeField1TSWithoutSDA::onlyStructureElements ( ) const

References _field_per_mesh.

void MEDFileAnyTypeField1TSWithoutSDA::killStructureElements ( )
void MEDFileAnyTypeField1TSWithoutSDA::keepOnlyStructureElements ( )
void MEDFileAnyTypeField1TSWithoutSDA::keepOnlyOnSE ( const std::string &  seName)
void MEDFileAnyTypeField1TSWithoutSDA::getMeshSENames ( std::vector< std::pair< std::string, std::string > > &  ps) const

References _field_per_mesh.

void MEDFileAnyTypeField1TSWithoutSDA::setInfo ( const std::vector< std::string > &  infos)

Change info on components in this.

Exceptions
Ifsize of infos is not equal to the number of components already in this.

References getOrCreateAndGetArray(), and MEDCoupling::DataArray::setInfoOnComponents().

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::setInfo().

std::size_t MEDFileAnyTypeField1TSWithoutSDA::getHeapMemorySizeWithoutChildren ( ) const
virtual
std::vector< const BigMemoryObject * > MEDFileAnyTypeField1TSWithoutSDA::getDirectChildrenWithNull ( ) const
virtual
int MEDFileAnyTypeField1TSWithoutSDA::copyTinyInfoFrom ( const MEDCouplingFieldDouble field,
const DataArray arr 
)

Copies tiny info and allocates this->_arr instance of DataArrayDouble to append data of a given MEDCouplingFieldDouble. So that the size of this->_arr becomes larger by the size of field. Returns an id of the first not filled tuple of this->_arr.

Parameters
[in]field- the field to copy the info on components and the name from.
Returns
int - the id of first not initialized tuple of this->_arr.
Exceptions
Ifthe name of field is empty.
Ifthe data array of field is not set.
Ifthis->_arr is already allocated but has different number of components than field.

References _dt, _iteration, _nb_of_tuples_to_be_allocated, _order, allocNotFromFile(), MEDCoupling::DataArray::getInfoOnComponents(), MEDCoupling::MEDCouplingField::getMesh(), MEDCoupling::MEDCouplingMesh::getName(), MEDCoupling::MEDCouplingField::getName(), MEDCoupling::DataArray::getNumberOfTuples(), getOrCreateAndGetArray(), MEDCoupling::MEDCouplingFieldT< T >::getTime(), MEDCoupling::MEDCouplingFieldT< T >::getTimeUnit(), MEDCoupling::DataArray::isAllocated(), MEDCoupling::DataArray::reAlloc(), MEDCoupling::MEDFileFieldNameScope::setDtUnit(), MEDCoupling::DataArray::setInfoAndChangeNbOfCompo(), MEDCoupling::MEDFileFieldNameScope::setMeshName(), and MEDCoupling::MEDFileFieldNameScope::setName().

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::copyTinyInfoFrom(), setFieldNoProfileSBT(), and setFieldProfile().

void MEDFileAnyTypeField1TSWithoutSDA::setFieldNoProfileSBT ( const MEDCouplingFieldDouble field,
const DataArray arr,
MEDFileFieldGlobsReal glob,
const MEDFileFieldNameScope nasc 
)

Adds a MEDCouplingFieldDouble to this. The underlying mesh of the given field is checked if its elements are sorted suitable for writing to MED file ("STB" stands for "Sort By Type"), if not, an exception is thrown.

Parameters
[in]field- the field to add to this. The array of field field is ignored
[in]arr- the array of values.
[in,out]glob- the global data where profiles and localization present in field, if any, are added.
Exceptions
Ifthe name of field is empty.
Ifthe data array of field is not set.
Ifthis->_arr is already allocated but has different number of components than field.
Ifthe underlying mesh of field has no name.
Ifelements in the mesh are not in the order suitable for writing to the MED file.

References _field_per_mesh, addNewEntryIfNecessary(), MEDCoupling::MEDFileField1TSWithoutSDA::CheckSBTMesh(), copyTinyInfoFrom(), MEDCoupling::MEDCouplingField::getMesh(), MEDCoupling::MEDCouplingMesh::getName(), MEDCoupling::MEDCouplingField::getTypeOfField(), MEDCoupling::ON_NODES, and MEDCoupling::MEDFileFieldNameScope::setMeshName().

Referenced by MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldNoProfileSBT(), MEDCoupling::MEDFileField1TS::setFieldNoProfileSBT(), and MEDCoupling::MEDFileIntField1TS::setFieldNoProfileSBT().

void MEDFileAnyTypeField1TSWithoutSDA::setFieldProfile ( const MEDCouplingFieldDouble field,
const DataArray arrOfVals,
const MEDFileMesh mesh,
int  meshDimRelToMax,
const DataArrayInt profile,
MEDFileFieldGlobsReal glob,
const MEDFileFieldNameScope nasc 
)

Adds a MEDCouplingFieldDouble to this. Specified entities of a given dimension of a given mesh are used as the support of the given field (a real support is not used). Elements of the given mesh must be sorted suitable for writing to MED file. Order of underlying mesh entities of the given field specified by profile parameter is not prescribed; this method permutes field values to have them sorted by element type as required for writing to MED file. A new profile is added only if no equal profile is missing.

Parameters
[in]field- the field to add to this. The field double values are ignored.
[in]arrOfVals- the values of the field field used.
[in]mesh- the supporting mesh of field.
[in]meshDimRelToMax- a relative dimension of mesh entities field lies on.
[in]profile- ids of mesh entities on which corresponding field values lie.
[in,out]glob- the global data where profiles and localization present in field, if any, are added.
Exceptions
Ifeither field or mesh or profile has an empty name.
Ifthere are no mesh entities of meshDimRelToMax dimension in mesh.
Ifthe data array of field is not set.
Ifthis->_arr is already allocated but has different number of components than field.
Ifelements in mesh are not in the order suitable for writing to the MED file.
See Also
setFieldNoProfileSBT()

References _field_per_mesh, addNewEntryIfNecessary(), MEDCoupling::MEDCouplingFieldDouble::clone(), copyTinyInfoFrom(), MEDCoupling::MEDFileMesh::getMeshAtLevel(), MEDCoupling::DataArray::getNumberOfComponents(), MEDCoupling::DataArray::getNumberOfTuples(), MEDCoupling::DataArrayTemplate< T >::getNumberOfTuples(), MEDCoupling::MEDCouplingField::getNumberOfTuplesExpectedRegardingCode(), MEDCoupling::MEDCouplingField::getTypeOfField(), MEDCoupling::DataArray::isAllocated(), MEDCoupling::DataArrayTemplate< T >::isAllocated(), and MEDCoupling::ON_NODES.

Referenced by MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::appendFieldProfile(), MEDCoupling::MEDFileField1TS::setFieldProfile(), and MEDCoupling::MEDFileIntField1TS::setFieldProfile().

void MEDFileAnyTypeField1TSWithoutSDA::simpleRepr ( int  bkOffset,
std::ostream &  oss,
int  f1tsId 
) const
virtual

Prints a string describing this field into a stream. This string is outputted by print Python command.

Parameters
[in]bkOffset- number of white spaces printed at the beginning of each line.
[in,out]oss- the out stream.
[in]f1tsId- the field index within a MED file. If f1tsId < 0, the tiny info id printed, else, not.

References _dt, MEDCoupling::MEDFileFieldNameScope::_dt_unit, _field_per_mesh, _iteration, _order, MEDCoupling::DataArray::getInfoOnComponents(), MEDCoupling::MEDFileFieldNameScope::getName(), MEDCoupling::DataArray::getNumberOfTuples(), getTypeStr(), getUndergroundDataArray(), and MEDCoupling::DataArray::isAllocated().

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::simpleRepr(), and MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::simpleRepr().

virtual MEDFileAnyTypeField1TSWithoutSDA* MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::deepCopy ( ) const
pure virtual
virtual const char* MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getTypeStr ( ) const
pure virtual
virtual DataArray* MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getUndergroundDataArrayExt ( std::vector< std::pair< std::pair< INTERP_KERNEL::NormalizedCellType, int >, std::pair< int, int > > > &  entries) const
pure virtual
virtual void MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::setArray ( DataArray arr)
pure virtual
virtual DataArray* MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::createNewEmptyDataArrayInstance ( ) const
pure virtual
virtual const DataArray* MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::getOrCreateAndGetArray ( ) const
pure virtual
MEDCouplingFieldDouble * MEDFileAnyTypeField1TSWithoutSDA::getFieldAtLevel ( TypeOfField  type,
int  meshDimRelToMax,
const std::string &  mName,
int  renumPol,
const MEDFileFieldGlobsReal glob,
MCAuto< DataArray > &  arrOut,
const MEDFileFieldNameScope nasc 
) const

Returns a new MEDCouplingFieldDouble of given type lying on a given support.

Parameters
[in]type- a spatial discretization of the new field.
[in]meshDimRelToMax- a relative dimension of the supporting mesh entities.
[in]mName- a name of the supporting mesh.
[in]renumPol- specifies how to permute values of the result field according to the optional numbers of cells and nodes, if any. The valid values are
  • 0 - do not permute.
  • 1 - permute cells.
  • 2 - permute nodes.
  • 3 - permute cells and nodes.
[in]glob- the global data storing profiles and localization.
Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this field using decrRef() as it is no more needed.
Exceptions
Ifthe MED file is not readable.
Ifthere is no mesh named mName in the MED file.
Ifthere are no mesh entities of meshDimRelToMax dimension in the mesh.
Ifno field of this is lying on the mesh mName.
Ifno field values of the given type or given meshDimRelToMax are available.

References getFieldOnMeshAtLevel(), MEDCoupling::MEDFileFieldGlobsReal::getFileName(), getMeshIteration(), MEDCoupling::MEDFileFieldNameScope::getMeshName(), getMeshOrder(), and MEDCoupling::MEDFileMesh::New().

Referenced by MEDCoupling::MEDFileFieldMultiTS::getFieldAtLevel(), MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtLevel(), MEDCoupling::MEDFileIntField1TS::getFieldAtLevelOld(), MEDCoupling::MEDFileFieldMultiTS::getFieldAtLevelOld(), and MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtLevelOld().

MEDCouplingFieldDouble * MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel ( TypeOfField  type,
int  meshDimRelToMax,
int  renumPol,
const MEDFileFieldGlobsReal glob,
const MEDFileMesh mesh,
MCAuto< DataArray > &  arrOut,
const MEDFileFieldNameScope nasc 
) const

Returns a new MEDCouplingFieldDouble of given type lying on a given support.

Parameters
[in]type- a spatial discretization of the new field.
[in]meshDimRelToMax- a relative dimension of the supporting mesh entities.
[in]renumPol- specifies how to permute values of the result field according to the optional numbers of cells and nodes, if any. The valid values are
  • 0 - do not permute.
  • 1 - permute cells.
  • 2 - permute nodes.
  • 3 - permute cells and nodes.
[in]glob- the global data storing profiles and localization.
[in]mesh- the supporting mesh.
Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this field using decrRef() as it is no more needed.
Exceptions
Ifthe MED file is not readable.
Ifno field of this is lying on mesh.
Ifthere are no mesh entities of meshDimRelToMax dimension in the mesh.
Ifno field values of the given type or given meshDimRelToMax are available.

References MEDCoupling::MEDFileMesh::getMeshAtLevel(), and MEDCoupling::MEDFileMesh::getNumberFieldAtLevel().

Referenced by fieldOnMesh(), getFieldAtLevel(), getFieldAtTopLevel(), MEDCoupling::MEDFileFieldMultiTS::getFieldOnMeshAtLevel(), and MEDCoupling::MEDFileIntFieldMultiTS::getFieldOnMeshAtLevel().

MEDCouplingFieldDouble * MEDFileAnyTypeField1TSWithoutSDA::getFieldAtTopLevel ( TypeOfField  type,
const std::string &  mName,
int  renumPol,
const MEDFileFieldGlobsReal glob,
MCAuto< DataArray > &  arrOut,
const MEDFileFieldNameScope nasc 
) const

Returns a new MEDCouplingFieldDouble of a given type lying on the top level cells of a given mesh.

Parameters
[in]type- a spatial discretization of the new field.
[in]mName- a name of the supporting mesh.
[in]renumPol- specifies how to permute values of the result field according to the optional numbers of cells and nodes, if any. The valid values are
  • 0 - do not permute.
  • 1 - permute cells.
  • 2 - permute nodes.
  • 3 - permute cells and nodes.
[in]glob- the global data storing profiles and localization.
Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this field using decrRef() as it is no more needed.
Exceptions
Ifthe MED file is not readable.
Ifthere is no mesh named mName in the MED file.
Ifthere are no mesh entities in the mesh.
Ifno field values of the given type are available.

References getDimension(), getFieldOnMeshAtLevel(), MEDCoupling::MEDFileFieldGlobsReal::getFileName(), MEDCoupling::MEDFileMesh::getMeshDimension(), getMeshIteration(), MEDCoupling::MEDFileFieldNameScope::getMeshName(), getMeshOrder(), and MEDCoupling::MEDFileMesh::New().

Referenced by MEDCoupling::MEDFileFieldMultiTS::getFieldAtTopLevel(), and MEDCoupling::MEDFileIntFieldMultiTS::getFieldAtTopLevel().

MEDCouplingFieldDouble * MEDFileAnyTypeField1TSWithoutSDA::getFieldOnMeshAtLevel ( TypeOfField  type,
int  renumPol,
const MEDFileFieldGlobsReal glob,
const MEDCouplingMesh mesh,
const DataArrayInt cellRenum,
const DataArrayInt nodeRenum,
MCAuto< DataArray > &  arrOut,
const MEDFileFieldNameScope nasc 
) const

Returns a new MEDCouplingFieldDouble of given type lying on a given support.

Parameters
[in]type- a spatial discretization of the new field.
[in]renumPol- specifies how to permute values of the result field according to the optional numbers of cells and nodes, if any. The valid values are
  • 0 - do not permute.
  • 1 - permute cells.
  • 2 - permute nodes.
  • 3 - permute cells and nodes.
[in]glob- the global data storing profiles and localization.
[in]mesh- the supporting mesh.
[in]cellRenum- the cell numbers array used for permutation of the result field according to renumPol.
[in]nodeRenum- the node numbers array used for permutation of the result field according to renumPol.
Returns
MEDCouplingFieldDouble * - a new instance of MEDCouplingFieldDouble. The caller is to delete this field using decrRef() as it is no more needed.
Exceptions
Ifthere are no mesh entities of meshDimRelToMax dimension in the mesh.
Ifno field of this is lying on mesh.
Ifno field values of the given type or given meshDimRelToMax are available.

References _field_per_mesh, MEDCoupling::DataArrayInt::checkAndPreparePermutation(), MEDCoupling::DataArrayTemplate< T >::getConstPointer(), MEDCoupling::MEDCouplingField::getDiscretization(), MEDCoupling::MEDCouplingField::getMesh(), MEDCoupling::MEDCouplingMesh::getName(), MEDCoupling::MEDFileFieldNameScope::getName(), MEDCoupling::DataArrayTemplate< T >::getNbOfElems(), MEDCoupling::MEDCouplingMesh::getNumberOfCells(), MEDCoupling::MEDCouplingMesh::getNumberOfNodes(), MEDCoupling::MEDCouplingFieldDiscretization::renumberArraysForCell(), MEDCoupling::MEDCouplingFieldDouble::renumberNodes(), and MEDCoupling::MCAuto< T >::retn().

DataArray * MEDFileAnyTypeField1TSWithoutSDA::getFieldWithProfile ( TypeOfField  type,
int  meshDimRelToMax,
const MEDFileMesh mesh,
DataArrayInt *&  pfl,
const MEDFileFieldGlobsReal glob,
const MEDFileFieldNameScope nasc 
) const

Returns values and a profile of the field of a given type lying on a given support.

Parameters
[in]type- a spatial discretization of the field.
[in]meshDimRelToMax- a relative dimension of the supporting mesh entities.
[in]mesh- the supporting mesh.
[out]pfl- a new instance of DataArrayInt holding ids of mesh entities the field of interest lies on. If the field lies on all entities of the given dimension, all ids in pfl are zero. The caller is to delete this array using decrRef() as it is no more needed.
[in]glob- the global data storing profiles and localization.
Returns
DataArrayDouble * - a new instance of DataArrayDouble holding values of the field. The caller is to delete this array using decrRef() as it is no more needed.
Exceptions
Ifthere are no mesh entities of meshDimRelToMax dimension in mesh.
Ifno field of this is lying on mesh.
Ifno field values of the given type are available.

References _field_per_mesh, MEDCoupling::MEDFileMesh::getMeshAtLevel(), MEDCoupling::MEDFileFieldNameScope::getName(), MEDCoupling::MCAuto< T >::retn(), and MEDCoupling::MEDCouplingMesh::setName().

Referenced by MEDCoupling::MEDFileField1TS::getFieldWithProfile(), MEDCoupling::MEDFileIntField1TS::getFieldWithProfile(), MEDCoupling::MEDFileFieldMultiTS::getFieldWithProfile(), and MEDCoupling::MEDFileIntFieldMultiTS::getFieldWithProfile().

bool MEDFileAnyTypeField1TSWithoutSDA::renumberEntitiesLyingOnMesh ( const std::string &  meshName,
const std::vector< int > &  oldCode,
const std::vector< int > &  newCode,
const DataArrayInt renumO2N,
MEDFileFieldGlobsReal glob 
)
std::vector< MCAuto< MEDFileAnyTypeField1TSWithoutSDA > > MEDFileAnyTypeField1TSWithoutSDA::splitDiscretizations ( ) const

This method splits this into several sub-parts so that each sub parts have exactly one spatial discretization. This method implements the minimal splitting that leads to single spatial discretization of this.

See Also
splitMultiDiscrPerGeoTypes

References getFieldSplitedByType(), MEDCoupling::MEDFileFieldNameScope::getMeshName(), keepOnlySpatialDiscretization(), and shallowCpy().

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::splitDiscretizations(), and MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::splitDiscretizations().

std::vector< MCAuto< MEDFileAnyTypeField1TSWithoutSDA > > MEDFileAnyTypeField1TSWithoutSDA::splitMultiDiscrPerGeoTypes ( ) const

This method performs a sub splitting as splitDiscretizations does but finer. This is the finest spliting level that can be done. This method implements the minimal splitting so that each returned elements are mono Gauss discretization per geometric type.

See Also
splitDiscretizations

References getFieldSplitedByType(), MEDCoupling::MEDFileFieldNameScope::getMeshName(), MEDCoupling::RefCountObjectOnly::incrRef(), keepOnlyGaussDiscretization(), and shallowCpy().

Referenced by MEDCoupling::MEDFileAnyTypeField1TS::splitMultiDiscrPerGeoTypes(), and MEDCoupling::MEDFileAnyTypeFieldMultiTSWithoutSDA::splitMultiDiscrPerGeoTypes().

int MEDFileAnyTypeField1TSWithoutSDA::keepOnlySpatialDiscretization ( TypeOfField  tof,
std::vector< std::pair< int, int > > &  its 
)

References _field_per_mesh.

Referenced by splitDiscretizations().

int MEDFileAnyTypeField1TSWithoutSDA::keepOnlyGaussDiscretization ( std::size_t  idOfDisc,
std::vector< std::pair< int, int > > &  its 
)

References _field_per_mesh.

Referenced by splitMultiDiscrPerGeoTypes().

void MEDFileAnyTypeField1TSWithoutSDA::allocNotFromFile ( int  newNbOfTuples)
Parameters
[in]newNbOfTuples- The new nb of tuples to be allocated.

References _nb_of_tuples_to_be_allocated, MEDCoupling::DataArray::alloc(), MEDCoupling::DataArray::getNumberOfComponents(), and getOrCreateAndGetArray().

Referenced by copyTinyInfoFrom().

bool MEDFileAnyTypeField1TSWithoutSDA::allocIfNecessaryTheArrayToReceiveDataFromFile ( )

This methods returns true is the allocation has been needed leading to a modification of state in this->_nb_of_tuples_to_be_allocated. If false is returned the memory allocation is not required.

References _nb_of_tuples_to_be_allocated, MEDCoupling::DataArray::alloc(), getNumberOfComponents(), and getOrCreateAndGetArray().

Referenced by loadBigArraysRecursively(), and loadBigArraysRecursivelyIfNecessary().

void MEDFileAnyTypeField1TSWithoutSDA::loadBigArraysRecursivelyIfNecessary ( med_idt  fid,
const MEDFileFieldNameScope nasc 
)
void MEDFileAnyTypeField1TSWithoutSDA::loadStructureAndBigArraysRecursively ( med_idt  fid,
const MEDFileFieldNameScope nasc,
const MEDFileMeshes ms,
const MEDFileEntities *  entities 
)
void MEDFileAnyTypeField1TSWithoutSDA::writeLL ( med_idt  fid,
const MEDFileWritable &  opts,
const MEDFileFieldNameScope nasc 
) const
int MEDFileAnyTypeField1TSWithoutSDA::getMeshIdFromMeshName ( const std::string &  mName) const
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.

References _field_per_mesh, and MEDCoupling::MEDFileFieldNameScope::getName().

int MEDFileAnyTypeField1TSWithoutSDA::addNewEntryIfNecessary ( const MEDCouplingMesh mesh)
protected

Member Data Documentation

int MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::_iteration
protected
int MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::_order
protected
double MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::_dt
protected
int MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::_csit
mutable
int MEDCoupling::MEDFileAnyTypeField1TSWithoutSDA::_nb_of_tuples_to_be_allocated
mutable