extern med_geometry_type typmai[MED_N_CELL_FIXED_GEO];
extern INTERP_KERNEL::NormalizedCellType typmai2[MED_N_CELL_FIXED_GEO];
+extern med_geometry_type typmai3[34];
extern med_geometry_type typmainoeud[1];
using namespace ParaMEDMEM;
return ret.retn();
}
+void MEDFileEquivalencePair::write(med_idt fid) const
+{
+ std::string meshName(getFather()->getMeshName());
+ INTERP_KERNEL::AutoPtr<char> meshName2(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
+ INTERP_KERNEL::AutoPtr<char> name(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
+ INTERP_KERNEL::AutoPtr<char> desc(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE));
+ MEDLoaderBase::safeStrCpy(meshName.c_str(),MED_NAME_SIZE,meshName2,getFather()->getMesh()->getTooLongStrPolicy());
+ MEDLoaderBase::safeStrCpy(_name.c_str(),MED_NAME_SIZE,name,getFather()->getMesh()->getTooLongStrPolicy());
+ MEDLoaderBase::safeStrCpy(_description.c_str(),MED_COMMENT_SIZE,desc,getFather()->getMesh()->getTooLongStrPolicy());
+ MEDFILESAFECALLERWR0(MEDequivalenceCr,(fid,meshName2,name,desc));
+ const MEDFileEquivalenceCell *cell(_cell);
+ if(cell)
+ cell->write(fid);
+ const MEDFileEquivalenceNode *node(_node);
+ if(node)
+ node->write(fid);
+}
+
const MEDFileMesh *MEDFileEquivalencePair::getMesh() const
{
return getFather()->getMesh();
}
}
+/*!
+ * The returned pointer is a borrowed pointer.
+ */
+MEDFileEquivalenceCell *MEDFileEquivalencePair::initCell()
+{
+ _cell=new MEDFileEquivalenceCell(this);
+ return _cell;
+}
+
+/*!
+ * The returned pointer is a borrowed pointer.
+ */
+MEDFileEquivalenceNode *MEDFileEquivalencePair::initNode()
+{
+ _node=new MEDFileEquivalenceNode(this,0);
+ return _node;
+}
+
std::size_t MEDFileEquivalencePair::getHeapMemorySizeWithoutChildren() const
{
return 0;
return ret;
}
-void MEDFileEquivalences::appendEmptyEquivalenceWithName(const std::string& name)
+MEDFileEquivalencePair *MEDFileEquivalences::appendEmptyEquivalenceWithName(const std::string& name)
{
MEDCouplingAutoRefCountObjectPtr<MEDFileEquivalencePair> elt(MEDFileEquivalencePair::New(this,name));
_equ.push_back(elt);
-
+ return elt;
}
void MEDFileEquivalences::killEquivalenceWithName(const std::string& name)
_equ.erase(it);
}
+void MEDFileEquivalences::clear()
+{
+ _equ.clear();
+}
+
+void MEDFileEquivalences::write(med_idt fid) const
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileEquivalencePair> >::const_iterator it=_equ.begin();it!=_equ.end();it++)
+ {
+ const MEDFileEquivalencePair *elt(*it);
+ if(elt)
+ elt->write(fid);
+ }
+}
+
int MEDFileEquivalences::PresenceOfEquivalences(med_idt fid, const std::string& meshName)
{
med_int nequ(MEDnEquivalence(fid,meshName.c_str()));
return ret.retn();
}
-void MEDFileEquivalences::CheckDataArray(DataArrayInt *data)
+void MEDFileEquivalences::CheckDataArray(const DataArrayInt *data)
{
if(!data)
return;
return ret;
}
+void MEDFileEquivalenceData::writeLL(med_idt fid, med_entity_type medtype, med_geometry_type medgt) const
+{
+
+ const DataArrayInt *da(getArray());
+ if(!da)
+ return ;
+ MEDFileEquivalences::CheckDataArray(da);
+ const MEDFileMesh *mesh(getFather()->getMesh());
+ int dt,it;
+ mesh->getTime(dt,it);
+ std::string meshName(mesh->getName());
+ std::string equName(getFather()->getName());
+ INTERP_KERNEL::AutoPtr<char> meshName2(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
+ INTERP_KERNEL::AutoPtr<char> name(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE));
+ MEDLoaderBase::safeStrCpy(meshName.c_str(),MED_NAME_SIZE,meshName2,getFather()->getMesh()->getTooLongStrPolicy());
+ MEDLoaderBase::safeStrCpy(equName.c_str(),MED_NAME_SIZE,name,getFather()->getMesh()->getTooLongStrPolicy());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da2(da->deepCpy()); da2->rearrange(1); da2->applyLin(1,1); da2->rearrange(2);
+ MEDFILESAFECALLERWR0(MEDequivalenceCorrespondenceWr,(fid,meshName2,name,dt,it,medtype,medgt,da2->getNumberOfTuples(),da2->begin()));
+}
+
std::size_t MEDFileEquivalenceCellType::getHeapMemorySizeWithoutChildren() const
{
return sizeof(MEDFileEquivalenceCellType);
}
+void MEDFileEquivalenceCellType::write(med_idt fid) const
+{
+ writeLL(fid,MED_CELL,typmai3[_type]);
+}
+
std::vector<const BigMemoryObject *> MEDFileEquivalenceCell::getDirectChildrenWithNull() const
{
std::size_t sz(_types.size());
return 0;
}
+void MEDFileEquivalenceCell::write(med_idt fid) const
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileEquivalenceCellType> >::const_iterator it=_types.begin();it!=_types.end();it++)
+ {
+ const MEDFileEquivalenceCellType *ct(*it);
+ if(ct)
+ ct->write(fid);
+ }
+}
+
DataArrayInt *MEDFileEquivalenceCell::getArray(INTERP_KERNEL::NormalizedCellType type)
{
for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileEquivalenceCellType> >::iterator it=_types.begin();it!=_types.end();it++)
void MEDFileEquivalenceCell::setArray(int meshDimRelToMax, DataArrayInt *da)
{
+ if(!da)
+ return ;
MEDFileEquivalences::CheckDataArray(da);
MEDFileMesh *mm(getMesh());
+ int totalNbOfCells(mm->getNumberOfCellsAtLevel(meshDimRelToMax));
+ //
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp(da->deepCpy()); tmp->rearrange(1);
+ int maxv,minv;
+ tmp->getMinMaxValues(minv,maxv);
+ if((minv<0 || minv>=totalNbOfCells) || (maxv<0 || maxv>=totalNbOfCells))
+ {
+ std::ostringstream oss; oss << "MEDFileEquivalenceCell::setArray : Input 2 component DataArray has incorrect values ! all values must be in [0," << totalNbOfCells << ") !";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ //
std::vector<INTERP_KERNEL::NormalizedCellType> gts(mm->getGeoTypesAtLevel(meshDimRelToMax));
+ int startId(0),endId;
+ std::vector<int> compS(1,0);
for(std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator it=gts.begin();it!=gts.end();it++)
{
- mm->getNumberOfCellsWithType(*it);
- //TODO
+ endId=startId+mm->getNumberOfCellsWithType(*it);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da0(da->keepSelectedComponents(compS));
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ids(da0->getIdsInRange(startId,endId));
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da1(da->selectByTupleIdSafe(ids->begin(),ids->end()));
+ da1->applyLin(1,-startId);
+ setArrayForType(*it,da1);
+ startId=endId;
}
}
+void MEDFileEquivalenceCell::setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da)
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileEquivalenceCellType> >::iterator it=_types.begin();it!=_types.end();it++)
+ {
+ MEDFileEquivalenceCellType *elt(*it);
+ if(elt && elt->getType()==type)
+ {
+ elt->setArray(da);
+ return ;
+ }
+ }
+ MEDCouplingAutoRefCountObjectPtr<MEDFileEquivalenceCellType> newElt(new MEDFileEquivalenceCellType(getFather(),type,da));
+ _types.push_back(newElt);
+}
+
+std::vector<INTERP_KERNEL::NormalizedCellType> MEDFileEquivalenceCell::getTypes() const
+{
+ std::vector<INTERP_KERNEL::NormalizedCellType> ret;
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileEquivalenceCellType> >::const_iterator it=_types.begin();it!=_types.end();it++)
+ {
+ const MEDFileEquivalenceCellType *elt(*it);
+ if(elt)
+ ret.push_back(elt->getType());
+ }
+ return ret;
+}
+
void MEDFileEquivalenceCell::load(med_idt fid)
{
std::string meshName(getFather()->getFather()->getMeshName()),name(getName());
{
return sizeof(MEDFileEquivalenceNode);
}
+
+void MEDFileEquivalenceNode::write(med_idt fid) const
+{
+ writeLL(fid,MED_NODE,MED_NONE);
+}
{
public:
static MEDFileEquivalencePair *Load(MEDFileEquivalences *father, med_idt fid, const std::string& name, const std::string &desc);
+ void write(med_idt fid) const;
const MEDFileEquivalences *getFather() const { return _father; }
MEDFileEquivalences *getFather() { return _father; }
const MEDFileMesh *getMesh() const;
MEDLOADER_EXPORT void setName(const std::string& name) { _name=name; }
MEDLOADER_EXPORT std::string getDescription() const { return _description; }
MEDLOADER_EXPORT void setDescription(const std::string& descr) { _description=descr; }
+ MEDLOADER_EXPORT MEDFileEquivalenceCell *initCell();
+ MEDLOADER_EXPORT MEDFileEquivalenceNode *initNode();
MEDLOADER_EXPORT MEDFileEquivalenceCell *getCell() { return _cell; }
MEDLOADER_EXPORT MEDFileEquivalenceNode *getNode() { return _node; }
MEDLOADER_EXPORT void setArray(int meshDimRelToMaxExt, DataArrayInt *da);
MEDLOADER_EXPORT MEDFileEquivalencePair *getEquivalenceWithName(const std::string& name);
MEDLOADER_EXPORT int size() const;
MEDLOADER_EXPORT std::vector<std::string> getEquivalenceNames() const;
- MEDLOADER_EXPORT void appendEmptyEquivalenceWithName(const std::string& name);
+ MEDLOADER_EXPORT MEDFileEquivalencePair *appendEmptyEquivalenceWithName(const std::string& name);
MEDLOADER_EXPORT void killEquivalenceWithName(const std::string& name);
MEDLOADER_EXPORT void killEquivalenceAt(int i);
+ MEDLOADER_EXPORT void clear();
public:
+ void write(med_idt fid) const;
static int PresenceOfEquivalences(med_idt fid, const std::string& meshName);
static MEDFileEquivalences *Load(med_idt fid, int nbOfEq, MEDFileMesh *owner);
- static void CheckDataArray(DataArrayInt *data);
+ static void CheckDataArray(const DataArrayInt *data);
private:
MEDFileEquivalences(MEDFileMesh *owner):_owner(owner) { }
private:
MEDFileEquivalencePair *getFather() { return _father; }
const MEDFileMesh *getMesh() const { return getFather()->getMesh(); }
MEDFileMesh *getMesh() { return getFather()->getMesh(); }
+ protected:
+ ~MEDFileEquivalenceBase() { }
private:
MEDFileEquivalencePair *_father;
};
{
public:
MEDFileEquivalenceData(MEDFileEquivalencePair *owner, DataArrayInt *data);
- void setArray(DataArrayInt *data);
- const DataArrayInt *getArray() const { return _data; }
- DataArrayInt *getArray() { return _data; }
+ MEDLOADER_EXPORT void setArray(DataArrayInt *data);
+ MEDLOADER_EXPORT const DataArrayInt *getArray() const { return _data; }
+ MEDLOADER_EXPORT DataArrayInt *getArray() { return _data; }
MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ protected:
+ void writeLL(med_idt fid, med_entity_type medtype, med_geometry_type medgt) const;
+ protected:
+ ~MEDFileEquivalenceData() { }
protected:
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _data;
};
MEDFileEquivalenceCellType(MEDFileEquivalencePair *owner, INTERP_KERNEL::NormalizedCellType type, DataArrayInt *data):MEDFileEquivalenceData(owner,data),_type(type) { }
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
INTERP_KERNEL::NormalizedCellType getType() const { return _type; }
+ public:
+ void write(med_idt fid) const;
+ private:
+ ~MEDFileEquivalenceCellType() { }
private:
INTERP_KERNEL::NormalizedCellType _type;
};
MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
static MEDFileEquivalenceCell *Load(med_idt fid, MEDFileEquivalencePair *owner);
+ void write(med_idt fid) const;
public:
+ MEDLOADER_EXPORT void clear() { _types.clear(); }
MEDLOADER_EXPORT std::size_t size() const { return _types.size(); }
MEDLOADER_EXPORT DataArrayInt *getArray(INTERP_KERNEL::NormalizedCellType type);
MEDLOADER_EXPORT void setArray(int meshDimRelToMax, DataArrayInt *da);
+ MEDLOADER_EXPORT void setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da);
+ MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getTypes() const;
public:
MEDFileEquivalenceCell(MEDFileEquivalencePair *owner):MEDFileEquivalenceBase(owner) { }
+ private:
+ ~MEDFileEquivalenceCell() { }
private:
void load(med_idt fid);
std::string getName() const { return getFather()->getName(); }
public:
MEDFileEquivalenceNode(MEDFileEquivalencePair *owner, DataArrayInt *data):MEDFileEquivalenceData(owner,data) { }
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
+ void write(med_idt fid) const;
+ private:
+ ~MEDFileEquivalenceNode() { }
};
}
if(_name.empty())
throw INTERP_KERNEL::Exception("MEDFileMesh : name is empty. MED file ask for a NON EMPTY name !");
writeLL(fid);
+ writeJoints(fid);
+ const MEDFileEquivalences *eqs(_equiv);
+ if(eqs)
+ eqs->write(fid);
}
/*!
if((const MEDFileUMeshSplitL1 *)(*it)!=0)
(*it)->write(fid,meshName,mdim);
MEDFileUMeshL2::WriteFamiliesAndGrps(fid,meshName,_families,_groups,_too_long_str);
-
- writeJoints(fid);
}
/*!
//
std::string meshName(MEDLoaderBase::buildStringFromFortran(maa,MED_NAME_SIZE));
MEDFileStructuredMesh::writeStructuredLL(fid,meshName);
-
- writeJoints(fid);
}
void MEDFileCMesh::synchronizeTinyInfoOnLeaves() const
//
std::string meshName(MEDLoaderBase::buildStringFromFortran(maa,MED_NAME_SIZE));
MEDFileStructuredMesh::writeStructuredLL(fid,meshName);
-
- writeJoints(fid);
}
void MEDFileCurveLinearMesh::loadLL(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
MEDLOADER_EXPORT int getIteration() const { return _iteration; }
MEDLOADER_EXPORT void setTimeValue(double time) { _time=time; }
MEDLOADER_EXPORT void setTime(int dt, int it, double time) { _time=time; _iteration=dt; _order=it; }
- MEDLOADER_EXPORT double getTime(int& dt, int& it) { dt=_iteration; it=_order; return _time; }
+ MEDLOADER_EXPORT double getTime(int& dt, int& it) const { dt=_iteration; it=_order; return _time; }
MEDLOADER_EXPORT double getTimeValue() const { return _time; }
MEDLOADER_EXPORT void setTimeUnit(const std::string& unit) { _dt_unit=unit; }
MEDLOADER_EXPORT std::string getTimeUnit() const { return _dt_unit; }
MEDLOADER_EXPORT int getNumberOfJoints() const;
MEDLOADER_EXPORT MEDFileJoints *getJoints() const;
MEDLOADER_EXPORT void setJoints( MEDFileJoints* joints );
+ MEDFileEquivalences *getEquivalences() { return _equiv; }
+ const MEDFileEquivalences *getEquivalences() const { return _equiv; }
+ void initializeEquivalences() { _equiv=MEDFileEquivalences::New(this); }
protected:
MEDFileMesh();
//! protected because no way in MED file API to specify this name
void writeJoints(med_idt fid) const;
void loadJointsFromFile(med_idt fid, MEDFileJoints *toUseInstedOfReading=0);
void loadEquivalences(med_idt fid);
- MEDFileEquivalences *getEquivalences() { return _equiv; }
- const MEDFileEquivalences *getEquivalences() const { return _equiv; }
- void initializeEquivalences() { _equiv=MEDFileEquivalences::New(this); }
protected:
int _order;
int _iteration;
#include "MEDFileField.hxx"
#include "MEDFileParameter.hxx"
#include "MEDFileData.hxx"
+#include "MEDFileEquivalence.hxx"
#include "MEDFileMeshReadSelector.hxx"
#include "MEDFileFieldOverView.hxx"
#include "MEDLoaderTypemaps.i"
%newobject ParaMEDMEM::MEDFileMesh::getNodeFamiliesArr;
%newobject ParaMEDMEM::MEDFileMesh::getAllFamiliesIdsReferenced;
%newobject ParaMEDMEM::MEDFileMesh::computeAllFamilyIdsInUse;
+%newobject ParaMEDMEM::MEDFileMesh::getEquivalences;
%newobject ParaMEDMEM::MEDFileData::getJoints;
%newobject ParaMEDMEM::MEDFileStructuredMesh::getImplicitFaceMesh;
%newobject ParaMEDMEM::MEDFileUMesh::New;
%newobject ParaMEDMEM::MEDFileJoints::getJointAtPos;
%newobject ParaMEDMEM::MEDFileJoints::getJointWithName;
%newobject ParaMEDMEM::MEDFileJoints::__getitem__;
+%newobject ParaMEDMEM::MEDFileEquivalences::getEquivalence;
+%newobject ParaMEDMEM::MEDFileEquivalences::getEquivalenceWithName;
+%newobject ParaMEDMEM::MEDFileEquivalences::appendEmptyEquivalenceWithName;
+%newobject ParaMEDMEM::MEDFileEquivalencePair::initCell;
+%newobject ParaMEDMEM::MEDFileEquivalencePair::initNode;
+%newobject ParaMEDMEM::MEDFileEquivalencePair::getCell;
+%newobject ParaMEDMEM::MEDFileEquivalencePair::getNode;
+%newobject ParaMEDMEM::MEDFileEquivalenceData::getArray;
+%newobject ParaMEDMEM::MEDFileEquivalenceCell::getArray;
%newobject ParaMEDMEM::SauvWriter::New;
%newobject ParaMEDMEM::SauvReader::New;
%feature("unref") MEDFileJointOneStep "$this->decrRef();"
%feature("unref") MEDFileJoint "$this->decrRef();"
%feature("unref") MEDFileJoints "$this->decrRef();"
+%feature("unref") MEDFileEquivalences "$this->decrRef();"
+%feature("unref") MEDFileEquivalencePair "$this->decrRef();"
+%feature("unref") MEDFileEquivalenceBase "$this->decrRef();"
+%feature("unref") MEDFileEquivalenceData "$this->decrRef();"
+%feature("unref") MEDFileEquivalenceCell "$this->decrRef();"
+%feature("unref") MEDFileEquivalenceNode "$this->decrRef();"
%feature("unref") MEDFileData "$this->decrRef();"
%feature("unref") SauvReader "$this->decrRef();"
%feature("unref") SauvWriter "$this->decrRef();"
}
}
};
+
class MEDFileJointCorrespondence : public RefCountObject, public MEDFileWritable
{
public:
}
}
};
+
class MEDFileJoint : public RefCountObject, public MEDFileWritable
{
public:
}
}
};
+
+ class MEDFileEquivalenceBase : public RefCountObject
+ {
+ private:
+ MEDFileEquivalenceBase();
+ };
+
+ class MEDFileEquivalenceData : public MEDFileEquivalenceBase
+ {
+ private:
+ MEDFileEquivalenceData();
+ public:
+ void setArray(DataArrayInt *data);
+ %extend
+ {
+ DataArrayInt *getArray()
+ {
+ DataArrayInt *ret(self->getArray());
+ if(ret) ret->incrRef();
+ return ret;
+ }
+ }
+ };
+
+ class MEDFileEquivalenceNode : public MEDFileEquivalenceData
+ {
+ private:
+ MEDFileEquivalenceNode();
+ };
+
+ class MEDFileEquivalenceCell : public MEDFileEquivalenceBase
+ {
+ private:
+ MEDFileEquivalenceCell();
+ public:
+ void clear();
+ std::size_t size() const;
+ void setArray(int meshDimRelToMax, DataArrayInt *da) throw(INTERP_KERNEL::Exception);
+ void setArrayForType(INTERP_KERNEL::NormalizedCellType type, DataArrayInt *da) throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ DataArrayInt *getArray(INTERP_KERNEL::NormalizedCellType type) throw(INTERP_KERNEL::Exception)
+ {
+ DataArrayInt *ret(self->getArray(type));
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ PyObject *getTypes() const throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<INTERP_KERNEL::NormalizedCellType> result(self->getTypes());
+ std::vector<INTERP_KERNEL::NormalizedCellType>::const_iterator iL=result.begin();
+ PyObject *res=PyList_New(result.size());
+ for(int i=0;iL!=result.end(); i++, iL++)
+ PyList_SetItem(res,i,PyInt_FromLong(*iL));
+ return res;
+ }
+ }
+ };
+
+ class MEDFileEquivalencePair : public RefCountObject
+ {
+ private:
+ MEDFileEquivalencePair();
+ public:
+ std::string getName() const;
+ void setName(const std::string& name);
+ std::string getDescription() const;
+ void setDescription(const std::string& descr);
+ void setArray(int meshDimRelToMaxExt, DataArrayInt *da);;
+ %extend
+ {
+ MEDFileEquivalenceCell *initCell()
+ {
+ MEDFileEquivalenceCell *ret(self->initCell());
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ MEDFileEquivalenceNode *initNode()
+ {
+ MEDFileEquivalenceNode *ret(self->initNode());
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ MEDFileEquivalenceCell *getCell()
+ {
+ MEDFileEquivalenceCell *ret(self->getCell());
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ MEDFileEquivalenceNode *getNode()
+ {
+ MEDFileEquivalenceNode *ret(self->getNode());
+ if(ret) ret->incrRef();
+ return ret;
+ }
+ }
+ };
+
+ class MEDFileEquivalences : public RefCountObject
+ {
+ private:
+ MEDFileEquivalences();
+ public:
+ int size() const;
+ std::vector<std::string> getEquivalenceNames() const throw(INTERP_KERNEL::Exception);
+ void killEquivalenceWithName(const std::string& name) throw(INTERP_KERNEL::Exception);
+ void killEquivalenceAt(int i) throw(INTERP_KERNEL::Exception);
+ void clear();
+ %extend
+ {
+ MEDFileEquivalencePair *getEquivalence(int i) throw(INTERP_KERNEL::Exception)
+ {
+ MEDFileEquivalencePair *ret(self->getEquivalence(i));
+ if(ret) ret->incrRef();
+ return ret;
+ }
+ MEDFileEquivalencePair *getEquivalenceWithName(const std::string& name) throw(INTERP_KERNEL::Exception)
+ {
+ MEDFileEquivalencePair *ret(self->getEquivalenceWithName(name));
+ if(ret) ret->incrRef();
+ return ret;
+ }
+
+ MEDFileEquivalencePair *appendEmptyEquivalenceWithName(const std::string& name) throw(INTERP_KERNEL::Exception)
+ {
+ MEDFileEquivalencePair *ret(self->appendEmptyEquivalenceWithName(name));
+ if(ret) ret->incrRef();
+ return ret;
+ }
+ }
+ };
class MEDFileMesh : public RefCountObject, public MEDFileWritable
{
virtual DataArrayInt *getNodeFamiliesArr(const std::vector<std::string>& fams, bool renum=false) const throw(INTERP_KERNEL::Exception);
int getNumberOfJoints();
MEDFileJoints *getJoints();
- void setJoints( MEDFileJoints* joints );
+ void setJoints( MEDFileJoints* joints );
+ void initializeEquivalences();
%extend
{
std::string __str__() const throw(INTERP_KERNEL::Exception)
PyTuple_SetItem(ret,3,SWIG_NewPointerObj(SWIG_as_voidptr(ret3),SWIGTYPE_p_ParaMEDMEM__DataArrayInt, SWIG_POINTER_OWN | 0 ));
return ret;
}
+
+ MEDFileEquivalences *getEquivalences() throw(INTERP_KERNEL::Exception)
+ {
+ MEDFileEquivalences *ret(self->getEquivalences());
+ if(ret) ret->incrRef();
+ return ret;
+ }
}
};