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[]) ...@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
// ETAPE 1 DU SPLITTING - EULER // 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) { if (t+dt_euler > tmax) {
dt_euler = tmax-t; dt_euler = tmax-t;
...@@ -273,7 +273,7 @@ int main(int argc, char *argv[]) ...@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
*/ */
// ENTROPY TEST // ENTROPY TEST
finite_volumes_diffusion.entropie(unknowns); //finite_volumes_diffusion.entropie(unknowns);
} }
...@@ -365,10 +365,11 @@ int main(int argc, char *argv[]) ...@@ -365,10 +365,11 @@ int main(int argc, char *argv[])
const Kokkos::View<const double*> rhoj = unknowns.rhoj(); const Kokkos::View<const double*> rhoj = unknowns.rhoj();
const Kokkos::View<const double*> pj = unknowns.pj(); const Kokkos::View<const double*> pj = unknowns.pj();
const Kokkos::View<const double*> gammaj = unknowns.gammaj(); const Kokkos::View<const double*> gammaj = unknowns.gammaj();
const Kokkos::View<const double*> S0 = unknowns.S0();
std::ofstream fout("S"); std::ofstream fout("S");
fout.precision(15); fout.precision(15);
for (size_t j=0; j<mesh.numberOfCells(); ++j) { 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: ...@@ -33,6 +33,7 @@ private:
Kokkos::View<double*> m_kR; Kokkos::View<double*> m_kR;
Kokkos::View<double*> m_entropy; Kokkos::View<double*> m_entropy;
Kokkos::View<double*> m_entropy_new; Kokkos::View<double*> m_entropy_new;
Kokkos::View<double*> m_S0;
public: public:
Kokkos::View<double*> rhoj() Kokkos::View<double*> rhoj()
...@@ -205,6 +206,16 @@ public: ...@@ -205,6 +206,16 @@ public:
return m_entropy_new; return m_entropy_new;
} }
Kokkos::View<double*> S0()
{
return m_S0;
}
const Kokkos::View<const double*> S0() const
{
return m_S0;
}
// --- Acoustic Solver --- // --- Acoustic Solver ---
void initializeSod() void initializeSod()
...@@ -285,6 +296,7 @@ public: ...@@ -285,6 +296,7 @@ public:
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ 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_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: ...@@ -371,8 +383,8 @@ public:
m_kL("kL", 1), m_kL("kL", 1),
m_kR("kR", 1), m_kR("kR", 1),
m_entropy("entropy", m_mesh.numberOfCells()), 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