From 087e7fc0f8aa7d941857a37de78844d0a8cf1ed2 Mon Sep 17 00:00:00 2001 From: abn Date: Wed, 20 Jan 2016 14:31:57 +0100 Subject: [PATCH] MEDCoupling API change - stage #1 --- doc/dev/sphinx/fr/medcalc-userguide-api.rst | 2 +- doc/dev/sphinx/medcalc-userguide-api.rst | 2 +- doc/tut/medcoupling/partition.py | 6 +- doc/tut/mergefields/splitdemo/splitdemo.py | 4 +- .../splitdemo/splitdemo_partiel.py | 4 +- .../projection/demomed/demo_createsource.py | 2 +- doc/tut/projection/demomed/demo_loadsource.py | 4 +- doc/tut/projection/demovtu/projection.py | 4 +- src/MEDCalc/cmp/MEDDataManager_i.cxx | 16 ++-- src/MEDCalc/cmp/MEDPresentation.cxx | 2 +- .../gui/dialogs/DlgInterpolateField.cxx | 2 +- src/MEDCalculator/MEDCalculatorDBField.cxx | 94 +++++++++---------- src/MEDCalculator/MEDCalculatorDBField.hxx | 6 +- .../MEDCalculatorDBSliceField.cxx | 50 +++++----- src/MEDCalculator/Swig/MEDCalculator.i | 4 +- .../Test/MEDCalculatorBasicsTest.cxx | 2 +- .../Client/MEDCouplingExtrudedMeshClient.cxx | 6 +- .../Client/MEDCouplingExtrudedMeshClient.hxx | 4 +- .../Client/MEDCouplingMeshClient.cxx | 2 +- .../MEDCouplingExtrudedMeshServant.cxx | 4 +- .../MEDCouplingExtrudedMeshServant.hxx | 8 +- .../MEDCouplingFieldServant.cxx | 4 +- .../MEDCouplingMeshFieldFactoryComponent.cxx | 50 +++++----- .../MEDCouplingMeshFieldFactoryComponent.hxx | 4 +- ...EDCouplingMeshFieldFactoryComponentClt.cxx | 6 +- ...DCouplingMeshFieldFactoryComponentServ.cxx | 4 +- .../Client/MEDCouplingClient.i | 6 +- src/MEDCouplingCorba_Swig/MEDCouplingCorba.i | 14 +-- .../MEDCouplingCorbaSwigTest.py | 48 +++++----- 29 files changed, 182 insertions(+), 182 deletions(-) diff --git a/doc/dev/sphinx/fr/medcalc-userguide-api.rst b/doc/dev/sphinx/fr/medcalc-userguide-api.rst index 8f80ecf38..e498baa68 100644 --- a/doc/dev/sphinx/fr/medcalc-userguide-api.rst +++ b/doc/dev/sphinx/fr/medcalc-userguide-api.rst @@ -469,7 +469,7 @@ requires the usage of interpolation algorithms provided by the Some comments on this code: * The physical property to be preserved by this interpolation is - specified using the keyword :tt:`ConservativeVolumic` + specified using the keyword :tt:`IntensiveMaximum` * The parameter :tt:`P0P0` given at the preparation step of the remapper specifies that the interpolation is done from CELLS (P0) to CELLS (P0). diff --git a/doc/dev/sphinx/medcalc-userguide-api.rst b/doc/dev/sphinx/medcalc-userguide-api.rst index 161e0551f..96df82504 100644 --- a/doc/dev/sphinx/medcalc-userguide-api.rst +++ b/doc/dev/sphinx/medcalc-userguide-api.rst @@ -469,7 +469,7 @@ requires the usage of interpolation algorithms provided by the Some comments on this code: * The physical property to be preserved by this interpolation is - specified using the keyword :tt:`ConservativeVolumic` + specified using the keyword :tt:`IntensiveMaximum` * The parameter :tt:`P0P0` given at the preparation step of the remapper specifies that the interpolation is done from CELLS (P0) to CELLS (P0). diff --git a/doc/tut/medcoupling/partition.py b/doc/tut/medcoupling/partition.py index 5b6152e2f..44ae1356c 100644 --- a/doc/tut/medcoupling/partition.py +++ b/doc/tut/medcoupling/partition.py @@ -41,7 +41,7 @@ a=DataArrayDouble.New([1.,1.,1.,-1.,-1.,-1.,-1.,-1.]) field=MEDCouplingFieldDouble.New(ON_CELLS,ONE_TIME) field.setMesh(m3D) field.setArray(a) -field.checkCoherency() +field.checkConsistencyLight() field.setName("f") # Save the field (and associated mesh) @@ -61,7 +61,7 @@ MEDLoader.WriteField("partition_input.med",field,True) # _T1A L=0. arr = field.getArray() -ids = arr.getIdsInRange(L,1e300) +ids = arr.findIdsInRange(L,1e300) m3DSub = field.getMesh()[ids] skin = m3DSub.computeSkin() MEDLoader.WriteUMesh("partition_skin.med",skin,True); @@ -73,7 +73,7 @@ MEDLoader.WriteUMesh("partition_skin.med",skin,True); # SALOME V650 requires a more complicated syntax. m2D,desc,descI,revDesc,revDescI=m3DSub.buildDescendingConnectivity() numberOf3DVolSharing=revDescI.deltaShiftIndex() -ids2D=numberOf3DVolSharing.getIdsEqual(1) +ids2D=numberOf3DVolSharing.findIdsEqual(1) skin_V650=m2D[ids2D] # We can check if the two skins are identical print "Are two meshes equal between V660 and V650 ?",skin.isEqual(skin_V650,1e-12) diff --git a/doc/tut/mergefields/splitdemo/splitdemo.py b/doc/tut/mergefields/splitdemo/splitdemo.py index 067a1e918..3d65d7dab 100644 --- a/doc/tut/mergefields/splitdemo/splitdemo.py +++ b/doc/tut/mergefields/splitdemo/splitdemo.py @@ -34,7 +34,7 @@ for fn in fns: m=MEDFileMesh.New(fn) m=m.getMeshAtLevel(0) m.writeVTK(outs[i]) - mns[i]=m.deepCpy() + mns[i]=m.deepCopy() if splitview: m.translate([scal*elt for elt in trs[i]]) f=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME) @@ -42,7 +42,7 @@ for fn in fns: da=DataArrayDouble.New() da.alloc(m.getNumberOfCells(),1) da.fillWithValue(i) - dds[i]=da.deepCpy() + dds[i]=da.deepCopy() f.setArray(da) fs[i]=f i+=1 diff --git a/doc/tut/mergefields/splitdemo/splitdemo_partiel.py b/doc/tut/mergefields/splitdemo/splitdemo_partiel.py index 4a5e2ec5c..c22a45bcd 100644 --- a/doc/tut/mergefields/splitdemo/splitdemo_partiel.py +++ b/doc/tut/mergefields/splitdemo/splitdemo_partiel.py @@ -34,7 +34,7 @@ for fn in fns: m=MEDFileMesh.New(fn) m=m.getMeshAtLevel(0) m.writeVTK(outs[i]) - mns[i]=m.deepCpy() + mns[i]=m.deepCopy() if splitview: m.translate([scal*elt for elt in trs[i]]) f=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME) @@ -42,7 +42,7 @@ for fn in fns: da=DataArrayDouble.New() da.alloc(m.getNumberOfCells(),1) da.fillWithValue(i) - dds[i]=da.deepCpy() + dds[i]=da.deepCopy() f.setArray(da) fs[i]=f i+=1 diff --git a/doc/tut/projection/demomed/demo_createsource.py b/doc/tut/projection/demomed/demo_createsource.py index 946e2a81c..3a10b1d5a 100644 --- a/doc/tut/projection/demomed/demo_createsource.py +++ b/doc/tut/projection/demomed/demo_createsource.py @@ -30,7 +30,7 @@ msource = MEDLoader.ReadUMeshFromFile("meshsource.med","meshsource",0) equation = "319.*cos(((x)*(x)*3+(y-0.52)*(y-0.52)+(z-0.1)*(z-0.1))*7)" fsource=msource.fillFromAnalytic(ON_CELLS,1,equation) fsource.setName("Temperature") -fsource.setNature(ConservativeVolumic) +fsource.setNature(IntensiveMaximum) # Read the target mesh mtarget = MEDLoader.ReadUMeshFromFile("meshtarget.med","meshtarget",0) diff --git a/doc/tut/projection/demomed/demo_loadsource.py b/doc/tut/projection/demomed/demo_loadsource.py index a197c1438..0930b32ac 100644 --- a/doc/tut/projection/demomed/demo_loadsource.py +++ b/doc/tut/projection/demomed/demo_loadsource.py @@ -19,7 +19,7 @@ # _T1A from MEDLoader import MEDLoader, ON_CELLS -from MEDCouplingRemapper import MEDCouplingRemapper, ConservativeVolumic +from MEDCouplingRemapper import MEDCouplingRemapper, IntensiveMaximum # Read the source mesh and the source field it,dt = (-1,-1) @@ -27,7 +27,7 @@ msource = MEDLoader.ReadUMeshFromFile("fieldsource.med","meshsource",0) fsource = MEDLoader.ReadField(ON_CELLS,"fieldsource.med","meshsource",0, "Temperature",it,dt) fsource.setMesh(msource) -fsource.setNature(ConservativeVolumic) +fsource.setNature(IntensiveMaximum) # Read the target mesh mtarget = MEDLoader.ReadUMeshFromFile("meshtarget.med","meshtarget",0) diff --git a/doc/tut/projection/demovtu/projection.py b/doc/tut/projection/demovtu/projection.py index 6ec7353d9..50eee8ca5 100644 --- a/doc/tut/projection/demovtu/projection.py +++ b/doc/tut/projection/demovtu/projection.py @@ -23,11 +23,11 @@ from MEDCouplingRemapper import * ms=MEDFileMesh.New("MeshSource.med") ; ms=ms.getMeshAtLevel(0) mt=MEDFileMesh.New("MeshTarget.med") ; mt=mt.getMeshAtLevel(0) fs=ms.fillFromAnalytic(ON_CELLS,1,"319.*cos(((x)*(x)*3+(y-0.52)*(y-0.52)+(z-0.1)*(z-0.1))*7)") -fs.setNature(ConservativeVolumic) +fs.setNature(IntensiveMaximum) fs.setName("Temperature") MEDCouplingFieldDouble.WriteVTK("MeshSource.vtu",[fs]) -mt2=mt.deepCpy() +mt2=mt.deepCopy() mt2.translate([0.4,0.,0.]) mt2.writeVTK("MeshTarget.vtu") # diff --git a/src/MEDCalc/cmp/MEDDataManager_i.cxx b/src/MEDCalc/cmp/MEDDataManager_i.cxx index 6f489dd01..f82a1f9e3 100644 --- a/src/MEDCalc/cmp/MEDDataManager_i.cxx +++ b/src/MEDCalc/cmp/MEDDataManager_i.cxx @@ -780,17 +780,17 @@ MEDCoupling::NatureOfField MEDDataManager_i::_getNatureOfField(const char* field if (nature == "NoNature") { return NoNature; } - else if (nature == "ConservativeVolumic") { - return ConservativeVolumic; + else if (nature == "IntensiveMaximum") { + return IntensiveMaximum; } - else if (nature == "Integral") { - return Integral; + else if (nature == "ExtensiveMaximum") { + return ExtensiveMaximum; } - else if (nature == "IntegralGlobConstraint") { - return IntegralGlobConstraint; + else if (nature == "ExtensiveConservation") { + return ExtensiveConservation; } - else if (nature == "RevIntegral") { - return RevIntegral; + else if (nature == "IntensiveConservation") { + return IntensiveConservation; } std::string message("Error when trying to interpolate field: "); diff --git a/src/MEDCalc/cmp/MEDPresentation.cxx b/src/MEDCalc/cmp/MEDPresentation.cxx index 9498c737e..f84d37eaf 100644 --- a/src/MEDCalc/cmp/MEDPresentation.cxx +++ b/src/MEDCalc/cmp/MEDPresentation.cxx @@ -133,4 +133,4 @@ void MEDPresentationScalarMap::internalGeneratePipeline() pushInternal(obj, disp); PyGILState_Release(_gil_state); -} \ No newline at end of file +} diff --git a/src/MEDCalc/gui/dialogs/DlgInterpolateField.cxx b/src/MEDCalc/gui/dialogs/DlgInterpolateField.cxx index 1d49c9072..842af0eef 100644 --- a/src/MEDCalc/gui/dialogs/DlgInterpolateField.cxx +++ b/src/MEDCalc/gui/dialogs/DlgInterpolateField.cxx @@ -31,7 +31,7 @@ DlgInterpolateField::DlgInterpolateField(SALOME_AppStudyEditor * studyEditor, this->ui.comboBoxMethod->addItems(methods); QStringList natures; - natures << "NoNature" << "ConservativeVolumic" << "Integral" << "IntegralGlobConstraint" << "RevIntegral"; + natures << "NoNature" << "IntensiveMaximum" << "ExtensiveMaximum" << "ExtensiveConservation" << "IntensiveConservation"; this->ui.comboBoxNature->addItems(natures); connect(this->ui.btnSelectMesh, SIGNAL(clicked()), this, SLOT(OnSelectMesh())); diff --git a/src/MEDCalculator/MEDCalculatorDBField.cxx b/src/MEDCalculator/MEDCalculatorDBField.cxx index 6ceda64b4..5e8605436 100644 --- a/src/MEDCalculator/MEDCalculatorDBField.cxx +++ b/src/MEDCalculator/MEDCalculatorDBField.cxx @@ -58,25 +58,25 @@ std::vector MEDCalculatorDBField::getDirectChildrenWith MEDCalculatorDBField *MEDCalculatorDBField::operator+(double val) const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr par2=new MEDCalculatorDBFieldCst(val); + MCAuto par2=new MEDCalculatorDBFieldCst(val); return (*this)+(*par2); } MEDCalculatorDBField *MEDCalculatorDBField::operator-(double val) const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr par2=new MEDCalculatorDBFieldCst(val); + MCAuto par2=new MEDCalculatorDBFieldCst(val); return (*this)-(*par2); } MEDCalculatorDBField *MEDCalculatorDBField::operator*(double val) const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr par2=new MEDCalculatorDBFieldCst(val); + MCAuto par2=new MEDCalculatorDBFieldCst(val); return (*this)*(*par2); } MEDCalculatorDBField *MEDCalculatorDBField::operator/(double val) const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr par2=new MEDCalculatorDBFieldCst(val); + MCAuto par2=new MEDCalculatorDBFieldCst(val); return (*this)/(*par2); } @@ -147,13 +147,13 @@ void MEDCalculatorDBFieldReal::display() const throw(INTERP_KERNEL::Exception) { fetchData(); std::vector ids=_t.getIds(_time_steps.size()); - std::vector< MEDCouplingAutoRefCountObjectPtr > fs2(ids.size()); + std::vector< MCAuto > fs2(ids.size()); int ii=0; for(std::vector::const_iterator iter=ids.begin();iter!=ids.end();iter++) fs2[ii++]=_time_steps[*iter]->getFieldWithoutQuestion(_c_labels.size(),_c); std::vector fs(fs2.size()); std::copy(fs2.begin(),fs2.end(),fs.begin()); - MEDCouplingAutoRefCountObjectPtr fot=MEDCouplingFieldOverTime::New(fs); + MCAuto fot=MEDCouplingFieldOverTime::New(fs); // int argc=0; CORBA::ORB_var orb=CORBA::ORB_init(argc,0); @@ -207,14 +207,14 @@ MEDCalculatorDBFieldReal::MEDCalculatorDBFieldReal(const MEDCalculatorBrowserFie int sz=steps.size(); for(int i=0;i elt(new MEDCalculatorDBSliceField(steps[i].getTimeStep(),steps[i].getOrder())); + MCAuto elt(new MEDCalculatorDBSliceField(steps[i].getTimeStep(),steps[i].getOrder())); _time_steps.push_back(elt); } } const MEDCalculatorDBFieldReal& MEDCalculatorDBFieldReal::operator=(const MEDCalculatorDBFieldReal& other) throw(INTERP_KERNEL::Exception) { - checkCoherency(other); + checkConsistencyLight(other); std::vector ids=_t.getIds(_time_steps.size()); std::vector ids2=other._t.getIds(other._time_steps.size()); unsigned int sz=ids.size(); @@ -229,7 +229,7 @@ const MEDCalculatorDBFieldReal& MEDCalculatorDBFieldReal::operator=(const MEDCal const MEDCalculatorDBFieldReal& MEDCalculatorDBFieldReal::operator=(double val) throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr other=buildCstFieldFromThis(val); + MCAuto other=buildCstFieldFromThis(val); return (*this)=*other; } @@ -244,7 +244,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator+(const MEDCalculatorDBF const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr othercr=buildCstFieldFromThis(otherc->getValue()); + MCAuto othercr=buildCstFieldFromThis(otherc->getValue()); MEDCalculatorDBField *ret=add(*othercr); return ret; } @@ -255,8 +255,8 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator+(const MEDCalculatorDBF MEDCalculatorDBField *MEDCalculatorDBFieldReal::add(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) { - checkCoherency(other); - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + checkConsistencyLight(other); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); other.fetchData(); DataArrayInt *cellCor,*nodeCor; @@ -294,7 +294,7 @@ bool MEDCalculatorDBFieldReal::isEqual(const MEDCalculatorDBField& other, double const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr othercr=buildCstFieldFromThis(otherc->getValue()); + MCAuto othercr=buildCstFieldFromThis(otherc->getValue()); bool ret=isEqualSameType(*othercr,precM,precF); return ret; } @@ -341,7 +341,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator-(const MEDCalculatorDBF const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr othercr=buildCstFieldFromThis(otherc->getValue()); + MCAuto othercr=buildCstFieldFromThis(otherc->getValue()); MEDCalculatorDBField *ret=substract(*othercr); return ret; } @@ -352,8 +352,8 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator-(const MEDCalculatorDBF MEDCalculatorDBField *MEDCalculatorDBFieldReal::substract(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) { - checkCoherency(other); - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + checkConsistencyLight(other); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); other.fetchData(); DataArrayInt *cellCor,*nodeCor; @@ -391,7 +391,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator*(const MEDCalculatorDBF const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr othercr=buildCstFieldFromThis(otherc->getValue()); + MCAuto othercr=buildCstFieldFromThis(otherc->getValue()); MEDCalculatorDBField *ret=multiply(*othercr); return ret; } @@ -402,8 +402,8 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator*(const MEDCalculatorDBF MEDCalculatorDBField *MEDCalculatorDBFieldReal::multiply(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) { - checkCoherency(other); - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + checkConsistencyLight(other); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); other.fetchData(); DataArrayInt *cellCor,*nodeCor; @@ -441,7 +441,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator/(const MEDCalculatorDBF const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr othercr=buildCstFieldFromThis(otherc->getValue()); + MCAuto othercr=buildCstFieldFromThis(otherc->getValue()); MEDCalculatorDBField *ret=divide(*othercr); return ret; } @@ -452,8 +452,8 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator/(const MEDCalculatorDBF MEDCalculatorDBField *MEDCalculatorDBFieldReal::divide(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) { - checkCoherency(other); - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + checkConsistencyLight(other); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); other.fetchData(); DataArrayInt *cellCor,*nodeCor; @@ -487,8 +487,8 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::operator^(const MEDCalculatorDBF MEDCalculatorDBField *MEDCalculatorDBFieldReal::dot(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) { - checkCoherency(other); - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + checkConsistencyLight(other); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); other.fetchData(); std::vector ids=_t.getIds(_time_steps.size()); @@ -507,8 +507,8 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::dot(const MEDCalculatorDBFieldRe MEDCalculatorDBField *MEDCalculatorDBFieldReal::crossProduct(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) { - checkCoherency(other); - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + checkConsistencyLight(other); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); other.fetchData(); std::vector ids=_t.getIds(_time_steps.size()); @@ -527,7 +527,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::crossProduct(const MEDCalculator MEDCalculatorDBField *MEDCalculatorDBFieldReal::doublyContractedProduct() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -542,7 +542,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::doublyContractedProduct() const MEDCalculatorDBField *MEDCalculatorDBFieldReal::determinant() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -557,7 +557,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::determinant() const throw(INTERP MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenValues() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -578,7 +578,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenValues() const throw(INTERP MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenVectors() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -599,7 +599,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::eigenVectors() const throw(INTER MEDCalculatorDBField *MEDCalculatorDBFieldReal::inverse() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -620,7 +620,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::inverse() const throw(INTERP_KER MEDCalculatorDBField *MEDCalculatorDBFieldReal::trace() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -635,7 +635,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::trace() const throw(INTERP_KERNE MEDCalculatorDBField *MEDCalculatorDBFieldReal::deviator() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -656,7 +656,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldReal::deviator() const throw(INTERP_KE MEDCalculatorDBField *MEDCalculatorDBFieldReal::magnitude() const throw(INTERP_KERNEL::Exception) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); fetchData(); std::vector ids=_t.getIds(_time_steps.size()); unsigned int sz=ids.size(); @@ -679,7 +679,7 @@ void MEDCalculatorDBFieldReal::applyFunc(const char *func) throw(INTERP_KERNEL:: MEDCalculatorDBFieldReal *MEDCalculatorDBFieldReal::buildCstFieldFromThis(double val) const { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldReal(_type); + MCAuto ret=new MEDCalculatorDBFieldReal(_type); ret->_p=_p; ret->_c_labels.resize(_c.getSize(_c_labels.size())); std::vector stps=_t.getIds(_time_steps.size()); @@ -696,7 +696,7 @@ MEDCalculatorDBFieldReal *MEDCalculatorDBFieldReal::buildCstFieldFromThis(double return ret; } -void MEDCalculatorDBFieldReal::checkCoherency(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) +void MEDCalculatorDBFieldReal::checkConsistencyLight(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception) { if(_type!=other._type) throw INTERP_KERNEL::Exception("Types of field mismatch !"); @@ -714,7 +714,7 @@ void MEDCalculatorDBFieldReal::fetchData() const throw(INTERP_KERNEL::Exception) std::vector idsInGlobalToFetch; for(int i=0;i elt=_time_steps[ids[i]]; + MCAuto elt=_time_steps[ids[i]]; if(!elt->isFetched()) { int dt,it; @@ -728,7 +728,7 @@ void MEDCalculatorDBFieldReal::fetchData() const throw(INTERP_KERNEL::Exception) sz=fs.size(); for(int i=0;i elt=_time_steps[idsInGlobalToFetch[i]]; + MCAuto elt=_time_steps[idsInGlobalToFetch[i]]; elt->setField(fs[i]); } } @@ -791,7 +791,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator+(const MEDCalculatorDBFi const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldCst(*this); + MCAuto ret=new MEDCalculatorDBFieldCst(*this); ret->_val=_val+otherc->_val; ret->incrRef(); return ret; @@ -801,7 +801,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator+(const MEDCalculatorDBFi const MEDCalculatorDBFieldReal *otherr=dynamic_cast(other2); if(otherr) { - MEDCouplingAutoRefCountObjectPtr thisr=otherr->buildCstFieldFromThis(_val); + MCAuto thisr=otherr->buildCstFieldFromThis(_val); MEDCalculatorDBField *ret=(*thisr)+other; return ret; } @@ -816,7 +816,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator-(const MEDCalculatorDBFi const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldCst(*this); + MCAuto ret=new MEDCalculatorDBFieldCst(*this); ret->_val=_val-otherc->_val; ret->incrRef(); return ret; @@ -826,7 +826,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator-(const MEDCalculatorDBFi const MEDCalculatorDBFieldReal *otherr=dynamic_cast(other2); if(otherr) { - MEDCouplingAutoRefCountObjectPtr thisr=otherr->buildCstFieldFromThis(_val); + MCAuto thisr=otherr->buildCstFieldFromThis(_val); MEDCalculatorDBField *ret=(*thisr)-other; return ret; } @@ -841,7 +841,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator*(const MEDCalculatorDBFi const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldCst(*this); + MCAuto ret=new MEDCalculatorDBFieldCst(*this); ret->_val=_val*otherc->_val; ret->incrRef(); return ret; @@ -851,7 +851,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator*(const MEDCalculatorDBFi const MEDCalculatorDBFieldReal *otherr=dynamic_cast(other2); if(otherr) { - MEDCouplingAutoRefCountObjectPtr thisr=otherr->buildCstFieldFromThis(_val); + MCAuto thisr=otherr->buildCstFieldFromThis(_val); MEDCalculatorDBField *ret=(*thisr)*other; return ret; } @@ -866,7 +866,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator/(const MEDCalculatorDBFi const MEDCalculatorDBFieldCst *otherc=dynamic_cast(other2); if(otherc) { - MEDCouplingAutoRefCountObjectPtr ret=new MEDCalculatorDBFieldCst(*this); + MCAuto ret=new MEDCalculatorDBFieldCst(*this); ret->_val=_val/otherc->_val; ret->incrRef(); return ret; @@ -876,7 +876,7 @@ MEDCalculatorDBField *MEDCalculatorDBFieldCst::operator/(const MEDCalculatorDBFi const MEDCalculatorDBFieldReal *otherr=dynamic_cast(other2); if(otherr) { - MEDCouplingAutoRefCountObjectPtr thisr=otherr->buildCstFieldFromThis(_val); + MCAuto thisr=otherr->buildCstFieldFromThis(_val); MEDCalculatorDBField *ret=(*thisr)/other; return ret; } @@ -896,7 +896,7 @@ bool MEDCalculatorDBFieldCst::isEqual(const MEDCalculatorDBField& other, double const MEDCalculatorDBFieldReal *otherr=dynamic_cast(other2); if(otherr) { - MEDCouplingAutoRefCountObjectPtr thisr=otherr->buildCstFieldFromThis(_val); + MCAuto thisr=otherr->buildCstFieldFromThis(_val); bool ret=thisr->isEqual(other,precM,precF); return ret; } diff --git a/src/MEDCalculator/MEDCalculatorDBField.hxx b/src/MEDCalculator/MEDCalculatorDBField.hxx index d61089fef..e1557cc91 100644 --- a/src/MEDCalculator/MEDCalculatorDBField.hxx +++ b/src/MEDCalculator/MEDCalculatorDBField.hxx @@ -26,7 +26,7 @@ #include "MEDCalculatorDBRangeSelection.hxx" #include "MEDCouplingRefCountObject.hxx" -#include "MEDCouplingAutoRefCountObjectPtr.hxx" +#include "MCAuto.hxx" #include "InterpKernelException.hxx" @@ -94,7 +94,7 @@ namespace MEDCoupling bool isEqual(const MEDCalculatorDBField& other, double precM, double precF) const; bool isEqualSameType(const MEDCalculatorDBFieldReal& other, double precM, double precF) const; MEDCalculatorDBFieldReal *buildCstFieldFromThis(double val) const; - void checkCoherency(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception); + void checkConsistencyLight(const MEDCalculatorDBFieldReal& other) const throw(INTERP_KERNEL::Exception); void fetchData() const throw(INTERP_KERNEL::Exception); TypeOfField getType() const { return _type; } int getNumberOfSteps() const; @@ -117,7 +117,7 @@ namespace MEDCoupling MEDCalculatorDBRangeSelection _p; std::vector _c_labels; MEDCalculatorDBRangeSelection _c; - std::vector< MEDCouplingAutoRefCountObjectPtr > _time_steps; + std::vector< MCAuto > _time_steps; }; class MEDCALCULATOR_EXPORT MEDCalculatorDBFieldCst : public MEDCalculatorDBField diff --git a/src/MEDCalculator/MEDCalculatorDBSliceField.cxx b/src/MEDCalculator/MEDCalculatorDBSliceField.cxx index def8c9725..edf5d1f3e 100644 --- a/src/MEDCalculator/MEDCalculatorDBSliceField.cxx +++ b/src/MEDCalculator/MEDCalculatorDBSliceField.cxx @@ -24,7 +24,7 @@ #include "MEDLoader.hxx" #include "MEDCouplingFieldDouble.hxx" -#include "MEDCouplingAutoRefCountObjectPtr.hxx" +#include "MCAuto.hxx" using namespace MEDCoupling; @@ -122,7 +122,7 @@ void MEDCalculatorDBSliceField::assign(const MEDCalculatorDBSliceField* other, i { std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=other->_field->keepSelectedComponents(oIds); + MCAuto f1=other->_field->keepSelectedComponents(oIds); _field->setSelectedComponents(f1,tIds); } @@ -134,8 +134,8 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::add(const MEDCalculatorDBS throw INTERP_KERNEL::Exception("Slice::add : not implemented yet node/cell permutation !"); std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); - MEDCouplingAutoRefCountObjectPtr f2=other->_field->keepSelectedComponents(oIds); + MCAuto f1=_field->keepSelectedComponents(tIds); + MCAuto f2=other->_field->keepSelectedComponents(oIds); f2->setMesh(f1->getMesh()); MEDCouplingFieldDouble *f3=(*f1)+(*f2); return new MEDCalculatorDBSliceField(f3); @@ -149,8 +149,8 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::substract(const MEDCalcula throw INTERP_KERNEL::Exception("Slice::substract : not implemented yet node/cell permutation !"); std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); - MEDCouplingAutoRefCountObjectPtr f2=other->_field->keepSelectedComponents(oIds); + MCAuto f1=_field->keepSelectedComponents(tIds); + MCAuto f2=other->_field->keepSelectedComponents(oIds); f2->setMesh(f1->getMesh()); MEDCouplingFieldDouble *f3=(*f1)-(*f2); return new MEDCalculatorDBSliceField(f3); @@ -164,8 +164,8 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::multiply(const MEDCalculat throw INTERP_KERNEL::Exception("Slice::multiply : not implemented yet node/cell permutation !"); std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); - MEDCouplingAutoRefCountObjectPtr f2=other->_field->keepSelectedComponents(oIds); + MCAuto f1=_field->keepSelectedComponents(tIds); + MCAuto f2=other->_field->keepSelectedComponents(oIds); f2->setMesh(f1->getMesh()); MEDCouplingFieldDouble *f3=(*f1)*(*f2); return new MEDCalculatorDBSliceField(f3); @@ -179,8 +179,8 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::divide(const MEDCalculator throw INTERP_KERNEL::Exception("Slice::divide : not implemented yet node/cell permutation !"); std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); - MEDCouplingAutoRefCountObjectPtr f2=other->_field->keepSelectedComponents(oIds); + MCAuto f1=_field->keepSelectedComponents(tIds); + MCAuto f2=other->_field->keepSelectedComponents(oIds); f2->setMesh(f1->getMesh()); MEDCouplingFieldDouble *f3=(*f1)/(*f2); return new MEDCalculatorDBSliceField(f3); @@ -191,8 +191,8 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::dot(const MEDCalculatorDBS { std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); - MEDCouplingAutoRefCountObjectPtr f2=other->_field->keepSelectedComponents(oIds); + MCAuto f1=_field->keepSelectedComponents(tIds); + MCAuto f2=other->_field->keepSelectedComponents(oIds); f2->setMesh(f1->getMesh()); MEDCouplingFieldDouble *f3=f1->dot(*f2); return new MEDCalculatorDBSliceField(f3); @@ -203,8 +203,8 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::crossProduct(const MEDCalc { std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); - MEDCouplingAutoRefCountObjectPtr f2=other->_field->keepSelectedComponents(oIds); + MCAuto f1=_field->keepSelectedComponents(tIds); + MCAuto f2=other->_field->keepSelectedComponents(oIds); f2->setMesh(f1->getMesh()); MEDCouplingFieldDouble *f3=f1->crossProduct(*f2); return new MEDCalculatorDBSliceField(f3); @@ -213,7 +213,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::crossProduct(const MEDCalc MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::doublyContractedProduct(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->doublyContractedProduct(); return new MEDCalculatorDBSliceField(f2); } @@ -221,7 +221,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::doublyContractedProduct(in MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::determinant(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->determinant(); return new MEDCalculatorDBSliceField(f2); } @@ -229,7 +229,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::determinant(int sizeCThis, MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenValues(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->eigenValues(); return new MEDCalculatorDBSliceField(f2); } @@ -237,7 +237,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenValues(int sizeCThis, MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenVectors(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->eigenVectors(); return new MEDCalculatorDBSliceField(f2); } @@ -245,7 +245,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::eigenVectors(int sizeCThis MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::inverse(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->inverse(); return new MEDCalculatorDBSliceField(f2); } @@ -253,7 +253,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::inverse(int sizeCThis, con MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::trace(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->trace(); return new MEDCalculatorDBSliceField(f2); } @@ -261,7 +261,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::trace(int sizeCThis, const MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::deviator(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->deviator(); return new MEDCalculatorDBSliceField(f2); } @@ -269,7 +269,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::deviator(int sizeCThis, co MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::magnitude(int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) const throw(INTERP_KERNEL::Exception) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); MEDCouplingFieldDouble *f2=f1->magnitude(); return new MEDCalculatorDBSliceField(f2); } @@ -277,7 +277,7 @@ MEDCalculatorDBSliceField *MEDCalculatorDBSliceField::magnitude(int sizeCThis, c void MEDCalculatorDBSliceField::applyFunc(const char *func, int sizeCThis, const MEDCalculatorDBRangeSelection& thisC) { std::vector tIds=thisC.getIds(sizeCThis); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); + MCAuto f1=_field->keepSelectedComponents(tIds); f1->applyFunc(func); _field->setSelectedComponents(f1,tIds); } @@ -290,8 +290,8 @@ bool MEDCalculatorDBSliceField::isEqual(const MEDCalculatorDBSliceField* other, throw INTERP_KERNEL::Exception("Slice::isEqual : not implemented yet node/cell permutation !"); std::vector tIds=thisC.getIds(sizeCThis); std::vector oIds=otherC.getIds(sizeCOther); - MEDCouplingAutoRefCountObjectPtr f1=_field->keepSelectedComponents(tIds); - MEDCouplingAutoRefCountObjectPtr f2=other->_field->keepSelectedComponents(oIds); + MCAuto f1=_field->keepSelectedComponents(tIds); + MCAuto f2=other->_field->keepSelectedComponents(oIds); f2->setMesh(f1->getMesh()); return f1->isEqualWithoutConsideringStr(f2,0,prec); } diff --git a/src/MEDCalculator/Swig/MEDCalculator.i b/src/MEDCalculator/Swig/MEDCalculator.i index 5dcdaa1fa..ed69016f8 100644 --- a/src/MEDCalculator/Swig/MEDCalculator.i +++ b/src/MEDCalculator/Swig/MEDCalculator.i @@ -188,7 +188,7 @@ namespace MEDCoupling PyObject *obj2=PyTuple_GetItem(obj,2); convertPyObjToRS2(obj2,cr,"for 3rd tuple element for components of field"); } - MEDCouplingAutoRefCountObjectPtr ret=self->operator()(tr,pr,cr); + MCAuto ret=self->operator()(tr,pr,cr); if(PyInt_Check(val)) { (*ret)=double(PyInt_AS_LONG(val)); @@ -425,7 +425,7 @@ def MEDCouplingIMeshnew(cls,*args): return _MEDCalculator.MEDCouplingIMesh____new___(cls,args) def MEDCouplingExtrudedMeshnew(cls,*args): import _MEDCalculator - return _MEDCalculator.MEDCouplingExtrudedMesh____new___(cls,args) + return _MEDCalculator.MEDCouplingMappedExtrudedMesh____new___(cls,args) %} %pythoncode %{ diff --git a/src/MEDCalculator/Test/MEDCalculatorBasicsTest.cxx b/src/MEDCalculator/Test/MEDCalculatorBasicsTest.cxx index 4e2699c40..11f8bef63 100644 --- a/src/MEDCalculator/Test/MEDCalculatorBasicsTest.cxx +++ b/src/MEDCalculator/Test/MEDCalculatorBasicsTest.cxx @@ -142,7 +142,7 @@ void MEDCoupling::MEDCalculatorBasicsTest::generateAFile1(const char *fName) da->setInfoOnComponent(0,"aaa [a]"); da->setInfoOnComponent(1,"bbb [b]"); da->setInfoOnComponent(2,"ccc [c]"); da->setInfoOnComponent(3,"ddd [d]"); da->setInfoOnComponent(4,"eee [e]"); da->setInfoOnComponent(5,"fff [f]"); da->setInfoOnComponent(6,"ggg [g]"); - f->checkCoherency(); + f->checkConsistencyLight(); for(int i=0;igetPointer(); diff --git a/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.cxx b/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.cxx index 9e5ea4c02..eb7aa14a5 100644 --- a/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.cxx +++ b/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.cxx @@ -20,16 +20,16 @@ #include "MEDCouplingExtrudedMeshClient.hxx" #include "MEDCouplingMeshClient.hxx" -#include "MEDCouplingExtrudedMesh.hxx" +#include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCouplingMemArray.hxx" #include using namespace MEDCoupling; -MEDCouplingExtrudedMesh *MEDCouplingExtrudedMeshClient::New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr) +MEDCouplingMappedExtrudedMesh *MEDCouplingExtrudedMeshClient::New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr) { - MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMesh::New(); + MEDCouplingMappedExtrudedMesh *ret=MEDCouplingMappedExtrudedMesh::New(); MEDCouplingMeshClient::fillMeshFromCorbaData(ret,meshPtr); return ret; } diff --git a/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.hxx b/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.hxx index 1e8c3fbb8..dc1afc891 100644 --- a/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.hxx +++ b/src/MEDCouplingCorba/Client/MEDCouplingExtrudedMeshClient.hxx @@ -30,12 +30,12 @@ namespace MEDCoupling { - class MEDCouplingExtrudedMesh; + class MEDCouplingMappedExtrudedMesh; class MEDCOUPLINGCLIENT_EXPORT MEDCouplingExtrudedMeshClient { public: - static MEDCouplingExtrudedMesh *New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr mesh); + static MEDCouplingMappedExtrudedMesh *New(SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr mesh); }; } diff --git a/src/MEDCouplingCorba/Client/MEDCouplingMeshClient.cxx b/src/MEDCouplingCorba/Client/MEDCouplingMeshClient.cxx index f50932a59..3eb24d93f 100644 --- a/src/MEDCouplingCorba/Client/MEDCouplingMeshClient.cxx +++ b/src/MEDCouplingCorba/Client/MEDCouplingMeshClient.cxx @@ -23,7 +23,7 @@ #include "MEDCoupling1SGTUMeshClient.hxx" #include "MEDCoupling1DGTUMeshClient.hxx" #include "MEDCouplingExtrudedMeshClient.hxx" -#include "MEDCouplingExtrudedMesh.hxx" +#include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCouplingCMeshClient.hxx" #include "MEDCouplingCurveLinearMeshClient.hxx" #include "MEDCouplingIMeshClient.hxx" diff --git a/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.cxx b/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.cxx index 30065937e..ea93ded20 100644 --- a/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.cxx +++ b/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.cxx @@ -20,11 +20,11 @@ #include "MEDCouplingExtrudedMeshServant.hxx" -#include "MEDCouplingExtrudedMesh.hxx" +#include "MEDCouplingMappedExtrudedMesh.hxx" using namespace MEDCoupling; -MEDCouplingExtrudedMeshServant::MEDCouplingExtrudedMeshServant(const MEDCouplingExtrudedMesh *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh) +MEDCouplingExtrudedMeshServant::MEDCouplingExtrudedMeshServant(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh):MEDCouplingMeshServant(cppPointerOfMesh) { } diff --git a/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.hxx b/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.hxx index 1439c4973..df7d69fd3 100644 --- a/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.hxx +++ b/src/MEDCouplingCorba/MEDCouplingExtrudedMeshServant.hxx @@ -29,16 +29,16 @@ namespace MEDCoupling { - class MEDCouplingExtrudedMesh; + class MEDCouplingMappedExtrudedMesh; class MEDCOUPLINGCORBA_EXPORT MEDCouplingExtrudedMeshServant : MEDCouplingMeshServant, public virtual POA_SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface { public: - typedef MEDCouplingExtrudedMesh CppType; - MEDCouplingExtrudedMeshServant(const MEDCouplingExtrudedMesh *cppPointerOfMesh); + typedef MEDCouplingMappedExtrudedMesh CppType; + MEDCouplingExtrudedMeshServant(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh); ~MEDCouplingExtrudedMeshServant(); private: - const MEDCouplingExtrudedMesh *getPointer() const { return (const MEDCouplingExtrudedMesh *)(_cpp_pointer); } + const MEDCouplingMappedExtrudedMesh *getPointer() const { return (const MEDCouplingMappedExtrudedMesh *)(_cpp_pointer); } }; } diff --git a/src/MEDCouplingCorba/MEDCouplingFieldServant.cxx b/src/MEDCouplingCorba/MEDCouplingFieldServant.cxx index ed834924d..420532465 100644 --- a/src/MEDCouplingCorba/MEDCouplingFieldServant.cxx +++ b/src/MEDCouplingCorba/MEDCouplingFieldServant.cxx @@ -32,7 +32,7 @@ #include "MEDCouplingCMesh.hxx" #include "MEDCouplingIMesh.hxx" #include "MEDCouplingCurveLinearMesh.hxx" -#include "MEDCouplingExtrudedMesh.hxx" +#include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCoupling1GTUMesh.hxx" using namespace MEDCoupling; @@ -64,7 +64,7 @@ SALOME_MED::MEDCouplingMeshCorbaInterface_ptr MEDCouplingFieldServant::BuildCorb SALOME_MED::MEDCouplingIMeshCorbaInterface_ptr ret=retServ->_this();//let this line even if it seems fool return ret; } - const MEDCouplingExtrudedMesh *eMesh=dynamic_cast(mesh); + const MEDCouplingMappedExtrudedMesh *eMesh=dynamic_cast(mesh); if(eMesh) { MEDCouplingExtrudedMeshServant *retServ=new MEDCouplingExtrudedMeshServant(eMesh); diff --git a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.cxx b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.cxx index 21acc1b96..fa7ec21d0 100644 --- a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.cxx +++ b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.cxx @@ -19,7 +19,7 @@ // Author : Anthony Geay (CEA/DEN) #include "MEDCouplingMeshFieldFactoryComponent.hxx" -#include "MEDCouplingExtrudedMesh.hxx" +#include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCouplingFieldDouble.hxx" #include "MEDCouplingFieldTemplate.hxx" #include "MEDCouplingMultiFields.hxx" @@ -165,7 +165,7 @@ namespace SALOME_TEST myCoords->setInfoOnComponent(2,"ZZZ [m]"); myCoords->decrRef(); // - targetMesh->checkCoherency(); + targetMesh->checkConsistencyLight(); return targetMesh; } @@ -173,18 +173,18 @@ namespace SALOME_TEST { MEDCoupling::MEDCouplingUMesh *meshM1D=MEDCoupling::MEDCouplingUMesh::New("wonderfull -1 D mesh",-1); meshM1D->setDescription("buildM1DMesh"); - meshM1D->checkCoherency(); + meshM1D->checkConsistencyLight(); return meshM1D; } - MEDCoupling::MEDCouplingExtrudedMesh *MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D) + MEDCoupling::MEDCouplingMappedExtrudedMesh *MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D) { m2D=build2DMesh(); m2D->changeSpaceDimension(3); MEDCoupling::MEDCouplingUMesh *m1D=build1DMesh(); MEDCoupling::MEDCouplingUMesh *retu=m2D->buildExtrudedMesh(m1D,0); m1D->decrRef(); - MEDCoupling::MEDCouplingExtrudedMesh *ret=MEDCoupling::MEDCouplingExtrudedMesh::New(retu,m2D,2); + MEDCoupling::MEDCouplingMappedExtrudedMesh *ret=MEDCoupling::MEDCouplingMappedExtrudedMesh::New(retu,m2D,2); ret->setName("ExtrudedTestForCorbaTest"); ret->setDescription("buildExtrudedMesh"); retu->decrRef(); @@ -215,7 +215,7 @@ namespace SALOME_TEST a1->decrRef(); a2->decrRef(); // - targetMesh->checkCoherency(); + targetMesh->checkConsistencyLight(); // return targetMesh; } @@ -255,7 +255,7 @@ namespace SALOME_TEST int structure[2]={4,5}; targetMesh->setNodeGridStructure(structure,structure+2); // - targetMesh->checkCoherency(); + targetMesh->checkConsistencyLight(); // return targetMesh; } @@ -274,7 +274,7 @@ namespace SALOME_TEST std::copy(conn,conn+16,a2->getPointer()); targetMesh->setNodalConnectivity(a2); a2->decrRef(); // - targetMesh->checkCoherency(); + targetMesh->checkConsistencyLight(); // return targetMesh; } @@ -296,7 +296,7 @@ namespace SALOME_TEST std::copy(conni,conni+5,a3->getPointer()); targetMesh->setNodalConnectivity(a2,a3); a2->decrRef(); a3->decrRef(); // - targetMesh->checkCoherency(); + targetMesh->checkConsistencyLight(); // return targetMesh; } @@ -315,7 +315,7 @@ namespace SALOME_TEST array->decrRef(); std::fill(tmp,tmp+mesh->getNumberOfCells()*6,7.); mesh->decrRef(); - fieldOnCells->checkCoherency(); + fieldOnCells->checkConsistencyLight(); return fieldOnCells; } @@ -334,7 +334,7 @@ namespace SALOME_TEST array->decrRef(); std::fill(tmp,tmp+mesh->getNumberOfNodes()*5,7.1234); mesh->decrRef(); - fieldOnNodes->checkCoherency(); + fieldOnNodes->checkConsistencyLight(); return fieldOnNodes; } @@ -342,7 +342,7 @@ namespace SALOME_TEST { MEDCoupling::MEDCouplingUMesh *mesh=build3DMesh(); MEDCoupling::MEDCouplingFieldDouble *fieldOnCells=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::NO_TIME); - fieldOnCells->setNature(MEDCoupling::ConservativeVolumic); + fieldOnCells->setNature(MEDCoupling::IntensiveMaximum); fieldOnCells->setName("toto"); fieldOnCells->setDescription("my wonderful 3D field toto2"); fieldOnCells->setMesh(mesh); @@ -353,7 +353,7 @@ namespace SALOME_TEST array->decrRef(); std::fill(tmp,tmp+mesh->getNumberOfCells()*6,7.); mesh->decrRef(); - fieldOnCells->checkCoherency(); + fieldOnCells->checkConsistencyLight(); return fieldOnCells; } @@ -374,7 +374,7 @@ namespace SALOME_TEST std::fill(tmp,tmp+mesh->getNumberOfCells()*3,7.); mesh->decrRef(); fieldOnCells->setTime(6.7,1,4); - fieldOnCells->checkCoherency(); + fieldOnCells->checkConsistencyLight(); return fieldOnCells; } @@ -395,7 +395,7 @@ namespace SALOME_TEST mesh->decrRef(); fieldOnCells->setStartTime(6.7,1,4); fieldOnCells->setEndTime(7.2,2,8); - fieldOnCells->checkCoherency(); + fieldOnCells->checkConsistencyLight(); return fieldOnCells; } @@ -424,7 +424,7 @@ namespace SALOME_TEST std::copy(arr2,arr2+20,tmp); fieldOnCells->setStartTime(6.7,25,26); fieldOnCells->setEndTime(17.2,125,126); - fieldOnCells->checkCoherency(); + fieldOnCells->checkConsistencyLight(); return fieldOnCells; } @@ -463,7 +463,7 @@ namespace SALOME_TEST f->setTimeUnit("ms"); f->setDescription("mmmmmmmmmmmm"); array->decrRef(); - f->checkCoherency(); + f->checkConsistencyLight(); return f; } @@ -486,7 +486,7 @@ namespace SALOME_TEST f->setArray(array); array->decrRef(); // - f->checkCoherency(); + f->checkConsistencyLight(); m->decrRef(); return f; } @@ -494,7 +494,7 @@ namespace SALOME_TEST MEDCoupling::MEDCouplingFieldDouble *MEDCouplingCorbaServBasicsTest::buildFieldVectorOnExtrudedWT() { MEDCoupling::MEDCouplingUMesh *m2D=0; - MEDCoupling::MEDCouplingExtrudedMesh *ext=buildExtrudedMesh(m2D); + MEDCoupling::MEDCouplingMappedExtrudedMesh *ext=buildExtrudedMesh(m2D); // MEDCoupling::MEDCouplingFieldDouble *f=MEDCoupling::MEDCouplingFieldDouble::New(MEDCoupling::ON_CELLS,MEDCoupling::ONE_TIME); f->setTime(6.8,11,8); @@ -512,7 +512,7 @@ namespace SALOME_TEST f->setArray(array); array->decrRef(); // - f->checkCoherency(); + f->checkConsistencyLight(); // m2D->decrRef(); ext->decrRef(); @@ -539,7 +539,7 @@ namespace SALOME_TEST f->setArray(array); array->decrRef(); // - f->checkCoherency(); + f->checkConsistencyLight(); // return f; } @@ -557,7 +557,7 @@ namespace SALOME_TEST { MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldNodeScalarOn2DNT(); MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1); - f2->setNature(MEDCoupling::ConservativeVolumic); + f2->setNature(MEDCoupling::IntensiveMaximum); f1->decrRef(); return f2; } @@ -566,7 +566,7 @@ namespace SALOME_TEST { MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldGaussPt2DWT(); MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1); - f2->setNature(MEDCoupling::Integral); + f2->setNature(MEDCoupling::ExtensiveMaximum); f1->decrRef(); return f2; } @@ -575,7 +575,7 @@ namespace SALOME_TEST { MEDCoupling::MEDCouplingFieldDouble *f1=buildFieldGaussPtNE2DWT(); MEDCoupling::MEDCouplingFieldTemplate *f2=MEDCoupling::MEDCouplingFieldTemplate::New(*f1); - f2->setNature(MEDCoupling::IntegralGlobConstraint); + f2->setNature(MEDCoupling::ExtensiveConservation); f1->decrRef(); return f2; } @@ -772,7 +772,7 @@ namespace SALOME_TEST std::vector fs(5); fs[0]=f0; fs[1]=f1; fs[2]=f2; fs[3]=f3; fs[4]=f4; MEDCoupling::MEDCouplingFieldOverTime *ret=MEDCoupling::MEDCouplingFieldOverTime::New(fs); - ret->checkCoherency(); + ret->checkConsistencyLight(); // m1->decrRef(); m2->decrRef(); diff --git a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.hxx b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.hxx index 94e1dbc49..f3ca0acde 100644 --- a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.hxx +++ b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponent.hxx @@ -28,7 +28,7 @@ namespace MEDCoupling class MEDCouplingUMesh; class MEDCouplingFieldDouble; class MEDCouplingFieldTemplate; - class MEDCouplingExtrudedMesh; + class MEDCouplingMappedExtrudedMesh; class MEDCoupling1DGTUMesh; class MEDCoupling1SGTUMesh; class MEDCouplingCMesh; @@ -51,7 +51,7 @@ namespace SALOME_TEST static MEDCoupling::MEDCouplingUMesh *build3DSurfMesh(); static MEDCoupling::MEDCouplingUMesh *build0DMesh(); static MEDCoupling::MEDCouplingUMesh *buildM1DMesh(); - static MEDCoupling::MEDCouplingExtrudedMesh *buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D); + static MEDCoupling::MEDCouplingMappedExtrudedMesh *buildExtrudedMesh(MEDCoupling::MEDCouplingUMesh *&m2D); static MEDCoupling::MEDCouplingCMesh *buildCMesh(); static MEDCoupling::MEDCouplingIMesh *buildIMesh(); static MEDCoupling::MEDCouplingCurveLinearMesh *buildCLMesh(); diff --git a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.cxx b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.cxx index 9a280e8a1..4277b6adc 100644 --- a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.cxx +++ b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentClt.cxx @@ -25,7 +25,7 @@ #include "MEDCoupling1GTUMesh.hxx" #include "MEDCoupling1SGTUMeshClient.hxx" #include "MEDCoupling1DGTUMeshClient.hxx" -#include "MEDCouplingExtrudedMesh.hxx" +#include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCouplingExtrudedMeshClient.hxx" #include "MEDCouplingCMesh.hxx" #include "MEDCouplingCMeshClient.hxx" @@ -186,11 +186,11 @@ void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingM1D() void SALOME_TEST::MEDCouplingCorbaServBasicsTestClt::checkCorbaFetchingExtruded() { SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr meshPtr=_objC->getExtrudedMesh(); - MEDCoupling::MEDCouplingExtrudedMesh *meshFromDistant=MEDCoupling::MEDCouplingExtrudedMeshClient::New(meshPtr); + MEDCoupling::MEDCouplingMappedExtrudedMesh *meshFromDistant=MEDCoupling::MEDCouplingExtrudedMeshClient::New(meshPtr); meshPtr->UnRegister(); CORBA::release(meshPtr); MEDCoupling::MEDCouplingUMesh *meshRef2; - MEDCoupling::MEDCouplingExtrudedMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(meshRef2); + MEDCoupling::MEDCouplingMappedExtrudedMesh *meshRef=SALOME_TEST::MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(meshRef2); CPPUNIT_ASSERT(meshFromDistant->isEqual(meshRef,1e-12)); CPPUNIT_ASSERT(meshFromDistant->getMesh2D()->isEqual(meshRef2,1e-12)); meshRef2->decrRef(); diff --git a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentServ.cxx b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentServ.cxx index 7324b72e3..51907e75b 100644 --- a/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentServ.cxx +++ b/src/MEDCouplingCorba/Test/MEDCouplingMeshFieldFactoryComponentServ.cxx @@ -37,7 +37,7 @@ #include "MEDCouplingFieldTemplate.hxx" #include "MEDCouplingMultiFields.hxx" #include "MEDCouplingFieldOverTime.hxx" -#include "MEDCouplingExtrudedMesh.hxx" +#include "MEDCouplingMappedExtrudedMesh.hxx" #include "MEDCouplingCurveLinearMesh.hxx" #include "MEDCoupling1GTUMesh.hxx" #include "MEDCouplingUMesh.hxx" @@ -119,7 +119,7 @@ namespace SALOME_TEST SALOME_MED::MEDCouplingExtrudedMeshCorbaInterface_ptr MEDCouplingMeshFieldFactoryComponent::getExtrudedMesh() { MEDCoupling::MEDCouplingUMesh *m2D; - MEDCoupling::MEDCouplingExtrudedMesh *m1=MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(m2D); + MEDCoupling::MEDCouplingMappedExtrudedMesh *m1=MEDCouplingCorbaServBasicsTest::buildExtrudedMesh(m2D); m2D->decrRef(); MEDCoupling::MEDCouplingExtrudedMeshServant *m=new MEDCoupling::MEDCouplingExtrudedMeshServant(m1); m1->decrRef(); diff --git a/src/MEDCouplingCorba_Swig/Client/MEDCouplingClient.i b/src/MEDCouplingCorba_Swig/Client/MEDCouplingClient.i index b93ea35f0..8062f08a1 100644 --- a/src/MEDCouplingCorba_Swig/Client/MEDCouplingClient.i +++ b/src/MEDCouplingCorba_Swig/Client/MEDCouplingClient.i @@ -366,7 +366,7 @@ namespace MEDCoupling public: %extend { - static MEDCouplingExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception) + static MEDCouplingMappedExtrudedMesh *New(PyObject *meshPtr) throw(INTERP_KERNEL::Exception) { PyObject* pdict=PyDict_New(); PyDict_SetItemString(pdict,"__builtins__",PyEval_GetBuiltins()); @@ -387,7 +387,7 @@ namespace MEDCoupling throw INTERP_KERNEL::Exception("error corba pointer is not a SALOME_MED.MEDCouplingExtrudedMeshInterface_ptr !"); Py_DECREF(pdict); Py_DECREF(iorMesh); - MEDCouplingExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC); + MEDCouplingMappedExtrudedMesh *ret=MEDCouplingExtrudedMeshClient::New(meshPtrCppC); return ret; } } @@ -665,7 +665,7 @@ def MEDCouplingIMeshnew(cls,*args): return _MEDCouplingClient.MEDCouplingIMesh____new___(cls,args) def MEDCouplingExtrudedMeshnew(cls,*args): import _MEDCouplingClient - return _MEDCouplingClient.MEDCouplingExtrudedMesh____new___(cls,args) + return _MEDCouplingClient.MEDCouplingMappedExtrudedMesh____new___(cls,args) %} %include "MEDCouplingFinalize.i" diff --git a/src/MEDCouplingCorba_Swig/MEDCouplingCorba.i b/src/MEDCouplingCorba_Swig/MEDCouplingCorba.i index 6c3266d4b..a1880a492 100644 --- a/src/MEDCouplingCorba_Swig/MEDCouplingCorba.i +++ b/src/MEDCouplingCorba_Swig/MEDCouplingCorba.i @@ -126,8 +126,8 @@ namespace MEDCoupling return buildServantAndActivate(dynamic_cast(cppPointerOfMesh)); if(dynamic_cast(cppPointerOfMesh)) return buildServantAndActivate(dynamic_cast(cppPointerOfMesh)); - if(dynamic_cast(cppPointerOfMesh)) - return buildServantAndActivate(dynamic_cast(cppPointerOfMesh)); + if(dynamic_cast(cppPointerOfMesh)) + return buildServantAndActivate(dynamic_cast(cppPointerOfMesh)); if(dynamic_cast(cppPointerOfMesh)) return buildServantAndActivate(dynamic_cast(cppPointerOfMesh)); if(dynamic_cast(cppPointerOfMesh)) @@ -147,8 +147,8 @@ namespace MEDCoupling return buildServantAndActivate2(dynamic_cast(cppPointerOfMesh)); if(dynamic_cast(cppPointerOfMesh)) return buildServantAndActivate2(dynamic_cast(cppPointerOfMesh)); - if(dynamic_cast(cppPointerOfMesh)) - return buildServantAndActivate2(dynamic_cast(cppPointerOfMesh)); + if(dynamic_cast(cppPointerOfMesh)) + return buildServantAndActivate2(dynamic_cast(cppPointerOfMesh)); if(dynamic_cast(cppPointerOfMesh)) return buildServantAndActivate2(dynamic_cast(cppPointerOfMesh)); if(dynamic_cast(cppPointerOfMesh)) @@ -216,12 +216,12 @@ namespace MEDCoupling public: %extend { - static PyObject *_this(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception) + static PyObject *_this(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception) { return buildServantAndActivate(cppPointerOfMesh); } - static PyObject *_this2(const MEDCouplingExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception) + static PyObject *_this2(const MEDCouplingMappedExtrudedMesh *cppPointerOfMesh) throw(INTERP_KERNEL::Exception) { return buildServantAndActivate2(cppPointerOfMesh); } @@ -425,7 +425,7 @@ def MEDCouplingIMeshnew(cls,*args): return _MEDCouplingCorba.MEDCouplingIMesh____new___(cls,args) def MEDCouplingExtrudedMeshnew(cls,*args): import _MEDCouplingCorba - return _MEDCouplingCorba.MEDCouplingExtrudedMesh____new___(cls,args) + return _MEDCouplingCorba.MEDCouplingMappedExtrudedMesh____new___(cls,args) %} %include "MEDCouplingFinalize.i" diff --git a/src/MEDCouplingCorba_Swig/MEDCouplingCorbaSwigTest.py b/src/MEDCouplingCorba_Swig/MEDCouplingCorbaSwigTest.py index 149dc5c32..2215c57cf 100644 --- a/src/MEDCouplingCorba_Swig/MEDCouplingCorbaSwigTest.py +++ b/src/MEDCouplingCorba_Swig/MEDCouplingCorbaSwigTest.py @@ -133,13 +133,13 @@ class MEDCouplingCorbaServBasicsTest: myCoords.setInfoOnComponent(0,"X [m]"); myCoords.setInfoOnComponent(1,"YY [Pm]"); myCoords.setInfoOnComponent(2,"ZZZ [m]"); - targetMesh.checkCoherency(); + targetMesh.checkConsistencyLight(); return targetMesh; def buildM1DMesh(self): meshM1D=MEDCouplingUMesh.New("wonderfull -1 D mesh",-1); meshM1D.setDescription("buildM1DMesh"); - meshM1D.checkCoherency(); + meshM1D.checkConsistencyLight(); return meshM1D; def buildExtrudedMesh(self): @@ -147,7 +147,7 @@ class MEDCouplingCorbaServBasicsTest: m2D.changeSpaceDimension(3); m1D=self.build1DMesh(); retu=m2D.buildExtrudedMesh(m1D,0); - ret=MEDCouplingExtrudedMesh.New(retu,m2D,2); + ret=MEDCouplingMappedExtrudedMesh.New(retu,m2D,2); ret.setName("ExtrudedTestForCorbaTest"); ret.setDescription("buildExtrudedMesh"); return ret; @@ -171,7 +171,7 @@ class MEDCouplingCorbaServBasicsTest: targetMesh.setCoordsAt(1,a2); # # - targetMesh.checkCoherency(); + targetMesh.checkConsistencyLight(); # return targetMesh; @@ -201,7 +201,7 @@ class MEDCouplingCorbaServBasicsTest: targetMesh.setCoords(a1); targetMesh.setNodeGridStructure([4,5]); # - targetMesh.checkCoherency(); + targetMesh.checkConsistencyLight(); # return targetMesh; @@ -216,7 +216,7 @@ class MEDCouplingCorbaServBasicsTest: a2=DataArrayInt([6,0,3,5,3,0,1,4,1,2,7,4,8,7,2,9],4*4,1) targetMesh.setNodalConnectivity(a2) # - targetMesh.checkCoherency(); + targetMesh.checkConsistencyLight(); # return targetMesh; @@ -232,7 +232,7 @@ class MEDCouplingCorbaServBasicsTest: a3=DataArrayInt([0,4,8,12,15],5,1) targetMesh.setNodalConnectivity(a2,a3) # - targetMesh.checkCoherency(); + targetMesh.checkConsistencyLight(); # return targetMesh; @@ -246,7 +246,7 @@ class MEDCouplingCorbaServBasicsTest: tmp=mesh.getNumberOfCells()*6*[7.] array.setValues(tmp,mesh.getNumberOfCells(),6); fieldOnCells.setArray(array) - fieldOnCells.checkCoherency(); + fieldOnCells.checkConsistencyLight(); return fieldOnCells; def buildFieldNodeScalarOn2DNT(self): @@ -260,13 +260,13 @@ class MEDCouplingCorbaServBasicsTest: tmp=mesh.getNumberOfNodes()*5*[7.1234] array.setValues(tmp,mesh.getNumberOfNodes(),5); fieldOnNodes.setArray(array); - fieldOnNodes.checkCoherency(); + fieldOnNodes.checkConsistencyLight(); return fieldOnNodes; def buildFieldScalarOn3DNT(self): mesh=self.build3DMesh(); fieldOnCells=MEDCouplingFieldDouble.New(ON_CELLS,NO_TIME); - fieldOnCells.setNature(ConservativeVolumic); + fieldOnCells.setNature(IntensiveMaximum); fieldOnCells.setName("toto"); fieldOnCells.setDescription("my wonderful 3D field toto2"); fieldOnCells.setMesh(mesh); @@ -274,7 +274,7 @@ class MEDCouplingCorbaServBasicsTest: tmp=mesh.getNumberOfCells()*6*[7.] array.setValues(tmp,mesh.getNumberOfCells(),6); fieldOnCells.setArray(array); - fieldOnCells.checkCoherency(); + fieldOnCells.checkConsistencyLight(); return fieldOnCells; def buildFieldScalarOn3DSurfWT(self): @@ -290,7 +290,7 @@ class MEDCouplingCorbaServBasicsTest: array.setInfoOnComponents(["aaa","bbbb","ccccc"]) fieldOnCells.setArray(array); fieldOnCells.setTime(6.7,1,4); - fieldOnCells.checkCoherency(); + fieldOnCells.checkConsistencyLight(); return fieldOnCells; def buildFieldScalarOn3DSurfCOTI(self): @@ -306,7 +306,7 @@ class MEDCouplingCorbaServBasicsTest: fieldOnCells.setArray(array); fieldOnCells.setStartTime(6.7,1,4); fieldOnCells.setEndTime(7.2,2,8); - fieldOnCells.checkCoherency(); + fieldOnCells.checkConsistencyLight(); return fieldOnCells; def buildFieldScalarOn2DLT(self): @@ -326,7 +326,7 @@ class MEDCouplingCorbaServBasicsTest: fieldOnCells.setEndArray(array) fieldOnCells.setStartTime(6.7,25,26); fieldOnCells.setEndTime(17.2,125,126); - fieldOnCells.checkCoherency(); + fieldOnCells.checkConsistencyLight(); return fieldOnCells; def buildFieldGaussPt2DWT(self): @@ -363,7 +363,7 @@ class MEDCouplingCorbaServBasicsTest: f.setName("MyFirstFieldOnGaussPoint"); f.setTimeUnit("ms"); f.setDescription("mmmmmmmmmmmm"); - f.checkCoherency(); + f.checkConsistencyLight(); return f; def buildFieldGaussPtNE2DWT(self): @@ -383,7 +383,7 @@ class MEDCouplingCorbaServBasicsTest: array.setInfoOnComponent(1,"Density [kg/m^3]"); f.setArray(array); # - f.checkCoherency(); + f.checkConsistencyLight(); return f; def buildFieldVectorOnExtrudedWT(self): @@ -405,7 +405,7 @@ class MEDCouplingCorbaServBasicsTest: array.setInfoOnComponent(1,"Density [kg/m^3]"); f.setArray(array); # - f.checkCoherency(); + f.checkConsistencyLight(); return f def buildFieldVectorOnCMeshWT(self): @@ -427,7 +427,7 @@ class MEDCouplingCorbaServBasicsTest: array.setInfoOnComponent(1,"Density [kg/m^3]"); f.setArray(array); # - f.checkCoherency(); + f.checkConsistencyLight(); return f def buildFieldTemplateCellOn2D(self): @@ -439,19 +439,19 @@ class MEDCouplingCorbaServBasicsTest: def buildFieldTemplateNodeOn2D(self): f1=self.buildFieldNodeScalarOn2DNT(); f2=MEDCouplingFieldTemplate.New(f1); - f2.setNature(ConservativeVolumic); + f2.setNature(IntensiveMaximum); return f2 def buildFieldTemplateGaussPtOn2D(self): f1=self.buildFieldGaussPt2DWT(); f2=MEDCouplingFieldTemplate.New(f1); - f2.setNature(Integral); + f2.setNature(ExtensiveMaximum); return f2 def buildFieldTemplateGaussNEOn2D(self): f1=self.buildFieldGaussPtNE2DWT(); f2=MEDCouplingFieldTemplate.New(f1); - f2.setNature(IntegralGlobConstraint); + f2.setNature(ExtensiveConservation); return f2 def buildMultiFields1(self): @@ -611,7 +611,7 @@ class MEDCouplingCorbaServBasicsTest: f4.setName("f4"); f4.setTime(2.7,25,26); ret=MEDCouplingFieldOverTime.New([f0,f1,f2,f3,f4]); - ret.checkCoherency(); + ret.checkConsistencyLight(); return ret; def buildFileNameForIOR(self): @@ -648,7 +648,7 @@ def testMesh(): myCoords=DataArrayDouble.New() myCoords.setValues(coords,nbOfNodes,3); mesh.setCoords(myCoords); - mesh.checkCoherency(); + mesh.checkConsistencyLight(); myFalseConn=DataArrayInt.New() myFalseConn.setValues(tab4,6,4) return mesh @@ -659,7 +659,7 @@ def testField(): nbOfCells=mesh.getNumberOfCells() field=MEDCouplingFieldDouble.New(ON_CELLS) field.setMesh(mesh) - field.setNature(Integral) + field.setNature(ExtensiveMaximum) myCoords=DataArrayDouble.New() sampleTab=[] for i in range(nbOfCells*9): -- 2.39.2