diff --git a/src/main.cpp b/src/main.cpp index 84adbade657f8f11bb5f7f658b21f1437eaca4c8..97bc4e94c2ef04d93b69ca28e79fb5dce2d45eb8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -141,8 +141,8 @@ int main(int argc, char *argv[]) const Kokkos::View<const double*> Vj = mesh_data.Vj(); const Kokkos::View<const Rd**> Cjr = mesh_data.Cjr(); - const double tmax=0.5; - double t=0; + const double tmax=2.; + double t=0.; int itermax=std::numeric_limits<int>::max(); int iteration=0; @@ -163,6 +163,7 @@ int main(int argc, char *argv[]) const Kokkos::View<const Rd*> xj = mesh_data.xj(); std::ofstream fout("inter"); fout.precision(15); + fout << std::fixed << 0. << ' ' << std::fixed << t << '\n'; for (size_t j=0; j<mesh.numberOfCells(); ++j) { fout << std::fixed << xj[j][0] << ' ' << std::fixed << rhoj[j] << '\n'; } @@ -223,6 +224,8 @@ int main(int argc, char *argv[]) //fout.clear(); //fout.seekp(0, std::ios::beg); std::string ligne; + getline(fint, ligne); + fout << ligne << ' ' << std::fixed << t << '\n'; for (size_t j = 0; j<mesh.numberOfCells(); ++j) { getline(fint, ligne); fout << ligne << ' ' << std::fixed << rhoj[j] << '\n'; @@ -233,8 +236,8 @@ int main(int argc, char *argv[]) std::ifstream rint("film_rho"); std::ofstream rout("inter", std::ios::trunc); fout.precision(15); - //fout.clear(); - //fout.seekp(0, std::ios::beg); + getline(rint, ligne); + rout << ligne << '\n'; for (size_t j = 0; j<mesh.numberOfCells(); ++j) { getline(rint, ligne); rout << ligne << '\n'; @@ -290,7 +293,7 @@ int main(int argc, char *argv[]) const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const double*> rhoj = unknowns.rhoj(); //double h = std::sqrt(1. - (tmax*tmax)/(50./9.)); - std::ofstream fout("rho1.5"); + std::ofstream fout("rho"); fout.precision(15); for (size_t j=0; j<mesh.numberOfCells(); ++j) { fout << xj[j][0] << ' ' << rhoj[j] << '\n'; diff --git a/src/mesh/Mesh.hpp b/src/mesh/Mesh.hpp index ef3176a0371c4a39d7f0fdecc936bace02a6222d..667f1877db466a9d581834099739504c9d78429b 100644 --- a/src/mesh/Mesh.hpp +++ b/src/mesh/Mesh.hpp @@ -80,8 +80,8 @@ public: m_x0("x0", 1), m_xmax("xmax", 1) { - double a = 0.1; - double b = 1.; + double a = 0.; + double b = 10.; m_x0[0][0] = a; m_xmax[0][0] = b; const double delta_x = (b-a)/connectivity.numberOfCells(); diff --git a/src/scheme/FiniteVolumesEulerUnknowns.hpp b/src/scheme/FiniteVolumesEulerUnknowns.hpp index 0d8a75c7cdd62d61d20e27931b2a8c7967811207..34e9e84a8d7169c808d877d28720c46263786f3a 100644 --- a/src/scheme/FiniteVolumesEulerUnknowns.hpp +++ b/src/scheme/FiniteVolumesEulerUnknowns.hpp @@ -241,7 +241,7 @@ public: if (xj[j][0]<0.7) { m_kj[j]=0.; } else { - if (xj[j][0]<0.85){ + if (xj[j][0]<0.9){ m_kj[j]=0.5; } else { m_kj[j]=0.; @@ -253,8 +253,8 @@ public: m_uL[0] = zero; m_uR[0] = zero; - m_kL[0] = 0.01; - m_kR[0] = 0.5; + m_kL[0] = 0.; + m_kR[0] = 0.; }