diff --git a/src/main.cpp b/src/main.cpp index b37ac81c4bd53001a1fef10747d60f52e44515a9..7454ef1c2ffa9a726f515f8c9c5fcc95384f632a 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 9f34d06e6ed8fb5be43b10b6927c6767c2898448..2c9701f067061d0fada3b6c259f9c62202981cf2 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();