From: adam Date: Thu, 11 Mar 2010 18:01:10 +0000 (+0000) Subject: Remove some warnings X-Git-Tag: V5_1_main_FINAL~149 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=00443d8e89da2867cdcecf77d009d61b0f833a6a;p=tools%2Fmedcoupling.git Remove some warnings --- diff --git a/src/MEDCoupling/MEDCoupling.hxx b/src/MEDCoupling/MEDCoupling.hxx index 0159344a2..e66ff1c3e 100644 --- a/src/MEDCoupling/MEDCoupling.hxx +++ b/src/MEDCoupling/MEDCoupling.hxx @@ -42,4 +42,8 @@ # define MEDCOUPLINGREMAPPER_EXPORT #endif +#ifdef WNT +#pragma warning( disable : 4290 ) +#endif + #endif diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 89e042596..68975339c 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -75,18 +75,18 @@ namespace ParaMEDMEM DeallocType _dealloc; }; - class MEDCOUPLING_EXPORT DataArray : public RefCountObject, public TimeLabel + class DataArray : public RefCountObject, public TimeLabel { public: - void setName(const char *name); - void copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception); - bool areInfoEquals(const DataArray& other) const; - std::string getName() const { return _name; } - std::string getInfoOnComponent(int i) const { return _info_on_compo[i]; } - void setInfoOnComponent(int i, const char *info) { _info_on_compo[i]=info; } - int getNumberOfComponents() const { return _info_on_compo.size(); } - int getNumberOfTuples() const { return _nb_of_tuples; } - int getNbOfElems() const { return _info_on_compo.size()*_nb_of_tuples; } + MEDCOUPLING_EXPORT void setName(const char *name); + MEDCOUPLING_EXPORT void copyStringInfoFrom(const DataArray& other) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT bool areInfoEquals(const DataArray& other) const; + MEDCOUPLING_EXPORT std::string getName() const { return _name; } + MEDCOUPLING_EXPORT std::string getInfoOnComponent(int i) const { return _info_on_compo[i]; } + MEDCOUPLING_EXPORT void setInfoOnComponent(int i, const char *info) { _info_on_compo[i]=info; } + MEDCOUPLING_EXPORT int getNumberOfComponents() const { return _info_on_compo.size(); } + MEDCOUPLING_EXPORT int getNumberOfTuples() const { return _nb_of_tuples; } + MEDCOUPLING_EXPORT int getNbOfElems() const { return _info_on_compo.size()*_nb_of_tuples; } protected: DataArray():_nb_of_tuples(-1) { } protected: @@ -100,59 +100,59 @@ namespace ParaMEDMEM namespace ParaMEDMEM { - class MEDCOUPLING_EXPORT DataArrayDouble : public DataArray + class DataArrayDouble : public DataArray { public: - static DataArrayDouble *New(); - DataArrayDouble *deepCopy() const; - DataArrayDouble *performCpy(bool deepCpy) const; - void alloc(int nbOfTuple, int nbOfCompo); - bool isEqual(const DataArrayDouble& other, double prec) const; + MEDCOUPLING_EXPORT static DataArrayDouble *New(); + MEDCOUPLING_EXPORT DataArrayDouble *deepCopy() const; + MEDCOUPLING_EXPORT DataArrayDouble *performCpy(bool deepCpy) const; + MEDCOUPLING_EXPORT void alloc(int nbOfTuple, int nbOfCompo); + MEDCOUPLING_EXPORT bool isEqual(const DataArrayDouble& other, double prec) const; //!alloc or useArray should have been called before. - void reAlloc(int nbOfTuples); - void getTuple(int tupleId, double *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); } - double getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } - void setIJ(int tupleId, int compoId, double newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } - double *getPointer() const { return _mem.getPointer(); } - static void setArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet); - const double *getConstPointer() const { return _mem.getConstPointer(); } - void useArray(const double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); - void writeOnPlace(int id, double element0, const double *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } - void checkNoNullValues() const throw(INTERP_KERNEL::Exception); - static DataArrayDouble *aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2); - static DataArrayDouble *add(const DataArrayDouble *a1, const DataArrayDouble *a2); - static DataArrayDouble *substract(const DataArrayDouble *a1, const DataArrayDouble *a2); - static DataArrayDouble *multiply(const DataArrayDouble *a1, const DataArrayDouble *a2); - static DataArrayDouble *divide(const DataArrayDouble *a1, const DataArrayDouble *a2); + MEDCOUPLING_EXPORT void reAlloc(int nbOfTuples); + MEDCOUPLING_EXPORT void getTuple(int tupleId, double *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); } + MEDCOUPLING_EXPORT double getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } + MEDCOUPLING_EXPORT void setIJ(int tupleId, int compoId, double newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } + MEDCOUPLING_EXPORT double *getPointer() const { return _mem.getPointer(); } + MEDCOUPLING_EXPORT static void setArrayIn(DataArrayDouble *newArray, DataArrayDouble* &arrayToSet); + MEDCOUPLING_EXPORT const double *getConstPointer() const { return _mem.getConstPointer(); } + MEDCOUPLING_EXPORT void useArray(const double *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); + MEDCOUPLING_EXPORT void writeOnPlace(int id, double element0, const double *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } + MEDCOUPLING_EXPORT void checkNoNullValues() const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static DataArrayDouble *aggregate(const DataArrayDouble *a1, const DataArrayDouble *a2); + MEDCOUPLING_EXPORT static DataArrayDouble *add(const DataArrayDouble *a1, const DataArrayDouble *a2); + MEDCOUPLING_EXPORT static DataArrayDouble *substract(const DataArrayDouble *a1, const DataArrayDouble *a2); + MEDCOUPLING_EXPORT static DataArrayDouble *multiply(const DataArrayDouble *a1, const DataArrayDouble *a2); + MEDCOUPLING_EXPORT static DataArrayDouble *divide(const DataArrayDouble *a1, const DataArrayDouble *a2); //! nothing to do here because this class does not aggregate any TimeLabel instance. - void updateTime() { } + MEDCOUPLING_EXPORT void updateTime() { } private: DataArrayDouble() { } private: MemArray _mem; }; - class MEDCOUPLING_EXPORT DataArrayInt : public DataArray + class DataArrayInt : public DataArray { public: - static DataArrayInt *New(); - DataArrayInt *deepCopy() const; - DataArrayInt *performCpy(bool deepCpy) const; - void alloc(int nbOfTuple, int nbOfCompo); - bool isEqual(const DataArrayInt& other) const; + MEDCOUPLING_EXPORT static DataArrayInt *New(); + MEDCOUPLING_EXPORT DataArrayInt *deepCopy() const; + MEDCOUPLING_EXPORT DataArrayInt *performCpy(bool deepCpy) const; + MEDCOUPLING_EXPORT void alloc(int nbOfTuple, int nbOfCompo); + MEDCOUPLING_EXPORT bool isEqual(const DataArrayInt& other) const; //!alloc or useArray should have been called before. - void reAlloc(int nbOfTuples); - void getTuple(int tupleId, int *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); } - int getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } - void setIJ(int tupleId, int compoId, int newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } - int *getPointer() const { return _mem.getPointer(); } - static void setArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet); - const int *getConstPointer() const { return _mem.getConstPointer(); } - static DataArrayInt *aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2); - void useArray(const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); - void writeOnPlace(int id, int element0, const int *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } + MEDCOUPLING_EXPORT void reAlloc(int nbOfTuples); + MEDCOUPLING_EXPORT void getTuple(int tupleId, int *res) const { std::copy(_mem.getConstPointerLoc(tupleId*_info_on_compo.size()),_mem.getConstPointerLoc((tupleId+1)*_info_on_compo.size()),res); } + MEDCOUPLING_EXPORT int getIJ(int tupleId, int compoId) const { return _mem[tupleId*_info_on_compo.size()+compoId]; } + MEDCOUPLING_EXPORT void setIJ(int tupleId, int compoId, int newVal) { _mem[tupleId*_info_on_compo.size()+compoId]=newVal; } + MEDCOUPLING_EXPORT int *getPointer() const { return _mem.getPointer(); } + MEDCOUPLING_EXPORT static void setArrayIn(DataArrayInt *newArray, DataArrayInt* &arrayToSet); + MEDCOUPLING_EXPORT const int *getConstPointer() const { return _mem.getConstPointer(); } + MEDCOUPLING_EXPORT static DataArrayInt *aggregate(const DataArrayInt *a1, const DataArrayInt *a2, int offsetA2); + MEDCOUPLING_EXPORT void useArray(const int *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); + MEDCOUPLING_EXPORT void writeOnPlace(int id, int element0, const int *others, int sizeOfOthers) { _mem.writeOnPlace(id,element0,others,sizeOfOthers); } //! nothing to do here because this class does not aggregate any TimeLabel instance. - void updateTime() { } + MEDCOUPLING_EXPORT void updateTime() { } private: DataArrayInt() { } private: diff --git a/src/MEDCoupling/MEDCouplingMesh.cxx b/src/MEDCoupling/MEDCouplingMesh.cxx index 48fd14bb9..e171cda8b 100644 --- a/src/MEDCoupling/MEDCouplingMesh.cxx +++ b/src/MEDCoupling/MEDCouplingMesh.cxx @@ -95,7 +95,7 @@ MEDCouplingFieldDouble *MEDCouplingMesh::fillFromAnalytic(TypeOfField t, int nbO expr.parse(); std::set vars; expr.getTrueSetOfVars(vars); - if(vars.size()>getSpaceDimension()) + if((int)vars.size()>getSpaceDimension()) { std::ostringstream oss; oss << "The mesh has a spaceDim==" << getSpaceDimension() << " and there are "; oss << vars.size() << " variables : "; diff --git a/src/MEDCoupling/MEDCouplingRemapper.hxx b/src/MEDCoupling/MEDCouplingRemapper.hxx index 0d65a0f53..461ce1711 100644 --- a/src/MEDCoupling/MEDCouplingRemapper.hxx +++ b/src/MEDCoupling/MEDCouplingRemapper.hxx @@ -36,19 +36,19 @@ namespace ParaMEDMEM namespace ParaMEDMEM { - class MEDCOUPLINGREMAPPER_EXPORT MEDCouplingRemapper : public TimeLabel, public INTERP_KERNEL::InterpolationOptions + class MEDCouplingRemapper : public TimeLabel, public INTERP_KERNEL::InterpolationOptions { public: - MEDCouplingRemapper(); - ~MEDCouplingRemapper(); - int prepare(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const char *method); - void transfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField, double dftValue); - void reverseTransfer(MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *targetField, double dftValue); - MEDCouplingFieldDouble *transferField(const MEDCouplingFieldDouble *srcField, double dftValue); - MEDCouplingFieldDouble *reverseTransferField(const MEDCouplingFieldDouble *targetField, double dftValue); - bool setOptionInt(const std::string& key, int value); - bool setOptionDouble(const std::string& key, double value); - bool setOptionString(const std::string& key, std::string& value); + MEDCOUPLINGREMAPPER_EXPORT MEDCouplingRemapper(); + MEDCOUPLINGREMAPPER_EXPORT ~MEDCouplingRemapper(); + MEDCOUPLINGREMAPPER_EXPORT int prepare(const MEDCouplingMesh *srcMesh, const MEDCouplingMesh *targetMesh, const char *method); + MEDCOUPLINGREMAPPER_EXPORT void transfer(const MEDCouplingFieldDouble *srcField, MEDCouplingFieldDouble *targetField, double dftValue); + MEDCOUPLINGREMAPPER_EXPORT void reverseTransfer(MEDCouplingFieldDouble *srcField, const MEDCouplingFieldDouble *targetField, double dftValue); + MEDCOUPLINGREMAPPER_EXPORT MEDCouplingFieldDouble *transferField(const MEDCouplingFieldDouble *srcField, double dftValue); + MEDCOUPLINGREMAPPER_EXPORT MEDCouplingFieldDouble *reverseTransferField(const MEDCouplingFieldDouble *targetField, double dftValue); + MEDCOUPLINGREMAPPER_EXPORT bool setOptionInt(const std::string& key, int value); + MEDCOUPLINGREMAPPER_EXPORT bool setOptionDouble(const std::string& key, double value); + MEDCOUPLINGREMAPPER_EXPORT bool setOptionString(const std::string& key, std::string& value); private: int prepareUU(const char *method); int prepareEE(const char *method); diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx index e207da83d..b163086bf 100644 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx @@ -241,7 +241,7 @@ void MEDCouplingTimeDiscretization::applyFunc(int nbOfComp, const char *func) std::set vars; expr.getTrueSetOfVars(vars); int oldNbOfComp=_array->getNumberOfComponents(); - if(vars.size()>oldNbOfComp) + if((int)vars.size()>oldNbOfComp) { std::ostringstream oss; oss << "The field has a " << oldNbOfComp << " components and there are "; oss << vars.size() << " variables : "; diff --git a/src/MEDCoupling/MEDCouplingUMesh.hxx b/src/MEDCoupling/MEDCouplingUMesh.hxx index 5b6a10e79..189400f06 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.hxx +++ b/src/MEDCoupling/MEDCouplingUMesh.hxx @@ -27,63 +27,61 @@ namespace ParaMEDMEM { - class MEDCOUPLING_EXPORT MEDCouplingUMesh : public MEDCouplingPointSet + class MEDCouplingUMesh : public MEDCouplingPointSet { public: - static MEDCouplingUMesh *New(); - static MEDCouplingUMesh *New(const char *meshName, int meshDim); - MEDCouplingUMesh *clone(bool recDeepCpy) const; - void updateTime(); - MEDCouplingMeshType getType() const { return UNSTRUCTURED; } - bool isEqual(const MEDCouplingMesh *other, double prec) const; - void checkCoherency() const throw(INTERP_KERNEL::Exception); - void setMeshDimension(int meshDim); - void allocateCells(int nbOfCells); - void insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, const int *nodalConnOfCell); - void finishInsertingCells(); - const std::set& getAllTypes() const { return _types; } - void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true); - DataArrayInt *getNodalConnectivity() const { return _nodal_connec; } - DataArrayInt *getNodalConnectivityIndex() const { return _nodal_connec_index; } - INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; - void getNodeIdsOfCell(int cellId, std::vector& conn) const; - void getCoordinatesOfNode(int nodeId, std::vector& coo) const; - int getNumberOfNodesInCell(int cellId) const; - int getNumberOfCells() const; - int getMeshDimension() const; - int getMeshLength() const; + MEDCOUPLING_EXPORT static MEDCouplingUMesh *New(); + MEDCOUPLING_EXPORT static MEDCouplingUMesh *New(const char *meshName, int meshDim); + MEDCOUPLING_EXPORT MEDCouplingUMesh *clone(bool recDeepCpy) const; + MEDCOUPLING_EXPORT void updateTime(); + MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return UNSTRUCTURED; } + MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingMesh *other, double prec) const; + MEDCOUPLING_EXPORT void checkCoherency() const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void setMeshDimension(int meshDim); + MEDCOUPLING_EXPORT void allocateCells(int nbOfCells); + MEDCOUPLING_EXPORT void insertNextCell(INTERP_KERNEL::NormalizedCellType type, int size, const int *nodalConnOfCell); + MEDCOUPLING_EXPORT void finishInsertingCells(); + MEDCOUPLING_EXPORT const std::set& getAllTypes() const { return _types; } + MEDCOUPLING_EXPORT void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true); + 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 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; + MEDCOUPLING_EXPORT int getNumberOfCells() const; + MEDCOUPLING_EXPORT int getMeshDimension() const; + MEDCOUPLING_EXPORT int getMeshLength() const; //! size of returned tinyInfo must be always the same. - void getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const; - bool isEmptyMesh(const std::vector& tinyInfo) const; - void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings); - void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; - void unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, - const std::vector& littleStrings); + MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const; + MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector& tinyInfo) const; + MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings); + MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; + MEDCOUPLING_EXPORT void unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector& littleStrings); //tools - void convertToPolyTypes(const std::vector& cellIdsToConvert); - DataArrayInt *zipCoordsTraducer(); - void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const; - MEDCouplingUMesh *buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const; - DataArrayInt *mergeNodes(double precision, bool& areNodesMerged); - MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const; - MEDCouplingPointSet *buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const; - void findBoundaryNodes(std::vector& nodes) const; - MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const; - void renumberNodes(const int *newNodeNumbers, int newNbOfNodes); - void giveElemsInBoundingBox(const double *bbox, double eps, std::vector& elems); - MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; - MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const; - MEDCouplingFieldDouble *buildOrthogonalField() const; - int getCellContainingPoint(const double *pos, double eps) const; - void getCellsContainingPoint(const double *pos, double eps, std::vector& elts) const; - void getCellsContainingPoints(const double *pos, int nbOfPoints, double eps, - std::vector& elts, std::vector& eltsIndex) const; - void checkButterflyCells(std::vector& cells) const; - void getBoundingBoxForBBTree(std::vector& bbox) const; - bool checkConsecutiveCellTypes() const; - MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; - DataArrayDouble *getBarycenterAndOwner() const; - static MEDCouplingUMesh *mergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2); + MEDCOUPLING_EXPORT void convertToPolyTypes(const std::vector& cellIdsToConvert); + MEDCOUPLING_EXPORT DataArrayInt *zipCoordsTraducer(); + MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const; + MEDCOUPLING_EXPORT MEDCouplingUMesh *buildDescendingConnectivity(DataArrayInt *desc, DataArrayInt *descIndx, DataArrayInt *revDesc, DataArrayInt *revDescIndx) const; + MEDCOUPLING_EXPORT DataArrayInt *mergeNodes(double precision, bool& areNodesMerged); + MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const; + MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const; + MEDCOUPLING_EXPORT void findBoundaryNodes(std::vector& nodes) const; + MEDCOUPLING_EXPORT MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const; + MEDCOUPLING_EXPORT void renumberNodes(const int *newNodeNumbers, int newNbOfNodes); + MEDCOUPLING_EXPORT void giveElemsInBoundingBox(const double *bbox, double eps, std::vector& elems); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const; + MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const; + MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector& elts) const; + MEDCOUPLING_EXPORT void getCellsContainingPoints(const double *pos, int nbOfPoints, double eps, std::vector& elts, std::vector& eltsIndex) const; + MEDCOUPLING_EXPORT void checkButterflyCells(std::vector& cells) const; + MEDCOUPLING_EXPORT void getBoundingBoxForBBTree(std::vector& bbox) const; + MEDCOUPLING_EXPORT bool checkConsecutiveCellTypes() const; + MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; + MEDCOUPLING_EXPORT DataArrayDouble *getBarycenterAndOwner() const; + MEDCOUPLING_EXPORT static MEDCouplingUMesh *mergeUMeshes(const MEDCouplingUMesh *mesh1, const MEDCouplingUMesh *mesh2); private: MEDCouplingUMesh(); MEDCouplingUMesh(const MEDCouplingUMesh& other, bool deepCpy); diff --git a/src/MEDCoupling/MEDCouplingUMeshDesc.hxx b/src/MEDCoupling/MEDCouplingUMeshDesc.hxx index 62e303bf5..0cf2537f7 100644 --- a/src/MEDCoupling/MEDCouplingUMeshDesc.hxx +++ b/src/MEDCoupling/MEDCouplingUMeshDesc.hxx @@ -27,44 +27,43 @@ namespace ParaMEDMEM { - class MEDCOUPLING_EXPORT MEDCouplingUMeshDesc : public MEDCouplingPointSet + class MEDCouplingUMeshDesc : public MEDCouplingPointSet { public: - static MEDCouplingUMeshDesc *New(); - static MEDCouplingUMeshDesc *New(const char *meshName, int meshDim); - void checkCoherency() const throw(INTERP_KERNEL::Exception); - void setMeshDimension(unsigned meshDim); - int getNumberOfCells() const; - int getNumberOfFaces() const; - int getCellMeshLength() const; - int getFaceMeshLength() const; - int getMeshDimension() const { return _mesh_dim; } - INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; - void getNodeIdsOfCell(int cellId, std::vector& conn) const; - void getCoordinatesOfNode(int nodeId, std::vector& coo) const; - MEDCouplingMeshType getType() const { return UNSTRUCTURED_DESC; } - void setConnectivity(DataArrayInt *descConn, DataArrayInt *descConnIndex, DataArrayInt *nodalFaceConn, DataArrayInt *nodalFaceConnIndx); + MEDCOUPLING_EXPORT static MEDCouplingUMeshDesc *New(); + MEDCOUPLING_EXPORT static MEDCouplingUMeshDesc *New(const char *meshName, int meshDim); + MEDCOUPLING_EXPORT void checkCoherency() const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void setMeshDimension(unsigned meshDim); + MEDCOUPLING_EXPORT int getNumberOfCells() const; + MEDCOUPLING_EXPORT int getNumberOfFaces() const; + MEDCOUPLING_EXPORT int getCellMeshLength() const; + MEDCOUPLING_EXPORT int getFaceMeshLength() const; + MEDCOUPLING_EXPORT int getMeshDimension() const { return _mesh_dim; } + MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) 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; } + MEDCOUPLING_EXPORT void setConnectivity(DataArrayInt *descConn, DataArrayInt *descConnIndex, DataArrayInt *nodalFaceConn, DataArrayInt *nodalFaceConnIndx); //tools to overload - void getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const; - bool isEmptyMesh(const std::vector& tinyInfo) const; - void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings); - void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; - void unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, - const std::vector& littleStrings); - void giveElemsInBoundingBox(const double *bbox, double eps, std::vector& elems); - DataArrayInt *mergeNodes(double precision, bool& areNodesMerged); - MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const; - MEDCouplingPointSet *buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const; - void findBoundaryNodes(std::vector& nodes) const; - MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const; - void renumberNodes(const int *newNodeNumbers, int newNbOfNodes); - MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; - MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const; - int getCellContainingPoint(const double *pos, double eps) const; - MEDCouplingFieldDouble *buildOrthogonalField() const; - DataArrayInt *zipCoordsTraducer(); - MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; - DataArrayDouble *getBarycenterAndOwner() const; + MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector& tinyInfo, std::vector& littleStrings) const; + MEDCOUPLING_EXPORT bool isEmptyMesh(const std::vector& tinyInfo) const; + MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings); + MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; + MEDCOUPLING_EXPORT void unserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, const std::vector& littleStrings); + MEDCOUPLING_EXPORT void giveElemsInBoundingBox(const double *bbox, double eps, std::vector& elems); + MEDCOUPLING_EXPORT DataArrayInt *mergeNodes(double precision, bool& areNodesMerged); + MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelf(const int *start, const int *end, bool keepCoords) const; + MEDCOUPLING_EXPORT MEDCouplingPointSet *buildPartOfMySelfNode(const int *start, const int *end, bool fullyIn) const; + MEDCOUPLING_EXPORT void findBoundaryNodes(std::vector& nodes) const; + MEDCOUPLING_EXPORT MEDCouplingPointSet *buildBoundaryMesh(bool keepCoords) const; + MEDCOUPLING_EXPORT void renumberNodes(const int *newNodeNumbers, int newNbOfNodes); + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const; + MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const; + MEDCOUPLING_EXPORT DataArrayInt *zipCoordsTraducer(); + MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; + MEDCOUPLING_EXPORT DataArrayDouble *getBarycenterAndOwner() const; private: MEDCouplingUMeshDesc(); ~MEDCouplingUMeshDesc();