-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014 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
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
{
class MEDFileFieldGlobsReal;
class MEDFileField1TSStructItem;
-
+
class MEDFileMesh : public RefCountObject, public MEDFileWritable
{
public:
MEDLOADER_EXPORT virtual MEDFileMesh *shallowCpy() const = 0;
MEDLOADER_EXPORT virtual bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
MEDLOADER_EXPORT virtual void clearNonDiscrAttributes() const;
- MEDLOADER_EXPORT void setName(const std::string& name) { _name=name; }
+ MEDLOADER_EXPORT virtual void setName(const std::string& name);
MEDLOADER_EXPORT bool changeNames(const std::vector< std::pair<std::string,std::string> >& modifTab);
MEDLOADER_EXPORT std::string getName() const { return _name; }
MEDLOADER_EXPORT std::string getUnivName() const { return _univ_name; }
MEDLOADER_EXPORT double getTimeValue() const { return _time; }
MEDLOADER_EXPORT void setTimeUnit(const std::string& unit) { _dt_unit=unit; }
MEDLOADER_EXPORT std::string getTimeUnit() const { return _dt_unit; }
+ MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getAllGeoTypes() const;
MEDLOADER_EXPORT virtual int getNumberOfNodes() const = 0;
+ MEDLOADER_EXPORT virtual bool hasImplicitPart() const = 0;
+ MEDLOADER_EXPORT virtual int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const = 0;
+ MEDLOADER_EXPORT virtual void releaseImplicitPartIfAny() const = 0;
MEDLOADER_EXPORT virtual std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const = 0;
MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevels() const = 0;
MEDLOADER_EXPORT virtual std::vector<int> getNonEmptyLevelsExt() const = 0;
MEDLOADER_EXPORT MEDFileMesh *shallowCpy() const;
MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
+ MEDLOADER_EXPORT void setName(const std::string& name);
MEDLOADER_EXPORT ~MEDFileUMesh();
//
MEDLOADER_EXPORT int getMaxAbsFamilyIdInArrays() const;
MEDLOADER_EXPORT const DataArrayInt *getRevNumberFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT const DataArrayAsciiChar *getNameFieldAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT int getNumberOfNodes() const;
+ MEDLOADER_EXPORT bool hasImplicitPart() const;
+ MEDLOADER_EXPORT int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+ MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
MEDLOADER_EXPORT std::vector<int> getNonEmptyLevels() const;
MEDCouplingMesh *getGenMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
MEDLOADER_EXPORT int getSizeAtLevel(int meshDimRelToMaxExt) const;
MEDLOADER_EXPORT int getNumberOfNodes() const;
+ MEDLOADER_EXPORT bool hasImplicitPart() const;
+ MEDLOADER_EXPORT int buildImplicitPartIfAny(INTERP_KERNEL::NormalizedCellType gt) const;
+ MEDLOADER_EXPORT void releaseImplicitPartIfAny() const;
+ MEDLOADER_EXPORT MEDCoupling1SGTUMesh *getImplicitFaceMesh() const;
MEDLOADER_EXPORT std::vector<INTERP_KERNEL::NormalizedCellType> getGeoTypesAtLevel(int meshDimRelToMax) const;
MEDLOADER_EXPORT void whichAreNodesFetched(const MEDFileField1TSStructItem& st, const MEDFileFieldGlobsReal *globs, std::vector<bool>& nodesFetched) const;
+ MEDLOADER_EXPORT virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0;
// tools
MEDLOADER_EXPORT bool unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell);
protected:
void deepCpyAttributes();
void loadStrMeshFromFile(MEDFileStrMeshL2 *strm, med_idt fid, const std::string& mName, int dt, int it, MEDFileMeshReadSelector *mrs);
void writeStructuredLL(med_idt fid, const std::string& maa) const;
- virtual const MEDCouplingStructuredMesh *getStructuredMesh() const = 0;
+ void buildImplicitPart() const;
+ void buildMinusOneImplicitPartIfNeeded() const;
static med_geometry_type GetGeoTypeFromMeshDim(int meshDim);
+ private:
+ static void LoadStrMeshDAFromFile(med_idt fid, int meshDim, int dt, int it, const std::string& mName, MEDFileMeshReadSelector *mrs,
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt>& famCells, MEDCouplingAutoRefCountObjectPtr<DataArrayInt>& numCells, MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar>& namesCells);
private:
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _fam_nodes;
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _num_nodes;
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _fam_cells;
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _num_cells;
MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> _names_cells;
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _fam_faces;
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _num_faces;
+ MEDCouplingAutoRefCountObjectPtr<DataArrayAsciiChar> _names_faces;
mutable MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _rev_num_nodes;
mutable MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _rev_num_cells;
+ mutable MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> _faces_if_necessary;
};
class MEDFileCMesh : public MEDFileStructuredMesh
MEDLOADER_EXPORT MEDFileMesh *nextt();
private:
MEDCouplingAutoRefCountObjectPtr<MEDFileMeshes> _ms;
- int _iter_id;
- int _nb_iter;
+ int _iter_id;
+ int _nb_iter;
};
}