+ class MEDFileJointCorrespondence : public RefCountObject, public MEDFileWritable
+ {
+ public:
+ static MEDFileJointCorrespondence *New() throw(INTERP_KERNEL::Exception);
+ static MEDFileJointCorrespondence *New(DataArrayInt* correspondence) // nodes
+ throw(INTERP_KERNEL::Exception);
+ static MEDFileJointCorrespondence *New(DataArrayInt* correspondence, // cells
+ INTERP_KERNEL::NormalizedCellType loc_geo_type,
+ INTERP_KERNEL::NormalizedCellType rem_geo_type)
+ throw(INTERP_KERNEL::Exception);
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ MEDFileJointCorrespondence *deepCpy() const;
+ MEDFileJointCorrespondence *shallowCpy() const;
+ void setIsNodal(bool isNodal);
+ bool getIsNodal() const;
+ bool isEqual(const MEDFileJointCorrespondence *other) const;
+ void setLocalGeometryType(INTERP_KERNEL::NormalizedCellType type);
+ INTERP_KERNEL::NormalizedCellType getLocalGeometryType() const;
+ void setRemoteGeometryType(INTERP_KERNEL::NormalizedCellType type);
+ INTERP_KERNEL::NormalizedCellType getRemoteGeometryType() const;
+ void setCorrespondence(DataArrayInt *corr) throw(INTERP_KERNEL::Exception);
+ const DataArrayInt *getCorrespondence() const throw(INTERP_KERNEL::Exception);
+ void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName, int order, int iteration) const throw(INTERP_KERNEL::Exception);
+ std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ MEDFileJointCorrespondence()
+ {
+ return MEDFileJointCorrespondence::New();
+ }
+ MEDFileJointCorrespondence(DataArrayInt* correspondence) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDFileJointCorrespondence::New(correspondence);
+ }
+ MEDFileJointCorrespondence(DataArrayInt* correspondence, // cells
+ INTERP_KERNEL::NormalizedCellType loc_geo_type,
+ INTERP_KERNEL::NormalizedCellType rem_geo_type) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDFileJointCorrespondence::New(correspondence, loc_geo_type, rem_geo_type);
+ }
+
+ std::string __str__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->simpleRepr();
+ }
+ }
+ };
+
+ class MEDFileJointOneStep : public RefCountObject, public MEDFileWritable
+ {
+ public:
+ static MEDFileJointOneStep *New(int dt=-1, int it=-1) throw(INTERP_KERNEL::Exception);
+ static MEDFileJointOneStep *New(const std::string& fileName, const std::string& mName, const std::string& jointName, int number=1) throw(INTERP_KERNEL::Exception);
+ MEDFileJointOneStep *deepCpy() const;
+ MEDFileJointOneStep *shallowCpy() const;
+ bool isEqual(const MEDFileJointOneStep *other) const;
+ void setOrder(int order);
+ int getOrder() const;
+ void setIteration(int it);
+ int getIteration() const;
+ void pushCorrespondence(MEDFileJointCorrespondence* correspondence);
+ int getNumberOfCorrespondences() const;
+ MEDFileJointCorrespondence *getCorrespondenceAtPos(int i) const;
+ void write(const std::string& fileName, int mode, const std::string& localMeshName, const std::string& jointName) const throw(INTERP_KERNEL::Exception);
+ std::string simpleRepr() const throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ MEDFileJointOneStep()
+ {
+ return MEDFileJointOneStep::New();
+ }
+
+ MEDFileJointOneStep(const std::string& fileName, const std::string& mName, const std::string& jointName, int number) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDFileJointOneStep::New(fileName,mName,jointName,number);
+ }
+
+ std::string __str__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->simpleRepr();
+ }
+ }
+ };
+
+ class MEDFileJoint : public RefCountObject, public MEDFileWritable
+ {
+ public:
+ static MEDFileJoint *New() throw(INTERP_KERNEL::Exception);
+ static MEDFileJoint *New(const std::string& fileName, const std::string& mName, int num) throw(INTERP_KERNEL::Exception);
+ static MEDFileJoint *New(const std::string& jointName, const std::string& locMeshName, const std::string& remoteMeshName, int remoteMeshNum ) throw(INTERP_KERNEL::Exception);
+ MEDFileJoint *deepCpy() const;
+ MEDFileJoint *shallowCpy() const;
+ bool isEqual(const MEDFileJoint *other) const;
+ void setLocalMeshName(const std::string& name);
+ std::string getLocalMeshName() const;
+ void setRemoteMeshName(const std::string& name);
+ std::string getRemoteMeshName() const;
+ void setDescription(const std::string& name);
+ std::string getDescription() const;
+ void setJointName(const std::string& name);
+ std::string getJointName() const;
+ bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
+ void setDomainNumber(const int& number);
+ int getDomainNumber() const;
+ void pushStep(MEDFileJointOneStep* step);
+ int getNumberOfSteps() const;
+ MEDFileJointOneStep *getStepAtPos(int i) const;
+ void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
+ std::string simpleRepr() const;
+ %extend
+ {
+ MEDFileJoint()
+ {
+ return MEDFileJoint::New();
+ }
+
+ MEDFileJoint(const std::string& fileName, const std::string& mName, int num) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDFileJoint::New(fileName,mName,num);
+ }
+
+ std::string __str__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->simpleRepr();
+ }
+ }
+ };
+
+ class MEDFileJoints : public RefCountObject, public MEDFileWritable
+ {
+ public:
+ static MEDFileJoints *New() throw(INTERP_KERNEL::Exception);
+ static MEDFileJoints *New(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception);
+ MEDFileJoints *deepCpy() const;
+ std::string simpleRepr() const;
+ void write(const std::string& fileName, int mode) const throw(INTERP_KERNEL::Exception);
+ std::string getMeshName() const;
+ int getNumberOfJoints() const;
+ std::vector<std::string> getJointsNames() const;
+ bool changeJointNames(const std::vector< std::pair<std::string,std::string> >& modifTab) throw(INTERP_KERNEL::Exception);
+ void resize(int newSize) throw(INTERP_KERNEL::Exception);
+ void pushJoint(MEDFileJoint *joint);
+ void setJointAtPos(int i, MEDFileJoint *joint) throw(INTERP_KERNEL::Exception);
+ void destroyJointAtPos(int i) throw(INTERP_KERNEL::Exception);
+ %extend
+ {
+ MEDFileJoints()
+ {
+ return MEDFileJoints::New();
+ }
+
+ MEDFileJoints(const std::string& fileName, const std::string& meshName) throw(INTERP_KERNEL::Exception)
+ {
+ return MEDFileJoints::New(fileName,meshName);
+ }
+
+ std::string __str__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->simpleRepr();
+ }
+
+ MEDFileJoint *__getitem__(PyObject *obj) throw(INTERP_KERNEL::Exception)
+ {
+ if(PyInt_Check(obj))
+ {
+ MEDFileJoint *ret=self->getJointAtPos(InterpreteNegativeInt((int)PyInt_AS_LONG(obj),self->getNumberOfJoints()));
+ if(ret)
+ ret->incrRef();
+ return ret;
+ }
+ else if(PyString_Check(obj))
+ {
+ MEDFileJoint *ret=self->getJointWithName(PyString_AsString(obj));
+ if(ret)
+ ret->incrRef();
+ return ret;
+ }
+ else
+ throw INTERP_KERNEL::Exception("MEDFileJoints::__getitem__ : only integer or string with meshname supported !");
+ }
+
+ int __len__() const throw(INTERP_KERNEL::Exception)
+ {
+ return self->getNumberOfJoints();
+ }
+
+ MEDFileJoint *getJointAtPos(int i) const throw(INTERP_KERNEL::Exception)
+ {
+ MEDFileJoint *ret=self->getJointAtPos(i);
+ if(ret)
+ ret->incrRef();
+ return ret;
+ }
+
+ MEDFileJoint *getJointWithName(const std::string& paramName) const throw(INTERP_KERNEL::Exception)
+ {
+ MEDFileJoint *ret=self->getJointWithName(paramName);
+ if(ret)
+ ret->incrRef();
+ return ret;
+ }
+ }
+ };
+
+ 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;
+ }
+ }
+ };
+