diff --git a/src/main.cpp b/src/main.cpp index 3392a599b9acd3976579f2da513f57c316f99e90..db5fd9824a15545333a0c96ac173e03754d5c719 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();