void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
std::string getName() const;
std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const throw(INTERP_KERNEL::Exception);
+ std::string getMeshName() const throw(INTERP_KERNEL::Exception);
public:
std::vector<std::string> getPflsReallyUsed2() const;
std::vector<std::string> getLocsReallyUsed2() const;
const MEDFileField1TSWithoutDAS& getTimeStepEntry(int iteration, int order) const throw(INTERP_KERNEL::Exception);
MEDFileField1TSWithoutDAS& getTimeStepEntry(int iteration, int order) throw(INTERP_KERNEL::Exception);
const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
- std::string getMeshName() const throw(INTERP_KERNEL::Exception);
std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
MEDFileFieldMultiTSWithoutDAS();
MEDFileFieldMultiTSWithoutDAS(const char *fieldName);
return _meshes[i]->getOneTimeStep();
}
+MEDFileMesh *MEDFileMeshes::getMeshWithName(const char *mname) const throw(INTERP_KERNEL::Exception)
+{
+ std::vector<std::string> ms=getMeshesNames();
+ std::vector<std::string>::iterator it=std::find(ms.begin(),ms.end(),mname);
+ if(it==ms.end())
+ {
+ std::ostringstream oss; oss << "MEDFileMeshes::getMeshWithName : Mesh \"" << mname << "\" does not exist in this ! Existing are : ";
+ std::copy(ms.begin(),ms.end(),std::ostream_iterator<std::string>(oss," "));
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+ return getMeshAtPos((int)std::distance(ms.begin(),it));
+}
+
std::vector<std::string> MEDFileMeshes::getMeshesNames() const throw(INTERP_KERNEL::Exception)
{
std::vector<std::string> ret(_meshes.size());
void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
int getNumberOfMeshes() const throw(INTERP_KERNEL::Exception);
MEDFileMesh *getMeshAtPos(int i) const throw(INTERP_KERNEL::Exception);
+ MEDFileMesh *getMeshWithName(const char *mname) const throw(INTERP_KERNEL::Exception);
std::vector<std::string> getMeshesNames() const throw(INTERP_KERNEL::Exception);
//
void resize(int newSize) throw(INTERP_KERNEL::Exception);
%newobject ParaMEDMEM::MEDFileMeshMultiTS::getOneTimeStep;
%newobject ParaMEDMEM::MEDFileMeshes::New;
%newobject ParaMEDMEM::MEDFileMeshes::getMeshAtPos;
+%newobject ParaMEDMEM::MEDFileMeshes::getMeshWithName;
%newobject ParaMEDMEM::MEDFileFields::New;
%newobject ParaMEDMEM::MEDFileFields::getField;
ret->incrRef();
return ret;
}
+ MEDFileMesh *getMeshWithName(const char *mname) const throw(INTERP_KERNEL::Exception)
+ {
+ MEDFileMesh *ret=self->getMeshWithName(mname);
+ if(ret)
+ ret->incrRef();
+ return ret;
+ }
}
};
public:
int getNumberOfTS() const;
std::string getName() const;
+ std::string getMeshName() const throw(INTERP_KERNEL::Exception);
%extend
{
PyObject *getIterations() const