-// 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
class DataArrayInt;
class DataArrayDouble;
class MEDCouplingUMesh;
+ class MEDCouplingCMesh;
class MEDCouplingFieldDouble;
class MEDCouplingMappedExtrudedMesh : public MEDCouplingMesh
{
public:
MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId);
+ MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New(const MEDCouplingCMesh *mesh3D);
MEDCOUPLING_EXPORT static MEDCouplingMappedExtrudedMesh *New();
MEDCOUPLING_EXPORT MEDCouplingMeshType getType() const;
MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
MEDCOUPLING_EXPORT void getBoundingBox(double *bbox) const;
MEDCOUPLING_EXPORT void updateTime() const;
MEDCOUPLING_EXPORT void renumberCells(const int *old2NewBg, bool check=true);
- MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh2D() const { return _mesh2D; }
- MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh1D() const { return _mesh1D; }
- MEDCOUPLING_EXPORT DataArrayInt *getMesh3DIds() const { return _mesh3D_ids; }
+ MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh2D() const { return _mesh2D.iAmATrollConstCast(); }
+ MEDCOUPLING_EXPORT MEDCouplingUMesh *getMesh1D() const { return _mesh1D.iAmATrollConstCast(); }
+ MEDCOUPLING_EXPORT DataArrayInt *getMesh3DIds() const { return _mesh3D_ids.iAmATrollConstCast(); }
MEDCOUPLING_EXPORT MEDCouplingUMesh *build3DUnstructuredMesh() const;
MEDCOUPLING_EXPORT MEDCouplingUMesh *buildUnstructured() const;
MEDCOUPLING_EXPORT MEDCouplingFieldDouble *getMeasureField(bool) const;
const std::vector<std::string>& littleStrings);
MEDCOUPLING_EXPORT void reprQuickOverview(std::ostream& stream) const;
MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
+ MEDCOUPLING_EXPORT int get2DCellIdForExtrusion() const { return _cell_2D_id; }
private:
MEDCouplingMappedExtrudedMesh(const MEDCouplingUMesh *mesh3D, const MEDCouplingUMesh *mesh2D, int cell2DId);
+ MEDCouplingMappedExtrudedMesh(const MEDCouplingCMesh *mesh3D);
MEDCouplingMappedExtrudedMesh(const MEDCouplingMappedExtrudedMesh& other, bool deepCopy);
MEDCouplingMappedExtrudedMesh();
void computeExtrusion(const MEDCouplingUMesh *mesh3D);
void writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const;
std::string getVTKDataSetType() const;
private:
- MEDCouplingUMesh *_mesh2D;
- MEDCouplingUMesh *_mesh1D;
+ MCAuto<MEDCouplingUMesh> _mesh2D;
+ MCAuto<MEDCouplingUMesh> _mesh1D;
//! New to old 3D cell Ids Array
- DataArrayInt *_mesh3D_ids;
+ MCAuto<DataArrayInt> _mesh3D_ids;
int _cell_2D_id;
};
}