const char MEDFileMesh::DFT_FAM_NAME[]="FAMILLE_ZERO";
-MEDFileMesh::MEDFileMesh():_order(-1),_iteration(-1),_time(0.),_univ_wr_status(true)
+MEDFileMesh::MEDFileMesh():_order(-1),_iteration(-1),_time(0.),_univ_wr_status(true),_axis_type(AX_CART)
{
}
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dt,it;
std::string dummy2;
- MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dt,it,dummy2);
+ ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> ret;
switch(meshType)
{
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dummy0,dummy1;
std::string dummy2;
- MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy0,dummy1,dummy2);
+ ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy3,dummy0,dummy1,dummy2);
MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> ret;
switch(meshType)
{
return ret;
}
+/*!
+ * Returns names of all families of \a this mesh but like they would be in file.
+ * This method is here only for MED file families gurus. If you are a kind user forget this method :-)
+ * This method is only useful for aggressive users that want to have in their file a same family lying both on cells and on nodes. This is not a good idea for lisibility !
+ * For your information internaly in memory such families are renamed to have a nicer API.
+ */
+std::vector<std::string> MEDFileMesh::getFamiliesNamesWithFilePointOfView() const
+{
+ std::vector<std::string> ret(getFamiliesNames());
+ MEDFileMeshL2::RenameFamiliesFromMemToFile(ret);
+ return ret;
+}
+
+std::string MEDFileMesh::GetMagicFamilyStr()
+{
+ return std::string(MEDFileMeshL2::ZE_SEP_FOR_FAMILY_KILLERS);
+}
+
/*!
* Changes a name of every family, included in one group only, to be same as the group name.
* \throw If there are families with equal names in \a this mesh.
std::vector<int> MEDFileMesh::getDistributionOfTypes(int meshDimRelToMax) const
{
- MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> mLev(getGenMeshAtLevel(meshDimRelToMax));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingMesh> mLev(getMeshAtLevel(meshDimRelToMax));
return mLev->getDistributionOfTypes();
}
int dt,it;
ParaMEDMEM::MEDCouplingMeshType meshType;
std::string dummy2;
- MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dt,it,dummy2);
+ ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
return new MEDFileUMesh(fid,ms.front(),dt,it,mrs);
}
MEDFileMesh *MEDFileUMesh::shallowCpy() const
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> ret=new MEDFileUMesh(*this);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> ret(new MEDFileUMesh(*this));
return ret.retn();
}
MEDFileMesh *MEDFileUMesh::deepCpy() const
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> ret=new MEDFileUMesh(*this);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> ret(new MEDFileUMesh(*this));
ret->deepCpyEquivalences(*this);
if((const DataArrayDouble*)_coords)
ret->_coords=_coords->deepCpy();
ParaMEDMEM::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dummy2;
- int mid(MEDFileUMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy0,dummy1,dummy2));
+ ParaMEDMEM::MEDCouplingAxisType dummy3;
+ int mid(MEDFileUMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy3,dummy0,dummy1,dummy2));
if(meshType!=UNSTRUCTURED)
{
std::ostringstream oss; oss << "loadPartUMeshFromFile : Trying to load as unstructured an existing mesh with name '" << mName << "' !";
_equiv->getRepr(oss);
}
+void MEDFileMesh::checkCartesian() const
+{
+ if(getAxType()!=AX_CART)
+ {
+ std::ostringstream oss; oss << "MEDFileMesh::checkCartesian : request for method that is dedicated to a cartesian convention ! But you are not in cartesian convention (" << DataArray::GetAxTypeRepr(getAxType()) << ").";
+ oss << std::endl << "To perform operation you have two possiblities :" << std::endl;
+ oss << " - call setAxType(AX_CART)" << std::endl;
+ oss << " - call cartesianize()";
+ throw INTERP_KERNEL::Exception(oss.str().c_str());
+ }
+}
+
/*!
* \brief Return number of joints, which is equal to number of adjacent mesh domains
*/
ParaMEDMEM::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dummy2;
- int mid(MEDFileUMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy0,dummy1,dummy2));
+ ParaMEDMEM::MEDCouplingAxisType axType;
+ int mid(MEDFileUMeshL2::GetMeshIdFromName(fid,mName,meshType,axType,dummy0,dummy1,dummy2));
+ setAxType(axType);
if(meshType!=UNSTRUCTURED)
{
std::ostringstream oss; oss << "Trying to load as unstructured an existing mesh with name '" << mName << "' !";
MEDLoaderBase::safeStrCpy2(c.c_str(),MED_SNAME_SIZE-1,comp+i*MED_SNAME_SIZE,_too_long_str);//MED_TAILLE_PNOM-1 to avoid to write '\0' on next compo
MEDLoaderBase::safeStrCpy2(u.c_str(),MED_SNAME_SIZE-1,unit+i*MED_SNAME_SIZE,_too_long_str);//MED_TAILLE_PNOM-1 to avoid to write '\0' on next compo
}
- MEDFILESAFECALLERWR0(MEDmeshCr,(fid,maa,spaceDim,mdim,MED_UNSTRUCTURED_MESH,desc,"",MED_SORT_DTIT,MED_CARTESIAN,comp,unit));
+ MEDFILESAFECALLERWR0(MEDmeshCr,(fid,maa,spaceDim,mdim,MED_UNSTRUCTURED_MESH,desc,"",MED_SORT_DTIT,MEDFileMeshL2::TraduceAxisTypeRev(getAxType()),comp,unit));
if(_univ_wr_status)
MEDFILESAFECALLERWR0(MEDmeshUniversalNameWr,(fid,maa));
std::string meshName(MEDLoaderBase::buildStringFromFortran(maa,MED_NAME_SIZE));
}
}
+MEDFileMesh *MEDFileUMesh::cartesianize() const
+{
+ if(getAxType()==AX_CART)
+ {
+ incrRef();
+ return const_cast<MEDFileUMesh *>(this);
+ }
+ else
+ {
+ MEDCouplingAutoRefCountObjectPtr<MEDFileUMesh> ret(new MEDFileUMesh(*this));
+ const DataArrayDouble *coords(_coords);
+ if(!coords)
+ throw INTERP_KERNEL::Exception("MEDFileUMesh::cartesianize : coordinates are null !");
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coordsCart(_coords->cartesianize(getAxType()));
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileUMeshSplitL1> >::iterator it=ret->_ms.begin();it!=ret->_ms.end();it++)
+ if((const MEDFileUMeshSplitL1 *)(*it))
+ *it=(*it)->shallowCpyUsingCoords(coordsCart);
+ ret->_coords=coordsCart;
+ ret->setAxType(AX_CART);
+ return ret.retn();
+ }
+}
+
/*!
* Returns the optional numbers of mesh entities of a given dimension transformed using
* DataArrayInt::invertArrayN2O2O2N().
* \return MEDCouplingUMesh * - a pointer to MEDCouplingUMesh that the caller is to
* delete using decrRef() as it is no more needed.
* \throw If there are no mesh entities of \a meshDimRelToMaxExt dimension in \a this mesh.
- * \sa getGenMeshAtLevel()
*/
MEDCouplingUMesh *MEDFileUMesh::getMeshAtLevel(int meshDimRelToMaxExt, bool renum) const
{
return l1->getWholeMesh(renum);
}
-/*!
- * Returns a MEDCouplingUMesh of a given relative dimension.
- * \warning If \a meshDimRelToMaxExt == 1 (which means nodes), the returned mesh **is not
- * valid**. This is a feature, because MEDLoader does not create cells that do not exist!
- * To build a valid MEDCouplingUMesh from the returned one in this case,
- * call MEDCouplingUMesh::Build0DMeshFromCoords().
- * \param [in] meshDimRelToMax - the relative dimension of interest.
- * \param [in] renum - if \c true, the returned mesh is permuted according to the
- * optional numbers of mesh entities.
- * \return MEDCouplingMesh * - a pointer to MEDCouplingUMesh that the caller is to
- * delete using decrRef() as it is no more needed.
- * \throw If there are no mesh entities of \a meshDimRelToMax dimension in \a this mesh.
- * \sa getMeshAtLevel()
- */
-MEDCouplingMesh *MEDFileUMesh::getGenMeshAtLevel(int meshDimRelToMax, bool renum) const
-{
- return getMeshAtLevel(meshDimRelToMax,renum);
-}
-
std::vector<int> MEDFileUMesh::getDistributionOfTypes(int meshDimRelToMax) const
{
const MEDFileUMeshSplitL1 *l1(getMeshAtLevSafe(meshDimRelToMax));
{
if(!coords)
throw INTERP_KERNEL::Exception("MEDFileUMesh::setCoords : null pointer in input !");
+ if(coords==(DataArrayDouble *)_coords)
+ return ;
coords->checkAllocated();
int nbOfTuples=coords->getNumberOfTuples();
_coords=coords;
forceComputationOfParts();
tinyDouble.clear(); tinyInt.clear(); tinyStr.clear(); bigArraysI.clear(); bigArrayD=0;
std::vector<int> layer0;
- layer0.push_back(_order); //0 i
- layer0.push_back(_iteration);//1 i
- layer0.push_back(getSpaceDimension());//2 i
+ layer0.push_back(getAxType());//0 i
+ layer0.push_back(_order); //1 i
+ layer0.push_back(_iteration);//2 i
+ layer0.push_back(getSpaceDimension());//3 i
tinyDouble.push_back(_time);//0 d
tinyStr.push_back(_name);//0 s
tinyStr.push_back(_desc_name);//1 s
for(int i=0;i<getSpaceDimension();i++)
tinyStr.push_back(_coords->getInfoOnComponent(i));
- layer0.push_back((int)_families.size());//3 i <- key info aa layer#0
+ layer0.push_back((int)_families.size());//4 i <- key info aa layer#0
for(std::map<std::string,int>::const_iterator it=_families.begin();it!=_families.end();it++)
{
tinyStr.push_back((*it).first);
layer0.push_back((*it).second);
}
- layer0.push_back((int)_groups.size());//3+aa i <- key info bb layer#0
+ layer0.push_back((int)_groups.size());//4+aa i <- key info bb layer#0
for(std::map<std::string, std::vector<std::string> >::const_iterator it0=_groups.begin();it0!=_groups.end();it0++)
{
layer0.push_back((int)(*it0).second.size());
for(std::vector<std::string>::const_iterator it1=((*it0).second).begin();it1!=((*it0).second).end();it1++)
tinyStr.push_back(*it1);
}
- // sizeof(layer0)==3+aa+1+bb layer#0
+ // sizeof(layer0)==4+aa+1+bb layer#0
bigArrayD=_coords;// 0 bd
bigArraysI.push_back(_fam_coords);// 0 bi
bigArraysI.push_back(_num_coords);// 1 bi
std::reverse(tinyStr.begin(),tinyStr.end());
std::reverse(bigArraysI.begin(),bigArraysI.end());
//
+ setAxType((MEDCouplingAxisType)layer0.back()); layer0.pop_back();
_order=layer0.back(); layer0.pop_back();
_iteration=layer0.back(); layer0.pop_back();
int spaceDim(layer0.back()); layer0.pop_back();
* \return MEDCouplingMesh * - a pointer to MEDCouplingMesh that the caller is to
* delete using decrRef() as it is no more needed.
*/
-MEDCouplingMesh *MEDFileStructuredMesh::getGenMeshAtLevel(int meshDimRelToMax, bool renum) const
+MEDCouplingMesh *MEDFileStructuredMesh::getMeshAtLevel(int meshDimRelToMax, bool renum) const
{
if(renum)
throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh does not support renumbering ! To do it perform request of renum array directly !");
case -1:
{
if(!m)
- throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getGenMeshAtLevel : level -1 requested must be non empty to be able to compute unstructured sub mesh !");
+ throw INTERP_KERNEL::Exception("MEDFileStructuredMesh::getMeshAtLevel : level -1 requested must be non empty to be able to compute unstructured sub mesh !");
buildMinusOneImplicitPartIfNeeded();
- MEDCouplingMesh *ret(_faces_if_necessary);
+ MEDCoupling1SGTUMesh *ret(_faces_if_necessary);
if(ret)
ret->incrRef();
return ret;
int dt,it;
ParaMEDMEM::MEDCouplingMeshType meshType;
std::string dummy2;
- MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dt,it,dummy2);
+ ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
return new MEDFileCMesh(fid,ms.front(),dt,it,mrs);
}
MEDFileMesh *MEDFileCMesh::shallowCpy() const
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileCMesh> ret=new MEDFileCMesh(*this);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileCMesh> ret(new MEDFileCMesh(*this));
return ret.retn();
}
MEDFileMesh *MEDFileCMesh::deepCpy() const
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileCMesh> ret=new MEDFileCMesh(*this);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileCMesh> ret(new MEDFileCMesh(*this));
ret->deepCpyEquivalences(*this);
if((const MEDCouplingCMesh*)_cmesh)
ret->_cmesh=static_cast<MEDCouplingCMesh*>(_cmesh->deepCpy());
ParaMEDMEM::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dtunit;
- int mid=MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy0,dummy1,dtunit);
+ ParaMEDMEM::MEDCouplingAxisType axType;
+ int mid=MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,axType,dummy0,dummy1,dtunit);
if(meshType!=CARTESIAN)
{
std::ostringstream oss; oss << "Trying to load as cartesian an existing mesh with name '" << mName << "' that is NOT cartesian !";
}
MEDFileCMeshL2 loaderl2;
loaderl2.loadAll(fid,mid,mName,dt,it);
+ setAxType(loaderl2.getAxType());
MEDCouplingCMesh *mesh=loaderl2.getMesh();
mesh->incrRef();
_cmesh=mesh;
_cmesh=m;
}
+MEDFileMesh *MEDFileCMesh::cartesianize() const
+{
+ if(getAxType()==AX_CART)
+ {
+ incrRef();
+ return const_cast<MEDFileCMesh *>(this);
+ }
+ else
+ {
+ const MEDCouplingCMesh *cmesh(getMesh());
+ if(!cmesh)
+ throw INTERP_KERNEL::Exception("MEDFileCMesh::cartesianize : impossible to turn into cartesian because the mesh is null !");
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingCurveLinearMesh> clmesh(cmesh->buildCurveLinear());
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coords(clmesh->getCoords()->cartesianize(getAxType()));
+ clmesh->setCoords(coords);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret(MEDFileCurveLinearMesh::New());
+ ret->MEDFileStructuredMesh::operator=(*this);
+ ret->setMesh(clmesh);
+ ret->setAxType(AX_CART);
+ return ret.retn();
+ }
+}
+
void MEDFileCMesh::writeLL(med_idt fid) const
{
INTERP_KERNEL::AutoPtr<char> maa=MEDLoaderBase::buildEmptyString(MED_NAME_SIZE);
MEDLoaderBase::safeStrCpy2(c.c_str(),MED_SNAME_SIZE-1,comp+i*MED_SNAME_SIZE,_too_long_str);//MED_TAILLE_PNOM-1 to avoid to write '\0' on next compo
MEDLoaderBase::safeStrCpy2(u.c_str(),MED_SNAME_SIZE-1,unit+i*MED_SNAME_SIZE,_too_long_str);//MED_TAILLE_PNOM-1 to avoid to write '\0' on next compo
}
+ // MED_CARTESIAN and not MEDFileMeshL2::TraduceAxisTypeRev(getAxType()) ! Yes it is not a bug. The discrimination is done in MEDmeshGridTypeWr.
MEDFILESAFECALLERWR0(MEDmeshCr,(fid,maa,spaceDim,spaceDim,MED_STRUCTURED_MESH,desc,dtunit,MED_SORT_DTIT,MED_CARTESIAN,comp,unit));
if(_univ_wr_status)
MEDFILESAFECALLERWR0(MEDmeshUniversalNameWr,(fid,maa));
- MEDFILESAFECALLERWR0(MEDmeshGridTypeWr,(fid,maa,MED_CARTESIAN_GRID));
+ MEDFILESAFECALLERWR0(MEDmeshGridTypeWr,(fid,maa,MEDFileMeshL2::TraduceAxisTypeRevStruct(getAxType())));
for(int i=0;i<spaceDim;i++)
{
const DataArrayDouble *da=_cmesh->getCoordsAt(i);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dt,it;
ParaMEDMEM::MEDCouplingMeshType meshType;
+ ParaMEDMEM::MEDCouplingAxisType dummy3;
std::string dummy2;
- MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dt,it,dummy2);
+ MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
return new MEDFileCurveLinearMesh(fid,ms.front(),dt,it,mrs);
}
MEDFileMesh *MEDFileCurveLinearMesh::shallowCpy() const
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret=new MEDFileCurveLinearMesh(*this);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret(new MEDFileCurveLinearMesh(*this));
return ret.retn();
}
MEDFileMesh *MEDFileCurveLinearMesh::deepCpy() const
{
- MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret=new MEDFileCurveLinearMesh(*this);
+ MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret(new MEDFileCurveLinearMesh(*this));
ret->deepCpyEquivalences(*this);
if((const MEDCouplingCurveLinearMesh*)_clmesh)
ret->_clmesh=static_cast<MEDCouplingCurveLinearMesh*>(_clmesh->deepCpy());
_clmesh=m;
}
+MEDFileMesh *MEDFileCurveLinearMesh::cartesianize() const
+{
+ if(getAxType()==AX_CART)
+ {
+ incrRef();
+ return const_cast<MEDFileCurveLinearMesh *>(this);
+ }
+ else
+ {
+ const MEDCouplingCurveLinearMesh *mesh(getMesh());
+ if(!mesh)
+ throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh::cartesianize : impossible to turn into cartesian because the mesh is null !");
+ const DataArrayDouble *coords(mesh->getCoords());
+ if(!coords)
+ throw INTERP_KERNEL::Exception("MEDFileCurveLinearMesh::cartesianize : coordinate pointer in mesh is null !");
+ MEDCouplingAutoRefCountObjectPtr<MEDFileCurveLinearMesh> ret(new MEDFileCurveLinearMesh(*this));
+ MEDCouplingAutoRefCountObjectPtr<MEDCouplingCurveLinearMesh> mesh2(mesh->clone(false));
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coordsCart(coords->cartesianize(getAxType()));
+ mesh2->setCoords(coordsCart);
+ ret->setMesh(mesh2);
+ ret->setAxType(AX_CART);
+ return ret.retn();
+ }
+}
+
const MEDCouplingStructuredMesh *MEDFileCurveLinearMesh::getStructuredMesh() const
{
synchronizeTinyInfoOnLeaves();
MEDLoaderBase::safeStrCpy2(c.c_str(),MED_SNAME_SIZE-1,comp+i*MED_SNAME_SIZE,_too_long_str);//MED_TAILLE_PNOM-1 to avoid to write '\0' on next compo
MEDLoaderBase::safeStrCpy2(u.c_str(),MED_SNAME_SIZE-1,unit+i*MED_SNAME_SIZE,_too_long_str);//MED_TAILLE_PNOM-1 to avoid to write '\0' on next compo
}
- MEDFILESAFECALLERWR0(MEDmeshCr,(fid,maa,spaceDim,meshDim,MED_STRUCTURED_MESH,desc,dtunit,MED_SORT_DTIT,MED_CARTESIAN,comp,unit));
+ MEDFILESAFECALLERWR0(MEDmeshCr,(fid,maa,spaceDim,meshDim,MED_STRUCTURED_MESH,desc,dtunit,MED_SORT_DTIT,MEDFileMeshL2::TraduceAxisTypeRev(getAxType()),comp,unit));
if(_univ_wr_status)
MEDFILESAFECALLERWR0(MEDmeshUniversalNameWr,(fid,maa));
MEDFILESAFECALLERWR0(MEDmeshGridTypeWr,(fid,maa,MED_CURVILINEAR_GRID));
ParaMEDMEM::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dtunit;
- int mid=MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy0,dummy1,dtunit);
+ ParaMEDMEM::MEDCouplingAxisType axType;
+ int mid=MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,axType,dummy0,dummy1,dtunit);
+ setAxType(axType);
if(meshType!=CURVE_LINEAR)
{
std::ostringstream oss; oss << "Trying to load as curve linear an existing mesh with name '" << mName << "' that is NOT curve linear !";
return ret;
}
+void MEDFileMeshMultiTS::cartesianizeMe()
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> >::iterator it=_mesh_one_ts.begin();it!=_mesh_one_ts.end();it++)
+ {
+ MEDFileMesh *cur(*it);
+ if(cur)
+ {
+ MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> ccur(cur->cartesianize());// Attention ! Do not wrap these two lines because memory leak !
+ *it=ccur;
+ }
+ }
+}
+
MEDFileMesh *MEDFileMeshMultiTS::getOneTimeStep() const
{
if(_mesh_one_ts.empty())
int dt,it;
ParaMEDMEM::MEDCouplingMeshType meshType;
std::string dummy2;
- MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dt,it,dummy2);
+ ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
loadFromFile(fileName,ms.front());
}
catch(INTERP_KERNEL::Exception& e)
}
return ret;
}
-/*const MEDFileJoints* MEDFileMeshes::getJoints() const
-{
- const MEDFileJoints *ret=_joints;
- if(!ret)
- {
- std::ostringstream oss; oss << "MEDFileMeshes::getJoints : joints is not defined !";
- throw INTERP_KERNEL::Exception(oss.str().c_str());
- }
- return ret;
-}*/
bool MEDFileMeshes::changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab)
{
return ret;
}
+void MEDFileMeshes::cartesianizeMe()
+{
+ for(std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileMeshMultiTS> >::iterator it=_meshes.begin();it!=_meshes.end();it++)
+ {
+ MEDFileMeshMultiTS *cur(*it);
+ if(cur)
+ cur->cartesianizeMe();
+ }
+}
+
void MEDFileMeshes::resize(int newSize)
{
_meshes.resize(newSize);