From: Anthony Geay Date: Wed, 20 Jan 2016 09:23:24 +0000 (+0100) Subject: 1st step. X-Git-Tag: V8_0_0b1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fagy%2FNamespaceModif;p=modules%2Fparavis.git 1st step. --- diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx index 4d3c82bd..9c19bfdf 100644 --- a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx +++ b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.cxx @@ -52,7 +52,7 @@ #include "vtkMutableDirectedGraph.h" -using namespace ParaMEDMEM; +using namespace MEDCoupling; const char MEDFileFieldRepresentationLeavesArrays::ZE_SEP[]="@@][@@"; @@ -74,7 +74,7 @@ const char MEDFileFieldRepresentationTree::ROOT_OF_FAM_IDS_IN_TREE[]="zeFamIds"; const char MEDFileFieldRepresentationTree::COMPO_STR_TO_LOCATE_MESH_DA[]="-@?|*_"; -vtkIdTypeArray *ELGACmp::findOrCreate(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const +vtkIdTypeArray *ELGACmp::findOrCreate(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const { vtkIdTypeArray *try0(isExisting(locsReallyUsed,vtkd)); if(try0) @@ -105,7 +105,7 @@ vtkIdTypeArray *ELGACmp::isExisting(const std::vector& locsReallyUs return ret; } -vtkIdTypeArray *ELGACmp::createNew(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const +vtkIdTypeArray *ELGACmp::createNew(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const { const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate::VTK_DATA_ARRAY_DELETE; std::vector< std::vector > locNames(_loc_names); @@ -198,21 +198,21 @@ MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays() { } -MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays(const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr& arr):ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr(arr),_activated(false),_id(-1) +MEDFileFieldRepresentationLeavesArrays::MEDFileFieldRepresentationLeavesArrays(const MEDCoupling::MEDCouplingAutoRefCountObjectPtr& arr):MEDCoupling::MEDCouplingAutoRefCountObjectPtr(arr),_activated(false),_id(-1) { - std::vector< std::vector > typs((operator->())->getTypesOfFieldAvailable()); + std::vector< std::vector > typs((operator->())->getTypesOfFieldAvailable()); if(typs.size()<1) throw INTERP_KERNEL::Exception("There is a big internal problem in MEDLoader ! The field time spitting has failed ! A CRASH will occur soon !"); if(typs[0].size()!=1) throw INTERP_KERNEL::Exception("There is a big internal problem in MEDLoader ! The field spitting by spatial discretization has failed ! A CRASH will occur soon !"); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr fd(MEDCouplingFieldDiscretization::New(typs[0][0])); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr fd(MEDCouplingFieldDiscretization::New(typs[0][0])); std::ostringstream oss2; oss2 << (operator->())->getName() << ZE_SEP << fd->getRepr(); _ze_name=oss2.str(); } MEDFileFieldRepresentationLeavesArrays& MEDFileFieldRepresentationLeavesArrays::operator=(const MEDFileFieldRepresentationLeavesArrays& other) { - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr::operator=(other); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr::operator=(other); _id=-1; _activated=false; _ze_name=other._ze_name; @@ -270,7 +270,7 @@ bool MEDFileFieldRepresentationLeavesArrays::setStatus(bool status) const return ret; } -void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshStruct *mst, vtkDataSet *ds) const +void MEDFileFieldRepresentationLeavesArrays::appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshStruct *mst, vtkDataSet *ds) const { const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate::VTK_DATA_ARRAY_FREE; const int VTK_DATA_ARRAY_DELETE=vtkDataArrayTemplate::VTK_DATA_ARRAY_DELETE; @@ -439,8 +439,8 @@ MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves():_cached_ds( { } -MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves(const std::vector< ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr >& arr, - const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr& fsp):_arrays(arr.size()),_fsp(fsp),_cached_ds(0) +MEDFileFieldRepresentationLeaves::MEDFileFieldRepresentationLeaves(const std::vector< MEDCoupling::MEDCouplingAutoRefCountObjectPtr >& arr, + const MEDCoupling::MEDCouplingAutoRefCountObjectPtr& fsp):_arrays(arr.size()),_fsp(fsp),_cached_ds(0) { for(std::size_t i=0;i& names) const +void MEDFileFieldRepresentationLeaves::feedSIL(const MEDCoupling::MEDFileMeshes *ms, const std::string& meshName, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector& names) const { vtkIdType root2(sil->AddChild(root,edge)); names.push_back(std::string("Arrs")); @@ -497,10 +497,10 @@ void MEDFileFieldRepresentationLeaves::feedSIL(const ParaMEDMEM::MEDFileMeshes * // vtkIdType root3(sil->AddChild(root,edge)); names.push_back(std::string("InfoOnGeoType")); - const ParaMEDMEM::MEDFileMesh *m(0); + const MEDCoupling::MEDFileMesh *m(0); if(ms) m=ms->getMeshWithName(meshName); - const ParaMEDMEM::MEDFileFastCellSupportComparator *fsp(_fsp); + const MEDCoupling::MEDFileFastCellSupportComparator *fsp(_fsp); if(!fsp || fsp->getNumberOfTS()==0) return ; std::vector< INTERP_KERNEL::NormalizedCellType > gts(fsp->getGeoTypesAt(0,m)); @@ -616,7 +616,7 @@ std::string MEDFileFieldRepresentationLeaves::getHumanReadableOverviewOfTS() con return oss.str(); } -void MEDFileFieldRepresentationLeaves::appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshes *meshes, vtkDataSet *ds) const +void MEDFileFieldRepresentationLeaves::appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshes *meshes, vtkDataSet *ds) const { if(_arrays.size()<1) throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationLeaves::appendFields : internal error !"); @@ -684,7 +684,7 @@ vtkUnstructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInt return ret; } -vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCartesian(ParaMEDMEM::MEDCMeshMultiLev *mm) const +vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCartesian(MEDCoupling::MEDCMeshMultiLev *mm) const { const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate::VTK_DATA_ARRAY_FREE; bool isInternal; @@ -737,7 +737,7 @@ vtkRectilinearGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInte return ret; } -vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCurveLinear(ParaMEDMEM::MEDCurveLinearMeshMultiLev *mm) const +vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolationCurveLinear(MEDCoupling::MEDCurveLinearMeshMultiLev *mm) const { const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate::VTK_DATA_ARRAY_FREE; int meshStr[3]={1,1,1}; @@ -779,7 +779,7 @@ vtkStructuredGrid *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInter return ret; } -vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDFileMeshes *meshes) const +vtkDataSet *MEDFileFieldRepresentationLeaves::buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes) const { const int VTK_DATA_ARRAY_FREE=vtkDataArrayTemplate::VTK_DATA_ARRAY_FREE; vtkDataSet *ret(0); @@ -1110,8 +1110,8 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam int nbMeshes(_ms->getNumberOfMeshes()); for(int i=0;igetMeshAtPos(i)); - ParaMEDMEM::MEDFileUMesh *tmp2(dynamic_cast(tmp)); + MEDCoupling::MEDFileMesh *tmp(_ms->getMeshAtPos(i)); + MEDCoupling::MEDFileUMesh *tmp2(dynamic_cast(tmp)); if(tmp2) MEDCouplingAutoRefCountObjectPtr tmp3(tmp2->zipCoords()); } @@ -1124,22 +1124,22 @@ void MEDFileFieldRepresentationTree::loadMainStructureOfFile(const char *fileNam } else { - MEDCouplingAutoRefCountObjectPtr sr(ParaMEDMEM::SauvReader::New(fileName)); - MEDCouplingAutoRefCountObjectPtr mfd(sr->loadInMEDFileDS()); + MEDCouplingAutoRefCountObjectPtr sr(MEDCoupling::SauvReader::New(fileName)); + MEDCouplingAutoRefCountObjectPtr mfd(sr->loadInMEDFileDS()); _ms=mfd->getMeshes(); _ms->incrRef(); int nbMeshes(_ms->getNumberOfMeshes()); for(int i=0;igetMeshAtPos(i)); - ParaMEDMEM::MEDFileUMesh *tmp2(dynamic_cast(tmp)); + MEDCoupling::MEDFileMesh *tmp(_ms->getMeshAtPos(i)); + MEDCoupling::MEDFileUMesh *tmp2(dynamic_cast(tmp)); if(tmp2) tmp2->forceComputationOfParts(); } _fields=mfd->getFields(); - if((ParaMEDMEM::MEDFileFields *)_fields) + if((MEDCoupling::MEDFileFields *)_fields) _fields->incrRef(); } - if(!((ParaMEDMEM::MEDFileFields *)_fields)) + if(!((MEDCoupling::MEDFileFields *)_fields)) { _fields=BuildFieldFromMeshes(_ms); } @@ -1407,7 +1407,7 @@ std::map MEDFileFieldRepresentationTree::dumpState() const return ret; } -void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms, ParaMEDMEM::MEDFileFields *ret) +void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms, MEDCoupling::MEDFileFields *ret) { if(!ret) throw INTERP_KERNEL::Exception("MEDFileFieldRepresentationTree::AppendFieldFromMeshes : internal error ! NULL ret !"); @@ -1415,7 +1415,7 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED { MEDFileMesh *mm(ms->getMeshAtPos(i)); std::vector levs(mm->getNonEmptyLevels()); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr f1tsMultiLev(ParaMEDMEM::MEDFileField1TS::New()); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr f1tsMultiLev(MEDCoupling::MEDFileField1TS::New()); MEDFileUMesh *mmu(dynamic_cast(mm)); if(mmu) { @@ -1424,10 +1424,10 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED std::vector gts(mmu->getGeoTypesAtLevel(*it)); for(std::vector::const_iterator gt=gts.begin();gt!=gts.end();gt++) { - ParaMEDMEM::MEDCouplingMesh *m(mmu->getDirectUndergroundSingleGeoTypeMesh(*gt)); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS)); + MEDCoupling::MEDCouplingMesh *m(mmu->getDirectUndergroundSingleGeoTypeMesh(*gt)); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr f(MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS)); f->setMesh(m); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected()); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr arr(MEDCoupling::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected()); arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA)); arr->iota(); f->setArray(arr); @@ -1440,10 +1440,10 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED std::vector levsExt(mm->getNonEmptyLevelsExt()); if(levsExt.size()==levs.size()+1) { - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr m(mm->getMeshAtLevel(1)); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_NODES)); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr m(mm->getMeshAtLevel(1)); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr f(MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_NODES)); f->setMesh(m); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes()); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr arr(MEDCoupling::DataArrayDouble::New()); arr->alloc(m->getNumberOfNodes()); arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA)); arr->iota(); f->setArray(arr); f->setName(BuildAUniqueArrayNameForMesh(mm->getName(),ret)); @@ -1455,10 +1455,10 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED } else { - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr m(mm->getMeshAtLevel(0)); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr f(ParaMEDMEM::MEDCouplingFieldDouble::New(ParaMEDMEM::ON_CELLS)); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr m(mm->getMeshAtLevel(0)); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr f(MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS)); f->setMesh(m); - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr arr(ParaMEDMEM::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected()); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr arr(MEDCoupling::DataArrayDouble::New()); arr->alloc(f->getNumberOfTuplesExpected()); arr->setInfoOnComponent(0,std::string(COMPO_STR_TO_LOCATE_MESH_DA)); arr->iota(); f->setArray(arr); @@ -1466,13 +1466,13 @@ void MEDFileFieldRepresentationTree::AppendFieldFromMeshes(const ParaMEDMEM::MED f1tsMultiLev->setFieldNoProfileSBT(f); } // - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr fmtsMultiLev(ParaMEDMEM::MEDFileFieldMultiTS::New()); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr fmtsMultiLev(MEDCoupling::MEDFileFieldMultiTS::New()); fmtsMultiLev->pushBackTimeStep(f1tsMultiLev); ret->pushField(fmtsMultiLev); } } -std::string MEDFileFieldRepresentationTree::BuildAUniqueArrayNameForMesh(const std::string& meshName, const ParaMEDMEM::MEDFileFields *ret) +std::string MEDFileFieldRepresentationTree::BuildAUniqueArrayNameForMesh(const std::string& meshName, const MEDCoupling::MEDFileFields *ret) { const char KEY_STR_TO_AVOID_COLLIDE[]="MESH@"; if(!ret) @@ -1486,9 +1486,9 @@ std::string MEDFileFieldRepresentationTree::BuildAUniqueArrayNameForMesh(const s return tmpName; } -ParaMEDMEM::MEDFileFields *MEDFileFieldRepresentationTree::BuildFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms) +MEDCoupling::MEDFileFields *MEDFileFieldRepresentationTree::BuildFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms) { - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr ret(ParaMEDMEM::MEDFileFields::New()); + MEDCoupling::MEDCouplingAutoRefCountObjectPtr ret(MEDCoupling::MEDFileFields::New()); AppendFieldFromMeshes(ms,ret); return ret.retn(); } diff --git a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx index 922ceb6a..2e5234c6 100644 --- a/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx +++ b/src/Plugins/MEDReader/IO/MEDFileFieldRepresentationTree.hxx @@ -46,12 +46,12 @@ class MEDTimeReq; class ELGACmp { public: - vtkIdTypeArray *findOrCreate(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const; + vtkIdTypeArray *findOrCreate(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds, bool& isNew) const; void appendELGAIfAny(vtkDataSet *ds) const; ~ELGACmp(); private: vtkIdTypeArray *isExisting(const std::vector& locsReallyUsed, vtkDoubleArray *vtkd) const; - vtkIdTypeArray *createNew(const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const; + vtkIdTypeArray *createNew(const MEDCoupling::MEDFileFieldGlobsReal *globs, const std::vector& locsReallyUsed, vtkDoubleArray *vtkd, vtkDataSet *ds) const; private: //! size of _loc_names is equal to _elgas. mutable std::vector< std::vector > _loc_names; @@ -61,11 +61,11 @@ private: mutable std::vector< std::vector< std::pair< vtkQuadratureSchemeDefinition *, unsigned char > > > _defs; }; -class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeavesArrays : public ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr +class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeavesArrays : public MEDCoupling::MEDCouplingAutoRefCountObjectPtr { public: MEDFileFieldRepresentationLeavesArrays(); - MEDFileFieldRepresentationLeavesArrays(const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr& arr); + MEDFileFieldRepresentationLeavesArrays(const MEDCoupling::MEDCouplingAutoRefCountObjectPtr& arr); MEDFileFieldRepresentationLeavesArrays& operator=(const MEDFileFieldRepresentationLeavesArrays& other); int getId() const; void setId(int& id) const; @@ -75,7 +75,7 @@ public: bool setStatus(bool status) const; std::string getZeName() const; const char *getZeNameC() const; - void appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshStruct *mst, vtkDataSet *ds) const; + void appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshStruct *mst, vtkDataSet *ds) const; void appendELGAIfAny(vtkDataSet *ds) const; public: static const char ZE_SEP[]; @@ -97,15 +97,15 @@ class MEDLOADERFORPV_EXPORT MEDFileFieldRepresentationLeaves { public: MEDFileFieldRepresentationLeaves(); - MEDFileFieldRepresentationLeaves(const std::vector< ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr >& arr, - const ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr& fsp); + MEDFileFieldRepresentationLeaves(const std::vector< MEDCoupling::MEDCouplingAutoRefCountObjectPtr >& arr, + const MEDCoupling::MEDCouplingAutoRefCountObjectPtr& fsp); ~MEDFileFieldRepresentationLeaves(); bool empty() const; void setId(int& id) const; std::string getMeshName() const; int getNumberOfArrays() const; int getNumberOfTS() const; - void feedSIL(const ParaMEDMEM::MEDFileMeshes *ms, const std::string& meshName, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector& names) const; + void feedSIL(const MEDCoupling::MEDFileMeshes *ms, const std::string& meshName, vtkMutableDirectedGraph* sil, vtkIdType root, vtkVariantArray *edge, std::vector& names) const; void computeFullNameInLeaves(const std::string& tsName, const std::string& meshName, const std::string& comSupStr) const; bool containId(int id) const; bool containZeName(const char *name, int& id) const; @@ -117,15 +117,15 @@ public: std::vector getTimeSteps(const TimeKeeper& tk) const; std::vector< std::pair > getTimeStepsInCoarseMEDFileFormat(std::vector& ts) const; std::string getHumanReadableOverviewOfTS() const; - vtkDataSet *buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDFileMeshes *meshes) const; + vtkDataSet *buildVTKInstanceNoTimeInterpolation(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDFileMeshes *meshes) const; private: - vtkUnstructuredGrid *buildVTKInstanceNoTimeInterpolationUnstructured(ParaMEDMEM::MEDUMeshMultiLev *mm) const; - vtkRectilinearGrid *buildVTKInstanceNoTimeInterpolationCartesian(ParaMEDMEM::MEDCMeshMultiLev *mm) const; - vtkStructuredGrid *buildVTKInstanceNoTimeInterpolationCurveLinear(ParaMEDMEM::MEDCurveLinearMeshMultiLev *mm) const; - void appendFields(const MEDTimeReq *tr, const ParaMEDMEM::MEDFileFieldGlobsReal *globs, const ParaMEDMEM::MEDMeshMultiLev *mml, const ParaMEDMEM::MEDFileMeshes *meshes, vtkDataSet *ds) const; + vtkUnstructuredGrid *buildVTKInstanceNoTimeInterpolationUnstructured(MEDCoupling::MEDUMeshMultiLev *mm) const; + vtkRectilinearGrid *buildVTKInstanceNoTimeInterpolationCartesian(MEDCoupling::MEDCMeshMultiLev *mm) const; + vtkStructuredGrid *buildVTKInstanceNoTimeInterpolationCurveLinear(MEDCoupling::MEDCurveLinearMeshMultiLev *mm) const; + void appendFields(const MEDTimeReq *tr, const MEDCoupling::MEDFileFieldGlobsReal *globs, const MEDCoupling::MEDMeshMultiLev *mml, const MEDCoupling::MEDFileMeshes *meshes, vtkDataSet *ds) const; private: std::vector _arrays; - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr _fsp; + MEDCoupling::MEDCouplingAutoRefCountObjectPtr _fsp; mutable vtkDataSet *_cached_ds; }; @@ -164,15 +164,15 @@ public: private: const MEDFileFieldRepresentationLeavesArrays& getLeafArr(int id) const; const MEDFileFieldRepresentationLeaves& getTheSingleActivated(int& lev0, int& lev1, int& lev2) const; - static ParaMEDMEM::MEDFileFields *BuildFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms); - static void AppendFieldFromMeshes(const ParaMEDMEM::MEDFileMeshes *ms, ParaMEDMEM::MEDFileFields *ret); - static std::string BuildAUniqueArrayNameForMesh(const std::string& meshName, const ParaMEDMEM::MEDFileFields *ret); + static MEDCoupling::MEDFileFields *BuildFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms); + static void AppendFieldFromMeshes(const MEDCoupling::MEDFileMeshes *ms, MEDCoupling::MEDFileFields *ret); + static std::string BuildAUniqueArrayNameForMesh(const std::string& meshName, const MEDCoupling::MEDFileFields *ret); static std::vector SplitFieldNameIntoParts(const std::string& fullFieldName, char sep); private: // 1st : timesteps, 2nd : meshName, 3rd : common support std::vector< std::vector< std::vector< MEDFileFieldRepresentationLeaves > > > _data_structure; - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr _ms; - ParaMEDMEM::MEDCouplingAutoRefCountObjectPtr _fields; + MEDCoupling::MEDCouplingAutoRefCountObjectPtr _ms; + MEDCoupling::MEDCouplingAutoRefCountObjectPtr _fields; }; class MEDLOADERFORPV_EXPORT TimeKeeper diff --git a/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx b/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx index 841257af..cefc18fa 100644 --- a/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx +++ b/src/Plugins/MEDReader/IO/vtkExtractCellType.cxx @@ -340,13 +340,13 @@ int vtkExtractCellType::RequestInformation(vtkInformation *request, vtkInformati const std::map::const_iterator it(m.find(vtkCt)); if(it==m.end()) { - const unsigned char *pos(std::find(ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH,vtkCt)); - if(pos==ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH) + const unsigned char *pos(std::find(MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH,vtkCt)); + if(pos==MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE+MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE_LGTH) { vtkDebugMacro("vtkExtractCellType::RequestInformation : cell #" << cellId << " has unrecognized type !"); return 0; } - m[vtkCt]=(INTERP_KERNEL::NormalizedCellType)std::distance(ParaMEDMEM::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,pos); + m[vtkCt]=(INTERP_KERNEL::NormalizedCellType)std::distance(MEDCoupling::MEDMeshMultiLev::PARAMEDMEM_2_VTKTYPE,pos); } } this->Internal->loadFrom(m); diff --git a/src/Plugins/MEDReader/Test/testMEDReader1.py b/src/Plugins/MEDReader/Test/testMEDReader1.py index 35eb88c6..c1dd49b7 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader1.py +++ b/src/Plugins/MEDReader/Test/testMEDReader1.py @@ -33,26 +33,26 @@ m.allocateCells() m.insertNextCell(NORM_QUAD4,[0,5,3,2]) m.insertNextCell(NORM_QUAD4,[4,2,3,1]) m.finishInsertingCells() -MEDLoader.WriteMesh(fname,m,True) +WriteMesh(fname,m,True) # f0=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f0.setMesh(m) ; f0.setTimeUnit("ms") f0.setTime(1.1,1,1) f0.setName("myELNOField") arr=DataArrayDouble([7,5,3,1,5,3,1,7]) ; arr.setInfoOnComponent(0,"Comp0") f0.setArray(arr) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0) +WriteFieldUsingAlreadyWrittenMesh(fname,f0) # f0.setTime(2.2,2,1) arr=DataArrayDouble([1,7,5,3,7,5,3,1]) ; arr.setInfoOnComponent(0,"Comp0") f0.setArray(arr) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0) +WriteFieldUsingAlreadyWrittenMesh(fname,f0) # f0.setTime(3.3,3,1) arr=DataArrayDouble([3,1,7,5,1,7,5,3]) ; arr.setInfoOnComponent(0,"Comp0") f0.setArray(arr) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0) +WriteFieldUsingAlreadyWrittenMesh(fname,f0) # f0.setTime(4.4,4,1) arr=DataArrayDouble([5,3,1,7,3,1,7,5]) ; arr.setInfoOnComponent(0,"Comp0") f0.setArray(arr) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0) +WriteFieldUsingAlreadyWrittenMesh(fname,f0) diff --git a/src/Plugins/MEDReader/Test/testMEDReader10.py b/src/Plugins/MEDReader/Test/testMEDReader10.py index e1e96a6e..c890d731 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader10.py +++ b/src/Plugins/MEDReader/Test/testMEDReader10.py @@ -47,11 +47,11 @@ arr=DataArrayDouble.Aggregate(arr,arr2) ; arr3=DataArrayDouble(16) ; arr3.iota() arr.setInfoOnComponents(["1st","2nd","3rd","4th"]) f3.setArray(arr) # -MEDLoader.WriteMesh(fname,m,True) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f0) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f1) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f2) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f3) +WriteMesh(fname,m,True) +WriteFieldUsingAlreadyWrittenMesh(fname,f0) +WriteFieldUsingAlreadyWrittenMesh(fname,f1) +WriteFieldUsingAlreadyWrittenMesh(fname,f2) +WriteFieldUsingAlreadyWrittenMesh(fname,f3) ################### MED write is done -> Go to MEDReader from paraview.simple import * diff --git a/src/Plugins/MEDReader/Test/testMEDReader13.py b/src/Plugins/MEDReader/Test/testMEDReader13.py index 362be950..3ede8aab 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader13.py +++ b/src/Plugins/MEDReader/Test/testMEDReader13.py @@ -35,7 +35,7 @@ f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setName("fieldELNO") ; f.setMesh(m) arr=DataArrayDouble([0.2,1.1,0.7,0.5,-0.3,0.4]) f.setArray(DataArrayDouble.Meld(4*[arr])) f.checkCoherency() -MEDLoader.WriteField(fname,f,True) +WriteField(fname,f,True) ################### MED write is done -> Go to MEDReader diff --git a/src/Plugins/MEDReader/Test/testMEDReader15.py b/src/Plugins/MEDReader/Test/testMEDReader15.py index 0f8ece63..b06e4400 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader15.py +++ b/src/Plugins/MEDReader/Test/testMEDReader15.py @@ -38,7 +38,7 @@ f.setName(zeName) f.setArray(DataArrayDouble([(-1.,1.,0.),(0.,1.,0.),(1.,1.,0.)])) tmp=MEDCouplingUMesh.Build0DMeshFromCoords(m.getCoords()) ; tmp.setName(zeName) f.setMesh(tmp) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f) +WriteFieldUsingAlreadyWrittenMesh(fname,f) # from paraview.simple import * diff --git a/src/Plugins/MEDReader/Test/testMEDReader16.py b/src/Plugins/MEDReader/Test/testMEDReader16.py index fd517df0..2b5487c1 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader16.py +++ b/src/Plugins/MEDReader/Test/testMEDReader16.py @@ -37,7 +37,7 @@ f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setMesh(m) ; f.setName("MyField") ; f. arr2=DataArrayDouble(4*4*2) ; arr2.iota() ; arr2.rearrange(2) ; arr2.setInfoOnComponents(["aa","bbb"]) f.setArray(arr2) ; arr2+=0.1 ; f.checkCoherency() mm.write(fname,2) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f) +WriteFieldUsingAlreadyWrittenMesh(fname,f) # from paraview.simple import * from paraview import servermanager diff --git a/src/Plugins/MEDReader/Test/testMEDReader17.py b/src/Plugins/MEDReader/Test/testMEDReader17.py index 7f68861d..5e25a6de 100644 --- a/src/Plugins/MEDReader/Test/testMEDReader17.py +++ b/src/Plugins/MEDReader/Test/testMEDReader17.py @@ -37,7 +37,7 @@ f=MEDCouplingFieldDouble(ON_GAUSS_NE) ; f.setMesh(m) ; f.setName("MyField") ; f. arr2=DataArrayDouble(4*4*2) ; arr2.iota() ; arr2.rearrange(2) ; arr2.setInfoOnComponents(["aa","bbb"]) f.setArray(arr2) ; arr2+=0.1 ; f.checkCoherency() mm.write(fname,2) -MEDLoader.WriteFieldUsingAlreadyWrittenMesh(fname,f) +WriteFieldUsingAlreadyWrittenMesh(fname,f) # from paraview.simple import * from paraview import servermanager