diff --git a/src/main.cpp b/src/main.cpp index 185991619e0a0ad2be2651a3434a84c034854653..28d36d13b51cc292ec1e39543f968c902eb7c545 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -160,12 +160,12 @@ int main(int argc, char *argv[]) double c = 0.; c = finite_volumes_diffusion.conservatif(unknowns); - /* + // Ecriture des valeurs initiales dans un fichier const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> xr = mesh.xr(); - + /* // rho std::ofstream fout1("inter1", std::ios::trunc); fout1.precision(15); @@ -244,20 +244,20 @@ int main(int argc, char *argv[]) tempo.precision(5); tempo << std::fixed << t << '\n'; tempo.close(); - + */ // Fichier k indicateur std::ofstream diff("diffinter"); diff.precision(5); for (size_t j=0; j<mesh.numberOfCells(); ++j) { - //diff << std::fixed << xj[j][0] << ' ' << std::fixed << kj[j] << '\n'; - if (kj[j]>0.) { + diff << std::fixed << xj[j][0] << ' ' << std::fixed << kj[j] << '\n'; + /*if (kj[j]>0.) { diff << std::fixed << xj[j][0] << ' ' << std::fixed << 4. << '\n'; } else { diff << std::fixed << xj[j][0] << ' ' << std::fixed << -0.1 << '\n'; - } + }*/ } diff.close(); - */ + while((t<tmax) and (iteration<itermax)) { diff --git a/src/scheme/FiniteVolumesEulerUnknowns.hpp b/src/scheme/FiniteVolumesEulerUnknowns.hpp index ce20a99488818315962db956c15343c1f587785b..29445d094492403ef3600aa86fd835bff392e652 100644 --- a/src/scheme/FiniteVolumesEulerUnknowns.hpp +++ b/src/scheme/FiniteVolumesEulerUnknowns.hpp @@ -312,7 +312,7 @@ public: */ // 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] = 0.014*m_kj[j];