extern INTERP_KERNEL::NormalizedCellType typmai2[MED_N_CELL_FIXED_GEO];
extern med_geometry_type typmainoeud[1];
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
const char MEDFileMeshL2::ZE_SEP_FOR_FAMILY_KILLERS[]="!/__\\!";//important start by - because ord('!')==33 the smallest (!=' ') to preserve orders at most.
return std::vector<const BigMemoryObject *>();
}
-int MEDFileMeshL2::GetMeshIdFromName(med_idt fid, const std::string& mname, ParaMEDMEM::MEDCouplingMeshType& meshType, ParaMEDMEM::MEDCouplingAxisType& axType, int& dt, int& it, std::string& dtunit1)
+int MEDFileMeshL2::GetMeshIdFromName(med_idt fid, const std::string& mname, MEDCoupling::MEDCouplingMeshType& meshType, MEDCoupling::MEDCouplingAxisType& axType, int& dt, int& it, std::string& dtunit1)
{
med_mesh_type type_maillage;
char maillage_description[MED_COMMENT_SIZE+1];
int naxis(MEDmeshnAxis(fid,i+1));
INTERP_KERNEL::AutoPtr<char> axisname=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
INTERP_KERNEL::AutoPtr<char> axisunit=MEDLoaderBase::buildEmptyString(naxis*MED_SNAME_SIZE);
- MEDFILESAFECALLERRD0(MEDmeshInfo,(fid,i+1,nommaa,&spaceDim,&dim,&type_maillage,maillage_description,dtunit,&stype,&nstep,&axistype,axisname,axisunit));
-
+ MEDFILESAFECALLERRD0(MEDmeshInfo,(fid,i+1,nommaa,&spaceDim,&dim,&type_maillage,maillage_description,dtunit,&stype,&nstep,&axistype,axisname,axisunit));
dtunit1=MEDLoaderBase::buildStringFromFortran(dtunit,sizeof(dtunit));
std::string cur=MEDLoaderBase::buildStringFromFortran(nommaa,sizeof(nommaa));
ms.push_back(cur);
/*!
* non static and non const method because _description, _dt_unit... are set in this method.
*/
-std::vector<std::string> MEDFileMeshL2::getAxisInfoOnMesh(med_idt fid, int mId, const std::string& mName, ParaMEDMEM::MEDCouplingMeshType& meshType, ParaMEDMEM::MEDCouplingAxisType& axType, int& nstep, int& Mdim)
+std::vector<std::string> MEDFileMeshL2::getAxisInfoOnMesh(med_idt fid, int mId, const std::string& mName, MEDCoupling::MEDCouplingMeshType& meshType, MEDCoupling::MEDCouplingAxisType& axType, int& nstep, int& Mdim)
{
med_mesh_type type_maillage;
med_int spaceDim;
return true;
}
-ParaMEDMEM::MEDCouplingAxisType MEDFileMeshL2::TraduceAxisType(med_axis_type at)
+MEDCoupling::MEDCouplingAxisType MEDFileMeshL2::TraduceAxisType(med_axis_type at)
{
switch(at)
{
}
}
-ParaMEDMEM::MEDCouplingAxisType MEDFileMeshL2::TraduceAxisTypeStruct(med_grid_type gt)
+MEDCoupling::MEDCouplingAxisType MEDFileMeshL2::TraduceAxisTypeStruct(med_grid_type gt)
{
switch(gt)
{
}
}
-med_axis_type MEDFileMeshL2::TraduceAxisTypeRev(ParaMEDMEM::MEDCouplingAxisType at)
+med_axis_type MEDFileMeshL2::TraduceAxisTypeRev(MEDCoupling::MEDCouplingAxisType at)
{
switch(at)
{
}
}
-med_grid_type MEDFileMeshL2::TraduceAxisTypeRevStruct(ParaMEDMEM::MEDCouplingAxisType at)
+med_grid_type MEDFileMeshL2::TraduceAxisTypeRevStruct(MEDCoupling::MEDCouplingAxisType at)
{
switch(at)
{
return MED_CARTESIAN_GRID;
case AX_CYL:
return MED_POLAR_GRID;
+ case AX_SPHER:
+ return MED_POLAR_GRID;
default:
- throw INTERP_KERNEL::Exception("MEDFileMeshL2::TraduceAxisTypeRevStruct : only Cartesian and Cylindrical supported by MED file !");
+ throw INTERP_KERNEL::Exception("MEDFileMeshL2::TraduceAxisTypeRevStruct : unrecognized axis type !");
}
}
Mdim=-3;
_name.set(mName.c_str());
int nstep;
- ParaMEDMEM::MEDCouplingMeshType meshType;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingAxisType dummy3;
std::vector<std::string> ret(getAxisInfoOnMesh(fid,mId,mName.c_str(),meshType,dummy3,nstep,Mdim));
if(nstep==0)
{
_name.set(mName.c_str());
int nstep;
int Mdim;
- ParaMEDMEM::MEDCouplingMeshType meshType;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingAxisType dummy3;
std::vector<std::string> infosOnComp=getAxisInfoOnMesh(fid,mId,mName.c_str(),meshType,dummy3,nstep,Mdim);
if(meshType!=CARTESIAN)
throw INTERP_KERNEL::Exception("Invalid mesh type ! You are expected a structured one whereas in file it is not a structured !");
_name.set(mName.c_str());
int nstep;
int Mdim;
- ParaMEDMEM::MEDCouplingMeshType meshType;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingAxisType dummy3;
std::vector<std::string> infosOnComp=getAxisInfoOnMesh(fid,mId,mName,meshType,dummy3,nstep,Mdim);
if(meshType!=CURVE_LINEAR)
throw INTERP_KERNEL::Exception("Invalid mesh type ! You are expected a structured one whereas in file it is not a structured !");
_m=m;
_m_by_types.assignUMesh(dynamic_cast<MEDCouplingUMesh *>(m->deepCpy()));
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> da=_m_by_types.getUmesh()->getRenumArrForConsecutiveCellTypesSpec(typmai2,typmai2+MED_N_CELL_FIXED_GEO);
- if(!da->isIdentity())
+ if(!da->isIdentity2(m->getNumberOfCells()))
{
_num=da->invertArrayO2N2N2O(m->getNumberOfCells());
_m.updateTime();
const MEDCoupling1GTUMesh *elt(_m_parts[i]);
if(elt)
{
- ret._m_parts[i]=static_cast<ParaMEDMEM::MEDCoupling1GTUMesh*>(elt->deepCpy());
+ ret._m_parts[i]=static_cast<MEDCoupling::MEDCoupling1GTUMesh*>(elt->deepCpy());
ret._m_parts[i]->setCoords(coords);
}
}
ret._mp_time=_mp_time; ret._m_time=_m_time;
if((const MEDCouplingUMesh *)_m)
{
- ret._m=static_cast<ParaMEDMEM::MEDCouplingUMesh*>(_m->deepCpy());
+ ret._m=static_cast<MEDCoupling::MEDCouplingUMesh*>(_m->deepCpy());
ret._m->setCoords(coords);
}
std::size_t sz(_part_def.size());