From d5474e0125cb20adfaef4e6e1a1ad46032066e39 Mon Sep 17 00:00:00 2001 From: Fanny CHOPOT <fanny.chopot.ocre@cea.fr> Date: Wed, 23 May 2018 11:20:41 +0200 Subject: [PATCH] ajout autre CL pour uR, tentative de regler le probleme a droite --- src/main.cpp | 4 ++-- src/scheme/FiniteVolumesDiffusion.hpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index b37ac81c4..7454ef1c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -261,7 +261,7 @@ int main(int argc, char *argv[]) const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> uj = unknowns.uj(); double h = std::sqrt(1. - (0.2*0.2)/(50./9.)); - std::ofstream fout("rho"); + std::ofstream fout("rho1"); fout.precision(15); for (size_t j=0; j<mesh.numberOfCells(); ++j) { //fout << xj[j][0] << ' ' << rhoj[j] << '\n'; @@ -273,7 +273,7 @@ int main(int argc, char *argv[]) const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> uj = unknowns.uj(); //double pi = 4.*std::atan(1.); - std::ofstream fout("u"); + std::ofstream fout("u1"); fout.precision(15); for (size_t j=0; j<mesh.numberOfCells(); ++j) { //fout << xj[j][0] << ' ' << uj[j][0] << ' ' << std::sin(pi*xj[j][0])*std::exp(-2.*pi*pi*0.2) <<'\n'; //cas k constant diff --git a/src/scheme/FiniteVolumesDiffusion.hpp b/src/scheme/FiniteVolumesDiffusion.hpp index 9f34d06e6..2c9701f06 100644 --- a/src/scheme/FiniteVolumesDiffusion.hpp +++ b/src/scheme/FiniteVolumesDiffusion.hpp @@ -280,9 +280,13 @@ public: Kokkos::View<const Rd*> xr = m_mesh.xr(); - uR[0] = (-t/((50./9.)-t*t))*xr[m_mesh.numberOfNodes()-1]; + //uR[0] = (-t/((50./9.)-t*t))*xr[m_mesh.numberOfNodes()-1]; + const Kokkos::View<const Rd*> xj = m_mesh_data.xj(); + + uR[0] = (-t/((50./9.)-t*t))*xj[m_mesh.numberOfCells()-1]; + const Kokkos::View<const double*> Vj = m_mesh_data.Vj(); const Kokkos::View<const Rd**> Cjr = m_mesh_data.Cjr(); -- GitLab