Salome HOME
Merge branch 'occ/24009'
[tools/medcoupling.git] / src / MEDLoader / MEDFileMesh.hxx
index b966a04a0de35aff0c00d620d79bc0d04860107c..6dfd75a739cf8c1c8245d3706f0397fb2be641e0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2021  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
@@ -167,6 +167,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT void normalizeFamIdsTrio();
     MEDLOADER_EXPORT void normalizeFamIdsMEDFile();
     MEDLOADER_EXPORT virtual int getMeshDimension() const = 0;
+    MEDLOADER_EXPORT virtual int getSpaceDimension() const = 0;
     MEDLOADER_EXPORT virtual std::string simpleRepr() const;
     MEDLOADER_EXPORT virtual std::string advancedRepr() const = 0;
     //
@@ -201,7 +202,7 @@ namespace MEDCoupling
     const MEDFileEquivalences *getEquivalences() const { return _equiv; }
     void killEquivalences() { _equiv=(MEDFileEquivalences *)0; }
     void initializeEquivalences() { _equiv=MEDFileEquivalences::New(this); }
-    static INTERP_KERNEL::NormalizedCellType ConvertFromMEDFileGeoType(med_geometry_type geoType);
+    MEDLOADER_EXPORT static INTERP_KERNEL::NormalizedCellType ConvertFromMEDFileGeoType(med_geometry_type geoType);
     static TypeOfField ConvertFromMEDFileEntity(med_entity_type etype);
   protected:
     MEDFileMesh();
@@ -268,6 +269,8 @@ namespace MEDCoupling
     MEDLOADER_EXPORT std::string getClassName() const override { return std::string("MEDFileUMesh"); }
     MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
     MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(med_idt fid, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<mcIdType>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+    MEDLOADER_EXPORT static void LoadPartCoords(const std::string& fileName, const std::string& mName, int dt, int it, const std::vector<std::string>& infosOnComp, mcIdType startNodeId, mcIdType stopNodeId,
+MCAuto<DataArrayDouble>& coords, MCAuto<PartDefinition>& partCoords, MCAuto<DataArrayIdType>& famCoords, MCAuto<DataArrayIdType>& numCoords, MCAuto<DataArrayAsciiChar>& nameCoords);
     MEDLOADER_EXPORT static const char *GetSpeStr4ExtMesh() { return SPE_FAM_STR_EXTRUDED_MESH; }
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
@@ -329,6 +332,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const;
     MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM3Mesh(bool renum=false) const;
     MEDLOADER_EXPORT void forceComputationOfParts() const;
+    MEDLOADER_EXPORT void computeRevNum() const;
     MEDLOADER_EXPORT std::vector<MEDCoupling1GTUMesh *> getDirectUndergroundSingleGeoTypeMeshes(int meshDimRelToMax) const;
     MEDLOADER_EXPORT MEDCoupling1GTUMesh *getDirectUndergroundSingleGeoTypeMesh(INTERP_KERNEL::NormalizedCellType gt) const;
     MEDLOADER_EXPORT DataArrayIdType *extractFamilyFieldOnGeoType(INTERP_KERNEL::NormalizedCellType gt) const;
@@ -382,7 +386,6 @@ namespace MEDCoupling
     MEDFileUMeshSplitL1 *getMeshAtLevSafe(int meshDimRelToMaxExt);
     void checkMeshDimCoherency(int meshDim, int meshDimRelToMax) const;
     DataArrayDouble *checkMultiMesh(const std::vector<const MEDCouplingUMesh *>& ms) const;
-    void computeRevNum() const;
     void synchronizeTinyInfoOnLeaves() const;
     void changeFamilyIdArr(mcIdType oldId, mcIdType newId);
     std::list< MCAuto<DataArrayIdType> > getAllNonNullFamilyIds() const;
@@ -390,9 +393,9 @@ namespace MEDCoupling
   private:
     static const char SPE_FAM_STR_EXTRUDED_MESH[];
   private:
-    std::vector< MCAuto<MEDFileUMeshSplitL1> > _ms;
+    std::vector< MCAuto<MEDFileUMeshSplitL1> > _ms;   ///< The array of single-dimension constituting meshes, stored in decreasing order (dimRelativeToMax=0,-1,-2, ...)
     MCAuto<DataArrayDouble> _coords;
-    MCAuto<DataArrayIdType> _fam_coords;     ///< Node family indices
+    MCAuto<DataArrayIdType> _fam_coords;              ///< Node family indices
     MCAuto<DataArrayIdType> _num_coords;
     MCAuto<DataArrayIdType> _global_num_coords;
     MCAuto<DataArrayAsciiChar> _name_coords;
@@ -530,6 +533,7 @@ namespace MEDCoupling
     MEDLOADER_EXPORT MEDFileCurveLinearMesh *shallowCpy() const;
     MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
     MEDLOADER_EXPORT int getMeshDimension() const;
+    MEDLOADER_EXPORT int getSpaceDimension() const;
     MEDLOADER_EXPORT std::string simpleRepr() const;
     MEDLOADER_EXPORT std::string advancedRepr() const;
     MEDLOADER_EXPORT void clearNonDiscrAttributes() const;