-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016 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
MEDLOADER_EXPORT static const char DFT_FAM_NAME[];
};
+ class MEDCouplingMappedExtrudedMesh;
+
class MEDFileUMesh : public MEDFileMesh
{
friend class MEDFileMesh;
public:
MEDLOADER_EXPORT static MEDFileUMesh *New(const std::string& fileName, const std::string& mName, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
MEDLOADER_EXPORT static MEDFileUMesh *New(const std::string& fileName, MEDFileMeshReadSelector *mrs=0);
+ MEDLOADER_EXPORT static MEDFileUMesh *New(const MEDCouplingMappedExtrudedMesh *mem);
MEDLOADER_EXPORT static MEDFileUMesh *New();
MEDLOADER_EXPORT static MEDFileUMesh *LoadPartOf(const std::string& fileName, const std::string& mName, const std::vector<INTERP_KERNEL::NormalizedCellType>& types, const std::vector<int>& 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<int>& slicPerTyp, int dt=-1, int it=-1, MEDFileMeshReadSelector *mrs=0);
+ 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;
MEDLOADER_EXPORT MEDFileMesh *createNewEmpty() const;
- MEDLOADER_EXPORT MEDFileMesh *deepCopy() const;
- MEDLOADER_EXPORT MEDFileMesh *shallowCpy() const;
+ MEDLOADER_EXPORT MEDFileUMesh *deepCopy() const;
+ MEDLOADER_EXPORT MEDFileUMesh *shallowCpy() const;
MEDLOADER_EXPORT bool isEqual(const MEDFileMesh *other, double eps, std::string& what) const;
+ MEDLOADER_EXPORT void checkConsistency() const;
+ MEDLOADER_EXPORT void checkSMESHConsistency() const;
+ MEDLOADER_EXPORT void clearNodeAndCellNumbers();
MEDLOADER_EXPORT void clearNonDiscrAttributes() const;
MEDLOADER_EXPORT void setName(const std::string& name);
//
MEDLOADER_EXPORT DataArrayInt *getFamiliesArr(int meshDimRelToMaxExt, const std::vector<std::string>& fams, bool renum=false) const;
MEDLOADER_EXPORT MEDCouplingUMesh *getMeshAtLevel(int meshDimRelToMax, bool renum=false) const;
MEDLOADER_EXPORT std::vector<int> getDistributionOfTypes(int meshDimRelToMax) const;
+ MEDLOADER_EXPORT std::vector< std::pair<int,int> > getAllDistributionOfTypes() const;
MEDLOADER_EXPORT MEDCouplingUMesh *getLevel0Mesh(bool renum=false) const;
MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM1Mesh(bool renum=false) const;
MEDLOADER_EXPORT MEDCouplingUMesh *getLevelM2Mesh(bool renum=false) const;
//
MEDLOADER_EXPORT void setFamilyNameAttachedOnId(int id, const std::string& newFamName);
MEDLOADER_EXPORT void setCoords(DataArrayDouble *coords);
+ MEDLOADER_EXPORT void setCoordsForced(DataArrayDouble *coords);
MEDLOADER_EXPORT void eraseGroupsAtLevel(int meshDimRelToMaxExt);
MEDLOADER_EXPORT void setFamilyFieldArr(int meshDimRelToMaxExt, DataArrayInt *famArr);
MEDLOADER_EXPORT void setRenumFieldArr(int meshDimRelToMaxExt, DataArrayInt *renumArr);
MEDLOADER_EXPORT void buildInnerBoundaryAlongM1Group(const std::string& grpNameM1, DataArrayInt *&nodesDuplicated, DataArrayInt *&cellsModified, DataArrayInt *&cellsNotModified);
MEDLOADER_EXPORT bool unPolyze(std::vector<int>& oldCode, std::vector<int>& newCode, DataArrayInt *& o2nRenumCell);
MEDLOADER_EXPORT DataArrayInt *zipCoords();
+ MEDLOADER_EXPORT DataArrayInt *deduceNodeSubPartFromCellSubPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef) const;
+ MEDLOADER_EXPORT MEDFileUMesh *extractPart(const std::map<int, MCAuto<DataArrayInt> >& extractDef) const;
MEDLOADER_EXPORT MEDFileUMesh *buildExtrudedMesh(const MEDCouplingUMesh *m1D, int policy) const;
MEDLOADER_EXPORT MEDFileUMesh *linearToQuadratic(int conversionType=0, double eps=1e-12) const;
MEDLOADER_EXPORT MEDFileUMesh *quadraticToLinear(double eps=1e-12) const;
+ MEDLOADER_EXPORT MCAuto<MEDFileUMesh> symmetry3DPlane(const double point[3], const double normalVector[3]) const;
+ MEDLOADER_EXPORT static MCAuto<MEDFileUMesh> Aggregate(const std::vector<const MEDFileUMesh *>& meshes);
+ MEDLOADER_EXPORT MEDCouplingMappedExtrudedMesh *convertToExtrudedMesh() const;
// serialization
MEDLOADER_EXPORT void serialize(std::vector<double>& tinyDouble, std::vector<int>& tinyInt, std::vector<std::string>& tinyStr,
std::vector< MCAuto<DataArrayInt> >& bigArraysI, MCAuto<DataArrayDouble>& bigArrayD);
void changeFamilyIdArr(int oldId, int newId);
std::list< MCAuto<DataArrayInt> > getAllNonNullFamilyIds() const;
MCAuto<MEDFileUMeshSplitL1>& checkAndGiveEntryInSplitL1(int meshDimRelToMax, MEDCouplingPointSet *m);
+ private:
+ static const char SPE_FAM_STR_EXTRUDED_MESH[];
private:
std::vector< MCAuto<MEDFileUMeshSplitL1> > _ms;
MCAuto<DataArrayDouble> _coords;
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
MEDLOADER_EXPORT MEDFileMesh *createNewEmpty() const;
- MEDLOADER_EXPORT MEDFileMesh *deepCopy() const;
- MEDLOADER_EXPORT MEDFileMesh *shallowCpy() const;
+ MEDLOADER_EXPORT MEDFileCMesh *deepCopy() const;
+ MEDLOADER_EXPORT MEDFileCMesh *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::size_t getHeapMemorySizeWithoutChildren() const;
MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
MEDLOADER_EXPORT MEDFileMesh *createNewEmpty() const;
- MEDLOADER_EXPORT MEDFileMesh *deepCopy() const;
- MEDLOADER_EXPORT MEDFileMesh *shallowCpy() const;
+ MEDLOADER_EXPORT MEDFileCurveLinearMesh *deepCopy() const;
+ 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 std::string simpleRepr() const;