X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingCMesh.hxx;h=ef768835a6c56da7062fd469eb0b56d1fd1428ab;hb=48e298dbf14059e3392eb522cfdb634bfefeaf1b;hp=d80a3e2a33b2db6d64582d2ebc871741168ea650;hpb=10f37bf6f33a762626d7f1093b2f5450c1688667;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingCMesh.hxx b/src/MEDCoupling/MEDCouplingCMesh.hxx index d80a3e2a3..ef768835a 100644 --- a/src/MEDCoupling/MEDCouplingCMesh.hxx +++ b/src/MEDCoupling/MEDCouplingCMesh.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 @@ -16,19 +16,20 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// Author : Anthony Geay (CEA/DEN) #ifndef __PARAMEDMEM_MEDCOUPLINGCMESH_HXX__ #define __PARAMEDMEM_MEDCOUPLINGCMESH_HXX__ #include "MEDCoupling.hxx" -#include "MEDCouplingMesh.hxx" +#include "MEDCouplingStructuredMesh.hxx" namespace ParaMEDMEM { class DataArrayDouble; class MEDCouplingUMesh; - class MEDCOUPLING_EXPORT MEDCouplingCMesh : public MEDCouplingMesh + class MEDCOUPLING_EXPORT MEDCouplingCMesh : public MEDCouplingStructuredMesh { public: static MEDCouplingCMesh *New(); @@ -36,6 +37,7 @@ namespace ParaMEDMEM MEDCouplingMesh *deepCpy() const; MEDCouplingCMesh *clone(bool recDeepCpy) const; void updateTime() const; + std::size_t getHeapMemorySize() const; MEDCouplingMeshType getType() const { return CARTESIAN; } void copyTinyStringsFrom(const MEDCouplingMesh *other) throw(INTERP_KERNEL::Exception); bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const throw(INTERP_KERNEL::Exception); @@ -51,13 +53,6 @@ namespace ParaMEDMEM int getNumberOfNodes() const; int getSpaceDimension() const; int getMeshDimension() const; - int getCellIdFromPos(int i, int j, int k) const; - 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; - 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; @@ -68,17 +63,9 @@ namespace ParaMEDMEM const DataArrayDouble *coordsY=0, const DataArrayDouble *coordsZ=0); // 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); void getBoundingBox(double *bbox) const; MEDCouplingFieldDouble *getMeasureField(bool isAbs) const; MEDCouplingFieldDouble *getMeasureFieldOnNode(bool isAbs) const; - MEDCouplingFieldDouble *buildOrthogonalField() const; int getCellContainingPoint(const double *pos, double eps) const; void rotate(const double *center, const double *vector, double angle); void translate(const double *vector); @@ -86,19 +73,19 @@ namespace ParaMEDMEM MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; DataArrayDouble *getCoordinatesAndOwner() const; DataArrayDouble *getBarycenterAndOwner() const; + DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const throw(INTERP_KERNEL::Exception); void renumberCells(const int *old2NewBg, bool check=true) throw(INTERP_KERNEL::Exception); - void fill1DUnstructuredMesh(MEDCouplingUMesh *m) const; - void fill2DUnstructuredMesh(MEDCouplingUMesh *m) const; - void fill3DUnstructuredMesh(MEDCouplingUMesh *m) const; //some useful methods void getSplitCellValues(int *res) const; void getSplitNodeValues(int *res) const; + void getNodeGridStructure(int *res) const; //serialisation-unserialization 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); + void reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception); private: MEDCouplingCMesh(); MEDCouplingCMesh(const MEDCouplingCMesh& other, bool deepCpy);