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

Correction solution exacte et condition initiale de E

parent 44e7d147
No related branches found
No related tags found
No related merge requests found
......@@ -216,7 +216,7 @@ int main(int argc, char *argv[])
double pi = 4.*std::atan(1.);
std::ofstream fout("comparaison E");
for (size_t j=0; j<mesh.numberOfCells(); ++j) {
fout << xj[j][0] << ' ' << Ej[j] << ' ' << (-(std::cos(pi*xj[j][0]))*(std::cos(pi*xj[j][0]))+(std::sin(pi*xj[j][0])*std::sin(pi*xj[j][0])))*(pi*0.5)*std::exp(-4.*pi*0.2) <<'\n';
fout << xj[j][0] << ' ' << Ej[j] << ' ' << (-(std::cos(pi*xj[j][0])*std::cos(pi*xj[j][0]))+(std::sin(pi*xj[j][0])*std::sin(pi*xj[j][0])))*(pi*0.5)*(std::exp(-4.*pi*0.2)-1.) + 2. <<'\n'; // cas k constant
}
}
......
......@@ -227,7 +227,6 @@ void initializeSod()
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){
//m_Ej[j] = m_ej[j]+0.5*(m_uj[j],m_uj[j]);
//m_Ej[j] = (std::cos(pi*xj[j][0]))*(std::cos(pi*xj[j][0]))*std::sin(pi*xj[j][0])*((pi*pi*pi)*0.5);
m_Ej[j] = 2.;
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment