Skip to content
Snippets Groups Projects
Commit 052cbb7d authored by Fanny CHOPOT's avatar Fanny CHOPOT
Browse files

mise a jour

parent 80c28da0
No related branches found
No related tags found
No related merge requests found
......@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
// ETAPE 1 DU SPLITTING - EULER
double dt_euler = 0.1*acoustic_solver.acoustic_dt(Vj, cj);
double dt_euler = 0.4*acoustic_solver.acoustic_dt(Vj, cj);
if (t+dt_euler > tmax) {
dt_euler = tmax-t;
......@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
*/
// ENTROPY TEST
finite_volumes_diffusion.entropie(unknowns);
//finite_volumes_diffusion.entropie(unknowns);
}
......@@ -365,10 +365,11 @@ int main(int argc, char *argv[])
const Kokkos::View<const double*> rhoj = unknowns.rhoj();
const Kokkos::View<const double*> pj = unknowns.pj();
const Kokkos::View<const double*> gammaj = unknowns.gammaj();
const Kokkos::View<const double*> S0 = unknowns.S0();
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';
fout << xj[j][0] << ' ' << std::log(pj[j]*std::pow(rhoj[j],-gammaj[j])) << ' ' << S0(j) << '\n';
}
}
......
......@@ -33,6 +33,7 @@ private:
Kokkos::View<double*> m_kR;
Kokkos::View<double*> m_entropy;
Kokkos::View<double*> m_entropy_new;
Kokkos::View<double*> m_S0;
public:
Kokkos::View<double*> rhoj()
......@@ -205,6 +206,16 @@ public:
return m_entropy_new;
}
Kokkos::View<double*> S0()
{
return m_S0;
}
const Kokkos::View<const double*> S0() const
{
return m_S0;
}
// --- Acoustic Solver ---
void initializeSod()
......@@ -285,6 +296,7 @@ public:
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){
m_entropy(j) = std::log(m_pj[j]*std::pow(m_rhoj[j],-m_gammaj[j]));
m_S0(j) = m_entropy(j);
});
}
......@@ -371,8 +383,8 @@ public:
m_kL("kL", 1),
m_kR("kR", 1),
m_entropy("entropy", m_mesh.numberOfCells()),
m_entropy_new("entropy_new", m_mesh.numberOfCells())
m_entropy_new("entropy_new", m_mesh.numberOfCells()),
m_S0("S0", m_mesh.numberOfCells())
{
;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment