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

test pertinent ou non pour k regulier et tube de choc de Sod

parent a5659429
No related branches found
No related tags found
No related merge requests found
...@@ -160,12 +160,12 @@ int main(int argc, char *argv[]) ...@@ -160,12 +160,12 @@ int main(int argc, char *argv[])
double c = 0.; double c = 0.;
c = finite_volumes_diffusion.conservatif(unknowns); c = finite_volumes_diffusion.conservatif(unknowns);
/*
// Ecriture des valeurs initiales dans un fichier // Ecriture des valeurs initiales dans un fichier
const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> xj = mesh_data.xj();
const Kokkos::View<const Rd*> xr = mesh.xr(); const Kokkos::View<const Rd*> xr = mesh.xr();
/*
// rho // rho
std::ofstream fout1("inter1", std::ios::trunc); std::ofstream fout1("inter1", std::ios::trunc);
fout1.precision(15); fout1.precision(15);
...@@ -244,20 +244,20 @@ int main(int argc, char *argv[]) ...@@ -244,20 +244,20 @@ int main(int argc, char *argv[])
tempo.precision(5); tempo.precision(5);
tempo << std::fixed << t << '\n'; tempo << std::fixed << t << '\n';
tempo.close(); tempo.close();
*/
// Fichier k indicateur // Fichier k indicateur
std::ofstream diff("diffinter"); std::ofstream diff("diffinter");
diff.precision(5); diff.precision(5);
for (size_t j=0; j<mesh.numberOfCells(); ++j) { for (size_t j=0; j<mesh.numberOfCells(); ++j) {
//diff << std::fixed << xj[j][0] << ' ' << std::fixed << kj[j] << '\n'; diff << std::fixed << xj[j][0] << ' ' << std::fixed << kj[j] << '\n';
if (kj[j]>0.) { /*if (kj[j]>0.) {
diff << std::fixed << xj[j][0] << ' ' << std::fixed << 4. << '\n'; diff << std::fixed << xj[j][0] << ' ' << std::fixed << 4. << '\n';
} else { } else {
diff << std::fixed << xj[j][0] << ' ' << std::fixed << -0.1 << '\n'; diff << std::fixed << xj[j][0] << ' ' << std::fixed << -0.1 << '\n';
} }*/
} }
diff.close(); diff.close();
*/
while((t<tmax) and (iteration<itermax)) { while((t<tmax) and (iteration<itermax)) {
......
...@@ -312,7 +312,7 @@ public: ...@@ -312,7 +312,7 @@ public:
*/ */
// k regulier // k regulier
int n = 1.; int n = 10.;
m_kj[j] = std::exp(1.)*std::exp(-1./(1.-( (xj[j][0]-(0.7+0.1/n)) / (0.1/n) )*( (xj[j][0]-(0.7+0.1/n)) / (0.1/n) ))) * (xj[j][0]>0.7)*(xj[j][0]<0.7+0.1/n) + std::exp(1.)*std::exp(-1./(1.-( (xj[j][0]-(0.9-0.1/n)) / (0.1/n) )*( (xj[j][0]-(0.9-0.1/n)) / (0.1/n) ))) * (xj[j][0]>0.9-0.1/n)*(xj[j][0]<0.9) + (xj[j][0]>0.7+0.1/n)*(xj[j][0]<0.9-0.1/n); m_kj[j] = std::exp(1.)*std::exp(-1./(1.-( (xj[j][0]-(0.7+0.1/n)) / (0.1/n) )*( (xj[j][0]-(0.7+0.1/n)) / (0.1/n) ))) * (xj[j][0]>0.7)*(xj[j][0]<0.7+0.1/n) + std::exp(1.)*std::exp(-1./(1.-( (xj[j][0]-(0.9-0.1/n)) / (0.1/n) )*( (xj[j][0]-(0.9-0.1/n)) / (0.1/n) ))) * (xj[j][0]>0.9-0.1/n)*(xj[j][0]<0.9) + (xj[j][0]>0.7+0.1/n)*(xj[j][0]<0.9-0.1/n);
m_kj[j] = 0.014*m_kj[j]; m_kj[j] = 0.014*m_kj[j];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment