From 1aabf3d3870cefe8ea9665785f4b49904d20dc02 Mon Sep 17 00:00:00 2001 From: Fanny CHOPOT <fanny.chopot.ocre@cea.fr> Date: Tue, 22 May 2018 10:14:36 +0200 Subject: [PATCH] ajout gnuplot entropie S pour gaz parfait --- src/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 3392a599b..db5fd9824 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -293,6 +293,18 @@ int main(int argc, char *argv[]) } } + { // gnuplot output for entropy (gaz parfait en prenant cv = 1)) + const Kokkos::View<const Rd*> xj = mesh_data.xj(); + const Kokkos::View<const double*> rhoj = unknowns.rhoj(); + const Kokkos::View<const double*> pj = unknowns.pj(); + const Kokkos::View<const double*> gammaj = unknowns.gammaj(); + std::ofstream fout("S"); + fout.precision(15); + for (size_t j=0; j<mesh.numberOfCells(); ++j) { + fout << xj[j][0] << ' ' << std::log(pj[j]*std::pow(rhoj[j],-gammaj[j])) << '\n'; + } + } + } Kokkos::finalize(); -- GitLab