From 94b670e0673936f04fd2d3ab560cc8b143ab142c Mon Sep 17 00:00:00 2001 From: Fanny CHOPOT <fanny.chopot.ocre@cea.fr> Date: Mon, 23 Apr 2018 14:24:58 +0200 Subject: [PATCH] Modifs des fichiers maillages par Stephane --- src/mesh/Mesh.hpp | 7 ++++++- src/mesh/MeshData.hpp | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/mesh/Mesh.hpp b/src/mesh/Mesh.hpp index cf199a9d5..04f018e34 100644 --- a/src/mesh/Mesh.hpp +++ b/src/mesh/Mesh.hpp @@ -38,7 +38,12 @@ public: return m_connectivity.numberOfCells(); } - Kokkos::View<Rd*> xr() const + Kokkos::View<Rd*> xr() + { + return m_xr; + } + + const Kokkos::View<const Rd*> xr() const { return m_xr; } diff --git a/src/mesh/MeshData.hpp b/src/mesh/MeshData.hpp index bed5cf97e..36bfe2852 100644 --- a/src/mesh/MeshData.hpp +++ b/src/mesh/MeshData.hpp @@ -18,7 +18,7 @@ public: static constexpr double inv_dimension = 1./dimension; private: - const MeshType& m_mesh; + MeshType& m_mesh; Kokkos::View<Rd**> m_Cjr; Kokkos::View<Rd*> m_xj; Kokkos::View<double*> m_Vj; @@ -80,6 +80,11 @@ private: } public: + MeshType& mesh() + { + return m_mesh; + } + const MeshType& mesh() const { return m_mesh; @@ -107,7 +112,7 @@ public: this->_updateCjr(); } - MeshData(const MeshType& mesh) + MeshData(MeshType& mesh) : m_mesh(mesh), m_Cjr("Cjr", mesh.numberOfCells(), mesh.connectivity().maxNbNodePerCell()), m_xj("xj", mesh.numberOfCells()), -- GitLab