From: ageay Date: Mon, 2 Aug 2010 05:48:00 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V5_1_main_FINAL~70 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=577e148ad6b173679e2a0bf854e6e4c5e5021c2b;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/MEDCoupling/MEDCouplingCMesh.cxx b/src/MEDCoupling/MEDCouplingCMesh.cxx index 2daaaf319..452a3bf84 100644 --- a/src/MEDCoupling/MEDCouplingCMesh.cxx +++ b/src/MEDCoupling/MEDCouplingCMesh.cxx @@ -204,6 +204,27 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingCMesh::getTypeOfCell(int cellId) co } } +int MEDCouplingCMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const +{ + int ret=getNumberOfCells(); + int dim=getMeshDimension(); + switch(type) + { + case INTERP_KERNEL::NORM_HEXA8: + if(dim==3) + return ret; + case INTERP_KERNEL::NORM_QUAD4: + if(dim==2) + return ret; + case INTERP_KERNEL::NORM_SEG2: + if(dim==1) + return ret; + default: + throw INTERP_KERNEL::Exception("Unexpected dimension for MEDCouplingCMesh::getTypeOfCell !"); + } + return 0; +} + void MEDCouplingCMesh::getNodeIdsOfCell(int cellId, std::vector& conn) const { //not implemented yet diff --git a/src/MEDCoupling/MEDCouplingCMesh.hxx b/src/MEDCoupling/MEDCouplingCMesh.hxx index 213559943..e70dce3cd 100644 --- a/src/MEDCoupling/MEDCouplingCMesh.hxx +++ b/src/MEDCoupling/MEDCouplingCMesh.hxx @@ -44,6 +44,7 @@ namespace ParaMEDMEM int getNodeIdFromPos(int i, int j, int k) const; static void getPosFromId(int nodeId, int spaceDim, const int *split, int *res); INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; + int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const; void getNodeIdsOfCell(int cellId, std::vector& conn) const; void getCoordinatesOfNode(int nodeId, std::vector& coo) const; DataArrayDouble *getCoordsAt(int i) const throw(INTERP_KERNEL::Exception); diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx index ac3d59607..928edc0c3 100644 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx +++ b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx @@ -154,6 +154,19 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingExtrudedMesh::getTypeOfCell(int cel return INTERP_KERNEL::CellModel::getCellModel(tmp).getExtrudedType(); } +int MEDCouplingExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const +{ + int ret=0; + int nbOfCells2D=_mesh2D->getNumberOfCells(); + for(int i=0;igetTypeOfCell(i); + if(INTERP_KERNEL::CellModel::getCellModel(t).getExtrudedType()==type) + ret++; + } + return ret*_mesh1D->getNumberOfCells(); +} + void MEDCouplingExtrudedMesh::getNodeIdsOfCell(int cellId, std::vector& conn) const { int nbOfCells2D=_mesh2D->getNumberOfCells(); diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx index 901f66d14..559831fbc 100644 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx +++ b/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx @@ -46,6 +46,7 @@ namespace ParaMEDMEM MEDCouplingExtrudedMesh *clone(bool recDeepCpy) const; bool isEqual(const MEDCouplingMesh *other, double prec) const; INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; + int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const; void getNodeIdsOfCell(int cellId, std::vector& conn) const; void getCoordinatesOfNode(int nodeId, std::vector& coo) const; void checkCoherency() const throw (INTERP_KERNEL::Exception); diff --git a/src/MEDCoupling/MEDCouplingField.cxx b/src/MEDCoupling/MEDCouplingField.cxx index bc300e025..c8d23335e 100644 --- a/src/MEDCoupling/MEDCouplingField.cxx +++ b/src/MEDCoupling/MEDCouplingField.cxx @@ -132,6 +132,18 @@ MEDCouplingGaussLocalization& MEDCouplingField::getGaussLocalization(int locId) return _type->getGaussLocalization(locId); } +/*! + * This method returns reference to the Gauss localization object corresponding to 'locId' id. + * This method throws an exception if there is no mesh, invalid FieldDescription (different from Gauss) and if several localization ids have been found + * for a type. + */ +int MEDCouplingField::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception) +{ + if(!_mesh) + throw INTERP_KERNEL::Exception("Mesh has to be set before calling getGaussLocalizationIdOfOneType method !"); + return _type->getGaussLocalizationIdOfOneType(type); +} + /*! * This method returns number of Gauss localization available. Implicitely all ids in [0,getNbOfGaussLocalization()) is a valid Gauss localisation id. * This method throws an exception if there is no mesh, invalid FieldDescription (different from Gauss) diff --git a/src/MEDCoupling/MEDCouplingField.hxx b/src/MEDCoupling/MEDCouplingField.hxx index e915a1f91..4a8f72ecc 100644 --- a/src/MEDCoupling/MEDCouplingField.hxx +++ b/src/MEDCoupling/MEDCouplingField.hxx @@ -58,6 +58,7 @@ namespace ParaMEDMEM const std::vector& gsCoo, const std::vector& wg) throw(INTERP_KERNEL::Exception); void clearGaussLocalizations(); MEDCouplingGaussLocalization& getGaussLocalization(int locId) throw(INTERP_KERNEL::Exception); + int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception); int getNbOfGaussLocalization() const throw(INTERP_KERNEL::Exception); int getGaussLocalizationIdOfOneCell(int cellId) const throw(INTERP_KERNEL::Exception); void getCellIdsHavingGaussLocalization(int locId, std::vector& cellIds) const throw(INTERP_KERNEL::Exception); diff --git a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx index 4d8a0d0fd..62b69dc0e 100644 --- a/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDiscretization.cxx @@ -25,6 +25,7 @@ #include "InterpolationUtils.hxx" +#include #include #include #include @@ -154,6 +155,11 @@ int MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneCell(int cellId) throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !"); } +int MEDCouplingFieldDiscretization::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception) +{ + throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !"); +} + void MEDCouplingFieldDiscretization::getCellIdsHavingGaussLocalization(int locId, std::vector& cellIds) const throw(INTERP_KERNEL::Exception) { throw INTERP_KERNEL::Exception("Invalid method for the corresponding field discretization : available only for GaussPoint discretization !"); @@ -666,6 +672,7 @@ void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnType(const MEDCo for(int i=0;igetTypeOfCell(i)==type) ptr[i]=id; + zipGaussLocalizations(); } void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(const MEDCouplingMesh *m, const int *begin, const int *end, const std::vector& refCoo, @@ -691,6 +698,7 @@ void MEDCouplingFieldDiscretizationGauss::setGaussLocalizationOnCells(const MEDC ptr[*w2]=id; // _loc.push_back(elt); + zipGaussLocalizations(); } void MEDCouplingFieldDiscretizationGauss::clearGaussLocalizations() throw(INTERP_KERNEL::Exception) @@ -724,6 +732,22 @@ int MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneCell(int cel return locId; } +int MEDCouplingFieldDiscretizationGauss::getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception) +{ + if(!_discr_per_cell) + throw INTERP_KERNEL::Exception("No Gauss localization still set !"); + std::set ret; + int id=0; + for(std::vector::const_iterator iter=_loc.begin();iter!=_loc.end();iter++,id++) + if((*iter).getType()==type) + ret.insert(id); + if(ret.empty()) + throw INTERP_KERNEL::Exception("No gauss discretization found for the specified type !"); + if(ret.size()>1) + throw INTERP_KERNEL::Exception("Several gauss discretizations have been found for the specified type !"); + return *ret.begin(); +} + void MEDCouplingFieldDiscretizationGauss::getCellIdsHavingGaussLocalization(int locId, std::vector& cellIds) const throw(INTERP_KERNEL::Exception) { if(locId<0 || locId>=_loc.size()) @@ -756,6 +780,41 @@ int MEDCouplingFieldDiscretizationGauss::getOffsetOfCell(int cellId) const throw return ret; } +/*! + * This method makes the assumption that _discr_per_cell is set. + * This method reduces as much as possible number size of _loc. + * This method is usefull when several set on same cells has been done and that some Gauss Localization are no more used. + */ +void MEDCouplingFieldDiscretizationGauss::zipGaussLocalizations() +{ + const int *start=_discr_per_cell->getConstPointer(); + int nbOfTuples=_discr_per_cell->getNumberOfTuples(); + int *tmp=new int[_loc.size()]; + std::fill(tmp,tmp+_loc.size(),-2); + for(const int *w=start;w!=start+nbOfTuples;w++) + if(*w>=0) + tmp[*w]=1; + int fid=0; + for(int i=0;i<_loc.size();i++) + if(tmp[i]!=-2) + tmp[i]=fid++; + if(fid==_loc.size()) + {//no zip needed + delete [] tmp; + return; + } + // zip needed + int *start2=_discr_per_cell->getPointer(); + for(int *w2=start2;w2!=start2+nbOfTuples;w2++) + *w2=tmp[*w2]; + std::vector tmpLoc; + for(int i=0;i<_loc.size();i++) + if(tmp[i]!=-2) + tmpLoc.push_back(_loc[tmp[i]]); + delete [] tmp; + _loc=tmpLoc; +} + MEDCouplingFieldDiscretizationGaussNE::MEDCouplingFieldDiscretizationGaussNE() { } diff --git a/src/MEDCoupling/MEDCouplingFieldDiscretization.hxx b/src/MEDCoupling/MEDCouplingFieldDiscretization.hxx index 057f4d741..ae98cef79 100644 --- a/src/MEDCoupling/MEDCouplingFieldDiscretization.hxx +++ b/src/MEDCoupling/MEDCouplingFieldDiscretization.hxx @@ -67,6 +67,7 @@ namespace ParaMEDMEM virtual MEDCouplingGaussLocalization& getGaussLocalization(int locId) throw(INTERP_KERNEL::Exception); virtual int getNbOfGaussLocalization() const throw(INTERP_KERNEL::Exception); virtual int getGaussLocalizationIdOfOneCell(int cellId) const throw(INTERP_KERNEL::Exception); + virtual int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception); virtual void getCellIdsHavingGaussLocalization(int locId, std::vector& cellIds) const throw(INTERP_KERNEL::Exception); virtual const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception); virtual ~MEDCouplingFieldDiscretization(); @@ -169,10 +170,12 @@ namespace ParaMEDMEM MEDCouplingGaussLocalization& getGaussLocalization(int locId) throw(INTERP_KERNEL::Exception); int getNbOfGaussLocalization() const throw(INTERP_KERNEL::Exception); int getGaussLocalizationIdOfOneCell(int cellId) const throw(INTERP_KERNEL::Exception); + int getGaussLocalizationIdOfOneType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception); void getCellIdsHavingGaussLocalization(int locId, std::vector& cellIds) const throw(INTERP_KERNEL::Exception); const MEDCouplingGaussLocalization& getGaussLocalization(int locId) const throw(INTERP_KERNEL::Exception); protected: MEDCouplingFieldDiscretizationGauss(const MEDCouplingFieldDiscretizationGauss& other); + void zipGaussLocalizations(); int getOffsetOfCell(int cellId) const throw(INTERP_KERNEL::Exception); void checkLocalizationId(int locId) const throw(INTERP_KERNEL::Exception); public: diff --git a/src/MEDCoupling/MEDCouplingGaussLocalization.cxx b/src/MEDCoupling/MEDCouplingGaussLocalization.cxx index 2b0eb984e..ed67b8498 100644 --- a/src/MEDCoupling/MEDCouplingGaussLocalization.cxx +++ b/src/MEDCoupling/MEDCouplingGaussLocalization.cxx @@ -88,7 +88,7 @@ bool ParaMEDMEM::MEDCouplingGaussLocalization::isEqual(const MEDCouplingGaussLoc return true; } -double ParaMEDMEM::MEDCouplingGaussLocalization::getRefCoords(int ptIdInCell, int comp) const throw(INTERP_KERNEL::Exception) +double ParaMEDMEM::MEDCouplingGaussLocalization::getRefCoord(int ptIdInCell, int comp) const throw(INTERP_KERNEL::Exception) { const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::getCellModel(_type); int nbNodes=cm.getNumberOfNodes(); @@ -158,7 +158,7 @@ const double *ParaMEDMEM::MEDCouplingGaussLocalization::fillWithValues(const dou * This method sets the comp_th component of ptIdInCell_th point coordinate of reference element of type this->_type. * @throw if not 0<=ptIdInCell& tinyInfo) const; const double *fillWithValues(const double *vals); // - double getRefCoords(int ptIdInCell, int comp) const throw(INTERP_KERNEL::Exception); + const std::vector& getRefCoords() const { return _ref_coord; } + double getRefCoord(int ptIdInCell, int comp) const throw(INTERP_KERNEL::Exception); + const std::vector& getGaussCoords() const { return _gauss_coord; } double getGaussCoord(int gaussPtIdInCell, int comp) const throw(INTERP_KERNEL::Exception); + const std::vector& getWeights() const { return _weight; } double getWeight(int gaussPtIdInCell, double newVal) const throw(INTERP_KERNEL::Exception); - void setRefCoords(int ptIdInCell, int comp, double newVal) throw(INTERP_KERNEL::Exception); + void setRefCoord(int ptIdInCell, int comp, double newVal) throw(INTERP_KERNEL::Exception); void setGaussCoord(int gaussPtIdInCell, int comp, double newVal) throw(INTERP_KERNEL::Exception); void setWeight(int gaussPtIdInCell, double newVal) throw(INTERP_KERNEL::Exception); // diff --git a/src/MEDCoupling/MEDCouplingMesh.hxx b/src/MEDCoupling/MEDCouplingMesh.hxx index 9f464787d..44f1a73d7 100644 --- a/src/MEDCoupling/MEDCouplingMesh.hxx +++ b/src/MEDCoupling/MEDCouplingMesh.hxx @@ -57,6 +57,7 @@ namespace ParaMEDMEM virtual int getMeshDimension() const = 0; virtual DataArrayDouble *getCoordinatesAndOwner() const = 0; virtual DataArrayDouble *getBarycenterAndOwner() const = 0; + virtual int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const = 0; virtual INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const = 0; virtual void getNodeIdsOfCell(int cellId, std::vector& conn) const = 0; virtual void getCoordinatesOfNode(int nodeId, std::vector& coo) const = 0; diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index 26f538942..7c046c06c 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -974,6 +975,21 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingUMesh::getTypeOfCell(int cellId) co return (INTERP_KERNEL::NormalizedCellType) pt[ptI[cellId]]; } +/*! + * Returns nb of cells having the geometric type 'type'. + */ +int MEDCouplingUMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const +{ + const int *ptI=_nodal_connec_index->getConstPointer(); + const int *pt=_nodal_connec->getConstPointer(); + int nbOfCells=getNumberOfCells(); + int ret=0; + for(int i=0;isetName(stream.str().c_str()); + std::string name(getName()); + int sz=strlen(PART_OF_NAME); + if(name.length()>=sz) + name=name.substr(0,sz); + if(name!=PART_OF_NAME) + { + std::ostringstream stream; stream << PART_OF_NAME << getName(); + ret->setName(stream.str().c_str()); + } + else + ret->setName(getName()); ret->_mesh_dim=_mesh_dim; ret->setCoords(_coords); int nbOfElemsRet=end-start; diff --git a/src/MEDCoupling/MEDCouplingUMesh.hxx b/src/MEDCoupling/MEDCouplingUMesh.hxx index f3fdf9a77..04d4bb691 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.hxx +++ b/src/MEDCoupling/MEDCouplingUMesh.hxx @@ -47,6 +47,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT DataArrayInt *getNodalConnectivity() const { return _nodal_connec; } MEDCOUPLING_EXPORT DataArrayInt *getNodalConnectivityIndex() const { return _nodal_connec_index; } MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; + MEDCOUPLING_EXPORT int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const; MEDCOUPLING_EXPORT void getNodeIdsOfCell(int cellId, std::vector& conn) const; MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector& coo) const; MEDCOUPLING_EXPORT int getNumberOfNodesInCell(int cellId) const; diff --git a/src/MEDCoupling/MEDCouplingUMeshDesc.cxx b/src/MEDCoupling/MEDCouplingUMeshDesc.cxx index 29f1e58e3..77a8c7257 100644 --- a/src/MEDCoupling/MEDCouplingUMeshDesc.cxx +++ b/src/MEDCoupling/MEDCouplingUMeshDesc.cxx @@ -107,6 +107,18 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingUMeshDesc::getTypeOfCell(int cellId return (INTERP_KERNEL::NormalizedCellType)desc_connec[desc_connec_index[cellId]+1]; } +int MEDCouplingUMeshDesc::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const +{ + const int *desc_connec=_desc_connec->getConstPointer(); + const int *desc_connec_index=_desc_connec_index->getConstPointer(); + int nbOfCells=getNumberOfCells(); + int ret=0; + for(int i=0;i& conn) const { //not implemented yet. diff --git a/src/MEDCoupling/MEDCouplingUMeshDesc.hxx b/src/MEDCoupling/MEDCouplingUMeshDesc.hxx index 91ce649ed..b69645c20 100644 --- a/src/MEDCoupling/MEDCouplingUMeshDesc.hxx +++ b/src/MEDCoupling/MEDCouplingUMeshDesc.hxx @@ -41,6 +41,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT int getFaceMeshLength() const; MEDCOUPLING_EXPORT int getMeshDimension() const { return _mesh_dim; } MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; + MEDCOUPLING_EXPORT int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const; MEDCOUPLING_EXPORT void getNodeIdsOfCell(int cellId, std::vector& conn) const; MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector& coo) const; MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return UNSTRUCTURED_DESC; } diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx index 3ce905d5e..09e9401e7 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx @@ -604,7 +604,12 @@ void MEDCouplingBasicsTest::testBuildPartOfMySelf() CPPUNIT_ASSERT_EQUAL(4,subMesh->getNodalConnectivityIndex()->getNbOfElems()); CPPUNIT_ASSERT(std::equal(subConn2,subConn2+14,subMesh->getNodalConnectivity()->getPointer())); CPPUNIT_ASSERT(std::equal(subConnIndex2,subConnIndex2+4,subMesh->getNodalConnectivityIndex()->getPointer())); + const int tab3[3]={0,1,2}; + MEDCouplingPointSet *subMeshSimple2=subMeshSimple->buildPartOfMySelf(tab3,tab3+3,true); subMesh->decrRef(); + name=subMeshSimple2->getName(); + CPPUNIT_ASSERT(name=="PartOf_Toto"); + subMeshSimple2->decrRef(); // mesh->decrRef(); } diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index dd70bbff5..dc4568624 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -385,6 +385,8 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertEqual(4,subMesh.getNodalConnectivityIndex().getNbOfElems()); self.assertEqual(subConn2[0:14],subMesh.getNodalConnectivity().getValues()); self.assertEqual(subConnIndex2[0:4],subMesh.getNodalConnectivityIndex().getValues()); + subMesh=subMesh.buildPartOfMySelf(range(3),True); + self.assertEqual("PartOf_Toto",subMesh.getName()); pass def testBuildPartOfMySelfNode(self): mesh=MEDCouplingDataForTest.build2DTargetMesh_1(); diff --git a/src/MEDLoader/Swig/libMEDLoader_Swig.i b/src/MEDLoader/Swig/libMEDLoader_Swig.i index 147334ac0..5229afa03 100644 --- a/src/MEDLoader/Swig/libMEDLoader_Swig.i +++ b/src/MEDLoader/Swig/libMEDLoader_Swig.i @@ -37,10 +37,15 @@ %newobject MEDLoader::ReadFieldDouble; %newobject MEDLoader::ReadFieldDoubleCell; %newobject MEDLoader::ReadFieldDoubleNode; +%newobject MEDLoader::ReadFieldDoubleGauss; +%newobject MEDLoader::ReadFieldDoubleGaussNE; class MEDLoader { public: + static void setEpsilonForNodeComp(double val); + static void setCompPolicyForCell(int val); + static void setTooLongStrPolicy(int val); static std::vector GetMeshNames(const char *fileName); static std::vector GetMeshGroupsNames(const char *fileName, const char *meshName); static std::vector GetMeshFamilyNames(const char *fileName, const char *meshName); @@ -97,6 +102,8 @@ public: static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDouble(ParaMEDMEM::TypeOfField type, const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleCell(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleNode(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); + static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleGauss(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); + static ParaMEDMEM::MEDCouplingFieldDouble *ReadFieldDoubleGaussNE(const char *fileName, const char *meshName, int meshDimRelToMax, const char *fieldName, int iteration, int order); static void WriteUMesh(const char *fileName, ParaMEDMEM::MEDCouplingUMesh *mesh, bool writeFromScratch); static void WriteField(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f, bool writeFromScratch); static void WriteFieldUsingAlreadyWrittenMesh(const char *fileName, ParaMEDMEM::MEDCouplingFieldDouble *f);