X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingCMesh.hxx;h=78901b77b67488ae2dd68dfec51c3f159bfa4f26;hb=b607ffc713080a567fb90595118069ac18181e99;hp=42060614bf5e0762b314cefb56e7131c9c8aa3df;hpb=fb512e2b77325290aaa2b4c9fd8f22d5949b6369;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingCMesh.hxx b/src/MEDCoupling/MEDCouplingCMesh.hxx index 42060614b..78901b77b 100644 --- a/src/MEDCoupling/MEDCouplingCMesh.hxx +++ b/src/MEDCoupling/MEDCouplingCMesh.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 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 @@ -24,37 +24,35 @@ #include "MEDCoupling.hxx" #include "MEDCouplingStructuredMesh.hxx" -namespace ParaMEDMEM +namespace MEDCoupling { - class DataArrayDouble; - class MEDCouplingUMesh; - + class MEDCouplingCurveLinearMesh; + class MEDCouplingCMesh : public MEDCouplingStructuredMesh { public: MEDCOUPLING_EXPORT static MEDCouplingCMesh *New(); MEDCOUPLING_EXPORT static MEDCouplingCMesh *New(const std::string& meshName); - MEDCOUPLING_EXPORT MEDCouplingMesh *deepCpy() const; + MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingCMesh"); } + MEDCOUPLING_EXPORT MEDCouplingCMesh *deepCopy() const; MEDCOUPLING_EXPORT MEDCouplingCMesh *clone(bool recDeepCpy) const; + MEDCOUPLING_EXPORT const DataArrayDouble *getDirectAccessOfCoordsArrIfInStructure() const; + MEDCOUPLING_EXPORT MEDCouplingCurveLinearMesh *buildCurveLinear() const; MEDCOUPLING_EXPORT void updateTime() const; MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; - MEDCOUPLING_EXPORT std::vector getDirectChildren() const; + MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() const; MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const { return CARTESIAN; } MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other); 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); + DataArrayIdType *&cellCor, DataArrayIdType *&nodeCor) const; MEDCOUPLING_EXPORT void checkDeepEquivalOnSameNodesWith(const MEDCouplingMesh *other, int cellCompPol, double prec, - DataArrayInt *&cellCor) const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT void checkCoherency() const; - MEDCOUPLING_EXPORT void checkCoherency1(double eps=1e-12) const; - MEDCOUPLING_EXPORT void checkCoherency2(double eps=1e-12) const; - MEDCOUPLING_EXPORT int getNumberOfCells() const; - MEDCOUPLING_EXPORT int getNumberOfNodes() const; + DataArrayIdType *&cellCor) const; + MEDCOUPLING_EXPORT void checkConsistencyLight() const; + MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const; MEDCOUPLING_EXPORT int getSpaceDimension() const; - MEDCOUPLING_EXPORT int getMeshDimension() const; - MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector& coo) const; + MEDCOUPLING_EXPORT void getCoordinatesOfNode(mcIdType nodeId, std::vector& coo) const; MEDCOUPLING_EXPORT std::string simpleRepr() const; MEDCOUPLING_EXPORT std::string advancedRepr() const; MEDCOUPLING_EXPORT const DataArrayDouble *getCoordsAt(int i) const; @@ -67,28 +65,28 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const; 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 mcIdType getCellContainingPoint(const double *pos, double eps) const; + MEDCOUPLING_EXPORT void getCellsContainingPoint(const double *pos, double eps, std::vector& elts) const; 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 MEDCouplingMesh *mergeMyselfWith(const MEDCouplingMesh *other) const; MEDCOUPLING_EXPORT DataArrayDouble *getCoordinatesAndOwner() const; - MEDCOUPLING_EXPORT DataArrayDouble *getBarycenterAndOwner() const; + MEDCOUPLING_EXPORT DataArrayDouble *computeCellCenterOfMass() const; MEDCOUPLING_EXPORT DataArrayDouble *computeIsoBarycenterOfNodesPerCell() const; - MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true); + MEDCOUPLING_EXPORT void renumberCells(const mcIdType *old2NewBg, bool check=true); //some useful methods - MEDCOUPLING_EXPORT void getSplitCellValues(int *res) const; - MEDCOUPLING_EXPORT void getSplitNodeValues(int *res) const; - MEDCOUPLING_EXPORT void getNodeGridStructure(int *res) const; - MEDCOUPLING_EXPORT std::vector getNodeGridStructure() const; - MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair >& cellPart) const; + MEDCOUPLING_EXPORT void getNodeGridStructure(mcIdType *res) const; + MEDCOUPLING_EXPORT std::vector getNodeGridStructure() const; + MEDCouplingStructuredMesh *buildStructuredSubPart(const std::vector< std::pair >& cellPart) const; //serialisation-unserialization - 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, + MEDCOUPLING_EXPORT void getTinySerializationInformation(std::vector& tinyInfoD, std::vector& tinyInfo, std::vector& littleStrings) const; + MEDCOUPLING_EXPORT void resizeForUnserialization(const std::vector& tinyInfo, DataArrayIdType *a1, DataArrayDouble *a2, std::vector& littleStrings) const; + MEDCOUPLING_EXPORT void serialize(DataArrayIdType *&a1, DataArrayDouble *&a2) const; + MEDCOUPLING_EXPORT void unserialization(const std::vector& tinyInfoD, const std::vector& tinyInfo, const DataArrayIdType *a1, DataArrayDouble *a2, const std::vector& littleStrings); MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const; + MEDCOUPLING_EXPORT std::string getVTKFileExtension() const; private: MEDCouplingCMesh(); MEDCouplingCMesh(const MEDCouplingCMesh& other, bool deepCpy);