X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingExtrudedMesh.hxx;h=ebceee9c3415dfecab98b4fc57cbee07c7b36352;hb=ed660a54b2a0e5e9f81efee98ce988ca82475e02;hp=8f9bc9c0918ae98377964298cd36f33ce3c8cc82;hpb=887d0e1efce4f46f68d2596dcd801f02f5c1f99e;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx index 8f9bc9c09..ebceee9c3 100644 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx +++ b/src/MEDCoupling/MEDCouplingExtrudedMesh.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -33,76 +33,83 @@ namespace ParaMEDMEM class MEDCouplingUMesh; class MEDCouplingFieldDouble; - class MEDCOUPLING_EXPORT MEDCouplingExtrudedMesh : public MEDCouplingMesh + class MEDCouplingExtrudedMesh : public MEDCouplingMesh { public: - static MEDCouplingExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception); - static MEDCouplingExtrudedMesh *New(); - MEDCouplingMeshType getType() const; - std::size_t getHeapMemorySize() const; - void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception); - int getNumberOfCells() const; - int getNumberOfNodes() const; - int getSpaceDimension() const; - int getMeshDimension() const; - MEDCouplingMesh *deepCpy() const; + MEDCOUPLING_EXPORT static MEDCouplingExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId); + MEDCOUPLING_EXPORT static MEDCouplingExtrudedMesh *New(); + MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const; + MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; + MEDCOUPLING_EXPORT std::vector getDirectChildren() const; + MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other); + MEDCOUPLING_EXPORT int getNumberOfCells() const; + MEDCOUPLING_EXPORT int getNumberOfNodes() const; + MEDCOUPLING_EXPORT int getSpaceDimension() const; + MEDCOUPLING_EXPORT int getMeshDimension() const; + MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const; MEDCouplingExtrudedMesh *clone(bool recDeepCpy) const; - bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception); - bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const; - void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec, - DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const throw(INTERP_KERNEL::Exception); - void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec, - DataArrayInt *&cellCor) const throw(INTERP_KERNEL::Exception); - INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; - std::set getAllGeoTypes() const; - int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const; - void getNodeIdsOfCell(int cellId, std::vector& conn) const; - void getCoordinatesOfNode(int nodeId, std::vector& coo) const throw(INTERP_KERNEL::Exception); - std::string simpleRepr() const; - std::string advancedRepr() const; - void checkCoherency() const throw (INTERP_KERNEL::Exception); - void checkCoherency1(double eps=1e-12) const throw(INTERP_KERNEL::Exception); - void checkCoherency2(double eps=1e-12) const throw(INTERP_KERNEL::Exception); - void getBoundingBox(double *bbox) const; - void updateTime() const; - void renumberCells(const int *old2NewBg, bool check=true) throw(INTERP_KERNEL::Exception); - MEDCouplingUMesh *getMesh2D() const { return _mesh2D; } - MEDCouplingUMesh *getMesh1D() const { return _mesh1D; } - DataArrayInt *getMesh3DIds() const { return _mesh3D_ids; } - MEDCouplingUMesh *build3DUnstructuredMesh() const; - MEDCouplingUMesh *buildUnstructured() const throw(INTERP_KERNEL::Exception); - MEDCouplingFieldDouble *getMeasureField(bool) const; - MEDCouplingFieldDouble *getMeasureFieldOnNode(bool) const; - MEDCouplingFieldDouble *buildOrthogonalField() const; - int getCellContainingPoint(const double *pos, double eps) const; - static int FindCorrespCellByNodalConn(const std::vector& nodalConnec, - const int *revNodalPtr, const int *revNodalIndxPtr) throw(INTERP_KERNEL::Exception); - static void Project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, - MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v) throw(INTERP_KERNEL::Exception); - void rotate(const double *center, const double *vector, double angle); - void translate(const double *vector); - void scale(const double *point, double factor); - std::vector getDistributionOfTypes() const throw(INTERP_KERNEL::Exception); - DataArrayInt *checkTypeConsistencyAndContig(const std::vector& code, const std::vector& idsPerType) const throw(INTERP_KERNEL::Exception); - void splitProfilePerType(const DataArrayInt *profile, std::vector& code, std::vector& idsInPflPerType, std::vector& idsPerType) const throw(INTERP_KERNEL::Exception); - MEDCouplingMesh *buildPart(const int *start, const int *end) const; - MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const; - DataArrayInt *simplexize(int policy) throw(INTERP_KERNEL::Exception); - MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; - DataArrayDouble *getCoordinatesAndOwner() const; - DataArrayDouble *getBarycenterAndOwner() const; + MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const; + MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const; + MEDCOUPLING_EXPORT void checkDeepEquivalWith(const MEDCouplingMesh *other, int cellCompPol, double prec, + DataArrayInt *&cellCor, DataArrayInt *&nodeCor) const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec, + DataArrayInt *&cellCor) const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; + MEDCOUPLING_EXPORT std::set getAllGeoTypes() const; + MEDCOUPLING_EXPORT DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const; + MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const; + MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const; + MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() 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 std::string simpleRepr() const; + MEDCOUPLING_EXPORT std::string advancedRepr() const; + MEDCOUPLING_EXPORT void checkCoherency() const throw (INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void checkCoherency1(double eps=1e-12) const; + MEDCOUPLING_EXPORT void checkCoherency2(double eps=1e-12) const; + MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const; + MEDCOUPLING_EXPORT void updateTime() const; + MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true); + MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh2D() const { return _mesh2D; } + MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh1D() const { return _mesh1D; } + MEDCOUPLING_EXPORT DataArrayInt *getMesh3DIds() const { return _mesh3D_ids; } + MEDCOUPLING_EXPORT MEDCouplingUMesh *build3DUnstructuredMesh() const; + MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureFieldOnNode(bool) const; + MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildOrthogonalField() const; + MEDCOUPLING_EXPORT int getCellContainingPoint(const double *pos, double eps) const; + MEDCOUPLING_EXPORT static int FindCorrespCellByNodalConn(const std::vector& nodalConnec, + const int *revNodalPtr, const int *revNodalIndxPtr) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static void Project1DMeshes(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, double eps, + MEDCouplingUMesh *&m1r, MEDCouplingUMesh *&m2r, double *v) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void rotate(const double *center, const double *vector, double angle); + MEDCOUPLING_EXPORT void translate(const double *vector); + MEDCOUPLING_EXPORT void scale(const double *point, double factor); + MEDCOUPLING_EXPORT std::vector getDistributionOfTypes() const; + MEDCOUPLING_EXPORT DataArrayInt *checkTypeConsistencyAndContig(const std::vector& code, const std::vector& idsPerType) const; + MEDCOUPLING_EXPORT void splitProfilePerType(const DataArrayInt *profile, std::vector& code, std::vector& idsInPflPerType, std::vector& idsPerType) const; + MEDCOUPLING_EXPORT MEDCouplingMesh *buildPart(const int *start, const int *end) const; + MEDCOUPLING_EXPORT MEDCouplingMesh *buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const; + MEDCOUPLING_EXPORT DataArrayInt *simplexize(int policy); + MEDCOUPLING_EXPORT MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; + MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const; + MEDCOUPLING_EXPORT DataArrayDouble *getBarycenterAndOwner() const; + MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const; //Serialization unserialisation - void getTinySerializationInformation(std::vector& tinyInfoD, std::vector& tinyInfo, std::vector& littleStrings) const; - void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings) const; - void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; - void unserialization(const std::vector& tinyInfoD, const std::vector& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, - const std::vector& littleStrings); + MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector& tinyInfoD, std::vector& tinyInfo, std::vector& littleStrings) const; + MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector& tinyInfo, DataArrayInt *a1, DataArrayDouble *a2, std::vector& littleStrings) const; + MEDCOUPLING_EXPORT void serialize(DataArrayInt *&a1, DataArrayDouble *&a2) const; + MEDCOUPLING_EXPORT void unserialization(const std::vector& tinyInfoD, const std::vector& tinyInfo, const DataArrayInt *a1, DataArrayDouble *a2, + const std::vector& littleStrings); + MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const; private: - MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId) throw(INTERP_KERNEL::Exception); + MEDCouplingExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId); MEDCouplingExtrudedMesh(const MEDCouplingExtrudedMesh& other, bool deepCopy); MEDCouplingExtrudedMesh(); - void computeExtrusion(const MEDCouplingUMesh *mesh3D) throw(INTERP_KERNEL::Exception); - void computeExtrusionAlg(const MEDCouplingUMesh *mesh3D) throw(INTERP_KERNEL::Exception); + void computeExtrusion(const MEDCouplingUMesh *mesh3D); + void computeExtrusionAlg(const MEDCouplingUMesh *mesh3D); void build1DExtrusion(int idIn3DDesc, int newId, int nbOf1DLev, MEDCouplingUMesh *subMesh, const int *desc3D, const int *descIndx3D, const int *revDesc3D, const int *revDescIndx3D, @@ -112,8 +119,8 @@ namespace ParaMEDMEM const int *conn2D, const int *conn2DIndx) throw(INTERP_KERNEL::Exception); void computeBaryCenterOfFace(const std::vector& nodalConnec, int lev1DId); ~MEDCouplingExtrudedMesh(); - void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData) const throw(INTERP_KERNEL::Exception); - std::string getVTKDataSetType() const throw(INTERP_KERNEL::Exception); + void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const; + std::string getVTKDataSetType() const; private: MEDCouplingUMesh *_mesh2D; MEDCouplingUMesh *_mesh1D;