diff --git a/src/scheme/AcousticSolver.hpp b/src/scheme/AcousticSolver.hpp index 3a64ef24f64cbb6479605f0ed602507e529dcdd4..f63ac8498724f7c4037a8668b901234886fb7b54 100644 --- a/src/scheme/AcousticSolver.hpp +++ b/src/scheme/AcousticSolver.hpp @@ -25,7 +25,7 @@ class AcousticSolver typedef FiniteVolumesEulerUnknowns<MeshData> UnknownsType; // type des inconnues MeshData& m_mesh_data; //reference vers les donnees attachees du maillage - const MeshType& m_mesh; // reference vers le maillage + MeshType& m_mesh; // reference vers le maillage const typename MeshType::Connectivity& m_connectivity; // references vers la connectivite constexpr static size_t dimension = MeshType::dimension; // dimension du maillage (connue a la compilation) diff --git a/src/scheme/FiniteVolumesEulerUnknowns.hpp b/src/scheme/FiniteVolumesEulerUnknowns.hpp index 617cb8b39759dcf4ae4ff6f4a41f09a7bc056584..d1248d2e7535c4ed4910e160281e4be6483cc38b 100644 --- a/src/scheme/FiniteVolumesEulerUnknowns.hpp +++ b/src/scheme/FiniteVolumesEulerUnknowns.hpp @@ -25,6 +25,7 @@ private: Kokkos::View<double*> m_cj; Kokkos::View<double*> m_mj; Kokkos::View<double*> m_inv_mj; + Kokkos::View<double*> m_kj; public: Kokkos::View<double*> rhoj() @@ -117,6 +118,16 @@ public: return m_inv_mj; } + Kokkos::View<double*> kj() + { + return m_kj; + } + + const Kokkos::View<const double*> kj() const + { + return m_kj; + } + void initializeSod() { const Kokkos::View<const Rd*> xj = m_mesh_data.xj(); @@ -160,6 +171,10 @@ public: Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ m_inv_mj[j] = 1./m_mj[j]; }); + + Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ + m_kj[j] = 0.; // Par quoi initialiser k ? + }); } FiniteVolumesEulerUnknowns(const MeshDataType& mesh_data) @@ -173,7 +188,8 @@ public: m_gammaj("gammaj",m_mesh.numberOfCells()), m_cj("cj",m_mesh.numberOfCells()), m_mj("mj",m_mesh.numberOfCells()), - m_inv_mj("inv_mj",m_mesh.numberOfCells()) + m_inv_mj("inv_mj",m_mesh.numberOfCells()), + m_kj("kj",m_mesh.numberOfCells()) { ; }