X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingStructuredMesh.hxx;h=70c12d7b9d0fb181c90623ccc4538b2a835b74d7;hb=0c9d48870957c4a9f6f82fc8e2c569780a5f886b;hp=786d4d2d58c09a3a8a921c1fe67e046be9ca1a64;hpb=468bbce4875c5e421f0a9e4f5f37aaf4fc2a4247;p=modules%2Fmed.git diff --git a/src/MEDCoupling/MEDCouplingStructuredMesh.hxx b/src/MEDCoupling/MEDCouplingStructuredMesh.hxx index 786d4d2d5..70c12d7b9 100644 --- a/src/MEDCoupling/MEDCouplingStructuredMesh.hxx +++ b/src/MEDCoupling/MEDCouplingStructuredMesh.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 @@ -26,41 +26,58 @@ namespace ParaMEDMEM { - class MEDCOUPLING_EXPORT MEDCouplingStructuredMesh : public MEDCouplingMesh + class MEDCoupling1SGTUMesh; + + class MEDCouplingStructuredMesh : public MEDCouplingMesh { public: - INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; - std::set getAllGeoTypes() const; - int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const; - DataArrayInt *giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const throw(INTERP_KERNEL::Exception); - DataArrayInt *computeNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception); - static void GetPosFromId(int nodeId, int meshDim, const int *split, int *res); - void getNodeIdsOfCell(int cellId, std::vector& conn) const; - std::size_t getHeapMemorySize() const; - void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception); - bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT INTERP_KERNEL::NormalizedCellType getTypeOfCell(int cellId) const; + MEDCOUPLING_EXPORT std::set getAllGeoTypes() const; + MEDCOUPLING_EXPORT int getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) 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 static void GetPosFromId(int nodeId, int meshDim, const int *split, int *res); + MEDCOUPLING_EXPORT static INTERP_KERNEL::NormalizedCellType GetGeoTypeGivenMeshDimension(int meshDim); + MEDCOUPLING_EXPORT void getNodeIdsOfCell(int cellId, std::vector& conn) const; + MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; + MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other); + MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const; //tools - 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); - MEDCouplingUMesh *buildUnstructured() 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); - MEDCouplingFieldDouble *buildOrthogonalField() const; - void fill1DUnstructuredMesh(MEDCouplingUMesh *m) const; - void fill2DUnstructuredMesh(MEDCouplingUMesh *m) const; - void fill3DUnstructuredMesh(MEDCouplingUMesh *m) const; + 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 MEDCoupling1SGTUMesh *build1SGTUnstructured() const; + MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() 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 MEDCouplingFieldDouble *buildOrthogonalField() const; + MEDCOUPLING_EXPORT void getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const; //some useful methods - int getCellIdFromPos(int i, int j, int k) const; - int getNodeIdFromPos(int i, int j, int k) const; - virtual void getNodeGridStructure(int *res) const = 0; - virtual void getSplitCellValues(int *res) const = 0; - virtual void getSplitNodeValues(int *res) const = 0; + MEDCOUPLING_EXPORT int getCellIdFromPos(int i, int j, int k) const; + MEDCOUPLING_EXPORT int getNodeIdFromPos(int i, int j, int k) const; + MEDCOUPLING_EXPORT virtual void getNodeGridStructure(int *res) const = 0; + MEDCOUPLING_EXPORT virtual void getSplitCellValues(int *res) const = 0; + MEDCOUPLING_EXPORT virtual void getSplitNodeValues(int *res) const = 0; + MEDCOUPLING_EXPORT virtual std::vector getNodeGridStructure() const = 0; + MEDCOUPLING_EXPORT std::vector getCellGridStructure() const; + MEDCOUPLING_EXPORT virtual MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair >& cellPart) const = 0; + MEDCOUPLING_EXPORT static bool IsPartStructured(const int *startIds, const int *stopIds, const std::vector& st, std::vector< std::pair >& partCompactFormat); + MEDCOUPLING_EXPORT static DataArrayInt *BuildExplicitIdsFrom(const std::vector& st, const std::vector< std::pair >& partCompactFormat); + MEDCOUPLING_EXPORT static DataArrayInt *Build1GTNodalConnectivity(const int *nodeStBg, const int *nodeStEnd); + private: + static void GetReverseNodalConnectivity1(const std::vector& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx); + static void GetReverseNodalConnectivity2(const std::vector& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx); + static void GetReverseNodalConnectivity3(const std::vector& ngs, DataArrayInt *revNodal, DataArrayInt *revNodalIndx); + static DataArrayInt *Build1GTNodalConnectivity1D(const int *nodeStBg); + static DataArrayInt *Build1GTNodalConnectivity2D(const int *nodeStBg); + static DataArrayInt *Build1GTNodalConnectivity3D(const int *nodeStBg); protected: - MEDCouplingStructuredMesh(); - MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCpy); - ~MEDCouplingStructuredMesh(); + MEDCOUPLING_EXPORT MEDCouplingStructuredMesh(); + MEDCOUPLING_EXPORT MEDCouplingStructuredMesh(const MEDCouplingStructuredMesh& other, bool deepCpy); + MEDCOUPLING_EXPORT ~MEDCouplingStructuredMesh(); }; }