extern med_geometry_type typmai3[34];
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
const char MEDFileMesh::DFT_FAM_NAME[]="FAMILLE_ZERO";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
MEDFileUtilities::CheckFileForRead(fileName);
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dt,it;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> ret;
switch(meshType)
MEDFileMesh *MEDFileMesh::New(const std::string& fileName, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs, MEDFileJoints* joints)
{
MEDFileUtilities::CheckFileForRead(fileName);
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dummy0,dummy1;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy3,dummy0,dummy1,dummy2);
MEDCouplingAutoRefCountObjectPtr<MEDFileMesh> ret;
switch(meshType)
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dt,it;
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
return new MEDFileUMesh(fid,ms.front(),dt,it,mrs);
}
void MEDFileUMesh::loadPartUMeshFromFile(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& slicPerTyp, int dt, int it, MEDFileMeshReadSelector *mrs)
{
MEDFileUMeshL2 loaderl2;
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
int mid(MEDFileUMeshL2::GetMeshIdFromName(fid,mName,meshType,dummy3,dummy0,dummy1,dummy2));
if(meshType!=UNSTRUCTURED)
{
void MEDFileUMesh::loadLL(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
{
MEDFileUMeshL2 loaderl2;
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType axType;
+ MEDCoupling::MEDCouplingAxisType axType;
int mid(MEDFileUMeshL2::GetMeshIdFromName(fid,mName,meshType,axType,dummy0,dummy1,dummy2));
setAxType(axType);
if(meshType!=UNSTRUCTURED)
end=PutInThirdComponentOfCodeOffset(code2,start);
newCode.insert(newCode.end(),code2.begin(),code2.end());
//
- if(o2nCellsPart2->isIdentity())
+ if(o2nCellsPart2->isIdentity2(o2nCellsPart2->getNumberOfTuples()))
continue;
if(famField)
{
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dt,it;
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
return new MEDFileCMesh(fid,ms.front(),dt,it,mrs);
}
void MEDFileCMesh::loadLL(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
{
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dtunit;
- ParaMEDMEM::MEDCouplingAxisType axType;
+ MEDCoupling::MEDCouplingAxisType axType;
int mid=MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,axType,dummy0,dummy1,dtunit);
if(meshType!=CARTESIAN)
{
}
MEDFileCMeshL2 loaderl2;
loaderl2.loadAll(fid,mid,mName,dt,it);
- setAxType(loaderl2.getAxType());
+ setAxType(axType);
MEDCouplingCMesh *mesh=loaderl2.getMesh();
mesh->incrRef();
_cmesh=mesh;
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));
+ MEDFILESAFECALLERWR0(MEDmeshCr,(fid,maa,spaceDim,spaceDim,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,MEDFileMeshL2::TraduceAxisTypeRevStruct(getAxType())));
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dt,it;
- ParaMEDMEM::MEDCouplingMeshType meshType;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingAxisType dummy3;
std::string dummy2;
MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
return new MEDFileCurveLinearMesh(fid,ms.front(),dt,it,mrs);
void MEDFileCurveLinearMesh::loadLL(med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs)
{
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
int dummy0,dummy1;
std::string dtunit;
- ParaMEDMEM::MEDCouplingAxisType axType;
+ MEDCoupling::MEDCouplingAxisType axType;
int mid=MEDFileMeshL2::GetMeshIdFromName(fid,mName,meshType,axType,dummy0,dummy1,dtunit);
setAxType(axType);
if(meshType!=CURVE_LINEAR)
MEDFileUtilities::CheckFileForRead(fileName);
MEDFileUtilities::AutoFid fid=MEDfileOpen(fileName.c_str(),MED_ACC_RDONLY);
int dt,it;
- ParaMEDMEM::MEDCouplingMeshType meshType;
+ MEDCoupling::MEDCouplingMeshType meshType;
std::string dummy2;
- ParaMEDMEM::MEDCouplingAxisType dummy3;
+ MEDCoupling::MEDCouplingAxisType dummy3;
MEDFileMeshL2::GetMeshIdFromName(fid,ms.front(),meshType,dummy3,dt,it,dummy2);
loadFromFile(fileName,ms.front());
}