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

prise en compte du mouvement du maillage dans les animations

parent 1ae6914d
Branches
Tags
No related merge requests found
...@@ -141,7 +141,7 @@ int main(int argc, char *argv[]) ...@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
const Kokkos::View<const double*> Vj = mesh_data.Vj(); const Kokkos::View<const double*> Vj = mesh_data.Vj();
const Kokkos::View<const Rd**> Cjr = mesh_data.Cjr(); const Kokkos::View<const Rd**> Cjr = mesh_data.Cjr();
const double tmax=0.5; const double tmax=0.2;
double t=0.; double t=0.;
int itermax=std::numeric_limits<int>::max(); int itermax=std::numeric_limits<int>::max();
...@@ -153,7 +153,7 @@ int main(int argc, char *argv[]) ...@@ -153,7 +153,7 @@ int main(int argc, char *argv[])
Kokkos::View<double*> gammaj = unknowns.gammaj(); Kokkos::View<double*> gammaj = unknowns.gammaj();
Kokkos::View<double*> cj = unknowns.cj(); Kokkos::View<double*> cj = unknowns.cj();
Kokkos::View<double*> kj = unknowns.kj(); Kokkos::View<double*> kj = unknowns.kj();
Kokkos::View<Rd*> uj = unknowns.uj();
BlockPerfectGas block_eos(rhoj, ej, pj, gammaj, cj); BlockPerfectGas block_eos(rhoj, ej, pj, gammaj, cj);
double c = 0.; double c = 0.;
...@@ -188,7 +188,7 @@ int main(int argc, char *argv[]) ...@@ -188,7 +188,7 @@ int main(int argc, char *argv[])
t += dt_euler; t += dt_euler;
// ETAPE 2 DU SPLITTING - DIFFUSION // ETAPE 2 DU SPLITTING - DIFFUSION
/*
double dt_diff = 0.4*finite_volumes_diffusion.diffusion_dt(rhoj, kj, cj); double dt_diff = 0.4*finite_volumes_diffusion.diffusion_dt(rhoj, kj, cj);
if (dt_euler <= dt_diff) { if (dt_euler <= dt_diff) {
...@@ -205,7 +205,7 @@ int main(int argc, char *argv[]) ...@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
t_diff += dt_diff; t_diff += dt_diff;
} }
} }
*/
// DIFFUSION PURE // DIFFUSION PURE
/* /*
...@@ -234,7 +234,7 @@ int main(int argc, char *argv[]) ...@@ -234,7 +234,7 @@ int main(int argc, char *argv[])
//fout << ligne << ' ' << std::fixed << t << '\n'; //fout << ligne << ' ' << std::fixed << t << '\n';
for (size_t j = 0; j<mesh.numberOfCells(); ++j) { for (size_t j = 0; j<mesh.numberOfCells(); ++j) {
getline(fint, ligne); getline(fint, ligne);
fout << ligne << ' ' << std::fixed << rhoj[j] << '\n'; fout << ligne << ' ' << std::fixed << xj[j][0] << ' ' << std::fixed << rhoj[j] << '\n';
} }
fint.close(); fint.close();
fout.close(); fout.close();
......
...@@ -192,7 +192,7 @@ public: ...@@ -192,7 +192,7 @@ public:
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){
if (xj[j][0]<0.5) { if (xj[j][0]<0.5) {
m_rhoj[j]=1; m_rhoj[j]=1.;
} else { } else {
m_rhoj[j]=0.125; m_rhoj[j]=0.125;
} }
...@@ -242,7 +242,7 @@ public: ...@@ -242,7 +242,7 @@ public:
m_kj[j]=0.; m_kj[j]=0.;
} else { } else {
if (xj[j][0]<0.9){ if (xj[j][0]<0.9){
m_kj[j]=0.5; m_kj[j]=0.;
} else { } else {
m_kj[j]=0. ; m_kj[j]=0. ;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment