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

ajout pas de temps dans fichier sortie

parent b5d91adb
No related branches found
No related tags found
No related merge requests found
...@@ -141,8 +141,8 @@ int main(int argc, char *argv[]) ...@@ -141,8 +141,8 @@ 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=2.;
double t=0; double t=0.;
int itermax=std::numeric_limits<int>::max(); int itermax=std::numeric_limits<int>::max();
int iteration=0; int iteration=0;
...@@ -163,6 +163,7 @@ int main(int argc, char *argv[]) ...@@ -163,6 +163,7 @@ int main(int argc, char *argv[])
const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> xj = mesh_data.xj();
std::ofstream fout("inter"); std::ofstream fout("inter");
fout.precision(15); fout.precision(15);
fout << std::fixed << 0. << ' ' << std::fixed << t << '\n';
for (size_t j=0; j<mesh.numberOfCells(); ++j) { for (size_t j=0; j<mesh.numberOfCells(); ++j) {
fout << std::fixed << xj[j][0] << ' ' << std::fixed << rhoj[j] << '\n'; fout << std::fixed << xj[j][0] << ' ' << std::fixed << rhoj[j] << '\n';
} }
...@@ -223,6 +224,8 @@ int main(int argc, char *argv[]) ...@@ -223,6 +224,8 @@ int main(int argc, char *argv[])
//fout.clear(); //fout.clear();
//fout.seekp(0, std::ios::beg); //fout.seekp(0, std::ios::beg);
std::string ligne; std::string ligne;
getline(fint, ligne);
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 << rhoj[j] << '\n';
...@@ -233,8 +236,8 @@ int main(int argc, char *argv[]) ...@@ -233,8 +236,8 @@ int main(int argc, char *argv[])
std::ifstream rint("film_rho"); std::ifstream rint("film_rho");
std::ofstream rout("inter", std::ios::trunc); std::ofstream rout("inter", std::ios::trunc);
fout.precision(15); fout.precision(15);
//fout.clear(); getline(rint, ligne);
//fout.seekp(0, std::ios::beg); rout << ligne << '\n';
for (size_t j = 0; j<mesh.numberOfCells(); ++j) { for (size_t j = 0; j<mesh.numberOfCells(); ++j) {
getline(rint, ligne); getline(rint, ligne);
rout << ligne << '\n'; rout << ligne << '\n';
...@@ -290,7 +293,7 @@ int main(int argc, char *argv[]) ...@@ -290,7 +293,7 @@ int main(int argc, char *argv[])
const Kokkos::View<const Rd*> xj = mesh_data.xj(); const Kokkos::View<const Rd*> xj = mesh_data.xj();
const Kokkos::View<const double*> rhoj = unknowns.rhoj(); const Kokkos::View<const double*> rhoj = unknowns.rhoj();
//double h = std::sqrt(1. - (tmax*tmax)/(50./9.)); //double h = std::sqrt(1. - (tmax*tmax)/(50./9.));
std::ofstream fout("rho1.5"); std::ofstream fout("rho");
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] << ' ' << rhoj[j] << '\n'; fout << xj[j][0] << ' ' << rhoj[j] << '\n';
......
...@@ -80,8 +80,8 @@ public: ...@@ -80,8 +80,8 @@ public:
m_x0("x0", 1), m_x0("x0", 1),
m_xmax("xmax", 1) m_xmax("xmax", 1)
{ {
double a = 0.1; double a = 0.;
double b = 1.; double b = 10.;
m_x0[0][0] = a; m_x0[0][0] = a;
m_xmax[0][0] = b; m_xmax[0][0] = b;
const double delta_x = (b-a)/connectivity.numberOfCells(); const double delta_x = (b-a)/connectivity.numberOfCells();
......
...@@ -241,7 +241,7 @@ public: ...@@ -241,7 +241,7 @@ public:
if (xj[j][0]<0.7) { if (xj[j][0]<0.7) {
m_kj[j]=0.; m_kj[j]=0.;
} else { } else {
if (xj[j][0]<0.85){ if (xj[j][0]<0.9){
m_kj[j]=0.5; m_kj[j]=0.5;
} else { } else {
m_kj[j]=0.; m_kj[j]=0.;
...@@ -253,8 +253,8 @@ public: ...@@ -253,8 +253,8 @@ public:
m_uL[0] = zero; m_uL[0] = zero;
m_uR[0] = zero; m_uR[0] = zero;
m_kL[0] = 0.01; m_kL[0] = 0.;
m_kR[0] = 0.5; m_kR[0] = 0.;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment