-// Copyright (C) 2007-2014 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
#include "MEDLoaderDefines.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
#include "MEDCouplingRefCountObject.hxx"
#include "MEDCoupling1GTUMesh.hxx"
#include <vector>
-namespace ParaMEDMEM
+namespace MEDCoupling
{
class DataArrayInt;
class MEDCouplingMesh;
public:
MEDLOADER_EXPORT static MEDFileMeshStruct *New(const MEDFileMesh *mesh);
std::size_t getHeapMemorySizeWithoutChildren() const;
- std::vector<const BigMemoryObject *> getDirectChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
const MEDFileMesh *getTheMesh() const { return _mesh; }
int getNumberOfNodes() const { return _nb_nodes; }
bool doesManageGeoType(INTERP_KERNEL::NormalizedCellType t) const;
{
public:
std::size_t getHeapMemorySizeWithoutChildren() const;
- std::vector<const BigMemoryObject *> getDirectChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
public:
static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<int>& levs);
MEDLOADER_EXPORT void retrieveNumberIdsOnCells(DataArrayInt *& numIds, bool& isWithoutCopy) const;
MEDLOADER_EXPORT void retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isWithoutCopy) const;
MEDLOADER_EXPORT void retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isWithoutCopy) const;
+ MEDLOADER_EXPORT DataArrayInt *retrieveGlobalNodeIdsIfAny() const;
MEDLOADER_EXPORT std::vector< INTERP_KERNEL::NormalizedCellType > getGeoTypes() const;
- void setFamilyIdsOnCells(DataArrayInt *famIds, bool isNoCopy);
- void setNumberIdsOnCells(DataArrayInt *numIds, bool isNoCopy);
- void setFamilyIdsOnNodes(DataArrayInt *famIds, bool isNoCopy);
- void setNumberIdsOnNodes(DataArrayInt *numIds, bool isNoCopy);
+ void setFamilyIdsOnCells(DataArrayInt *famIds);
+ void setNumberIdsOnCells(DataArrayInt *numIds);
+ void setFamilyIdsOnNodes(DataArrayInt *famIds);
+ void setNumberIdsOnNodes(DataArrayInt *numIds);
virtual void selectPartOfNodes(const DataArrayInt *pflNodes) = 0;
virtual MEDMeshMultiLev *prepare() const = 0;
int getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const;
MEDMeshMultiLev(const MEDFileMesh *mesh, int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
protected:
const MEDFileMesh *_mesh;
- std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > _pfls;
+ std::vector< MCAuto<DataArrayInt> > _pfls;
std::vector< INTERP_KERNEL::NormalizedCellType > _geo_types;
std::vector<int> _nb_entities;
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _node_reduction;
+ MCAuto<DataArrayInt> _node_reduction;
int _nb_nodes;
//
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _cell_fam_ids;
- bool _cell_fam_ids_nocpy;
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _cell_num_ids;
- bool _cell_num_ids_nocpy;
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _node_fam_ids;
- bool _node_fam_ids_nocpy;
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _node_num_ids;
- bool _node_num_ids_nocpy;
+ MCAuto<DataArrayInt> _cell_fam_ids;
+ MCAuto<DataArrayInt> _cell_num_ids;
+ MCAuto<DataArrayInt> _node_fam_ids;
+ MCAuto<DataArrayInt> _node_num_ids;
public:
MEDLOADER_EXPORT static const int PARAMEDMEM_2_VTKTYPE_LGTH=34;
MEDLOADER_EXPORT static const unsigned char PARAMEDMEM_2_VTKTYPE[PARAMEDMEM_2_VTKTYPE_LGTH];
static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
void selectPartOfNodes(const DataArrayInt *pflNodes);
MEDMeshMultiLev *prepare() const;
- MEDUMeshMultiLev(const MEDStructuredMeshMultiLev& other, const MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh>& part);
+ MEDUMeshMultiLev(const MEDStructuredMeshMultiLev& other, const MCAuto<MEDCoupling1GTUMesh>& part);
MEDLOADER_EXPORT bool buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *&types, DataArrayInt *&cellLocations, DataArrayInt *& cells, DataArrayInt *&faceLocations, DataArrayInt *&faces) const;
protected:
void appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr);
private:
- void reorderNodesIfNecessary(MEDCouplingAutoRefCountObjectPtr<DataArrayDouble>& coords, DataArrayInt *nodalConnVTK, DataArrayInt *polyhedNodalConnVTK) const;
+ void reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords, DataArrayInt *nodalConnVTK, DataArrayInt *polyhedNodalConnVTK) const;
private:
MEDUMeshMultiLev(const MEDUMeshMultiLev& other);
MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>& levs);
MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
private:
- std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> > _parts;
+ std::vector< MCAuto<MEDCoupling1GTUMesh> > _parts;
//! this attribute is used only for mesh with no cells but having coordinates. For classical umeshes those pointer is equal to pointer of coordinates of instances in this->_parts.
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> _coords;
+ MCAuto<DataArrayDouble> _coords;
};
class MEDStructuredMeshMultiLev : public MEDMeshMultiLev
void initStdFieldOfIntegers(const MEDFileStructuredMesh *m);
protected:
bool _is_internal;
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _face_fam_ids;
- bool _face_fam_ids_nocpy;
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _face_num_ids;
- bool _face_num_ids_nocpy;
+ MCAuto<DataArrayInt> _face_fam_ids;
+ MCAuto<DataArrayInt> _face_num_ids;
};
class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<int>& levs);
MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
private:
- std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > _coords;
+ std::vector< MCAuto<DataArrayDouble> > _coords;
};
class MEDCurveLinearMeshMultiLev : public MEDStructuredMeshMultiLev
MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<int>& levs);
MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
private:
- MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> _coords;
+ MCAuto<DataArrayDouble> _coords;
std::vector<int> _structure;
};
void checkWithMeshStructForGaussPT(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
//
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
+ MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
//
const DataArrayInt *getPfl(const MEDFileFieldGlobsReal *globs) const;
INTERP_KERNEL::NormalizedCellType getGeo() const { return _geo_type; }
private:
INTERP_KERNEL::NormalizedCellType _geo_type;
std::pair<int,int> _start_end;
- MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _pfl;
+ MCAuto<DataArrayInt> _pfl;
std::string _loc;
int _nb_of_entity;
};
class MEDFileField1TSStructItem : public BigMemoryObject
{
public:
- MEDFileField1TSStructItem() { }
+ MEDFileField1TSStructItem():_computed(false),_type(ON_CELLS) { }
MEDFileField1TSStructItem(TypeOfField a, const std::vector< MEDFileField1TSStructItem2 >& b);
void checkWithMeshStruct(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
bool operator==(const MEDFileField1TSStructItem& other) const;
MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
+ MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
bool isEntityCell() const;
bool isComputed() const { return _computed; }
TypeOfField getType() const { return _type; }
static MEDFileField1TSStruct *New(const MEDFileAnyTypeField1TS *ref, MEDFileMeshStruct *mst);
void checkWithMeshStruct(MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
std::size_t getHeapMemorySizeWithoutChildren() const;
- std::vector<const BigMemoryObject *> getDirectChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
bool isEqualConsideringThePast(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *mst) const;
bool isSupportSameAs(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt);
bool isCompatibleWithNodesDiscr(const MEDFileAnyTypeField1TS *other, const MEDFileMeshStruct *meshSt);
bool isEqual(const MEDFileAnyTypeFieldMultiTS *other);
bool isCompatibleWithNodesDiscr(const MEDFileAnyTypeFieldMultiTS *other);
std::size_t getHeapMemorySizeWithoutChildren() const;
- std::vector<const BigMemoryObject *> getDirectChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
private:
MEDFileFastCellSupportComparator(const MEDFileMeshStruct *m, const MEDFileAnyTypeFieldMultiTS *ref);
private:
- MEDCouplingAutoRefCountObjectPtr<MEDFileMeshStruct> _mesh_comp;
- std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileField1TSStruct> > _f1ts_cmps;
+ MCAuto<MEDFileMeshStruct> _mesh_comp;
+ std::vector< MCAuto<MEDFileField1TSStruct> > _f1ts_cmps;
};
}