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

test xr avec pas non constant, OK

parent 3e5d06ea
No related branches found
No related tags found
No related merge requests found
...@@ -48,6 +48,8 @@ public: ...@@ -48,6 +48,8 @@ public:
return m_xr; return m_xr;
} }
// pas constant
Mesh(const Connectivity& connectivity) Mesh(const Connectivity& connectivity)
: m_connectivity(connectivity), : m_connectivity(connectivity),
m_xr("xr", connectivity.numberOfNodes()) m_xr("xr", connectivity.numberOfNodes())
...@@ -58,6 +60,23 @@ public: ...@@ -58,6 +60,23 @@ public:
}); });
} }
// pas non constant
//Mesh(const Connectivity& connectivity)
// : m_connectivity(connectivity),
// m_xr("xr", connectivity.numberOfNodes())
//{
// const double delta_x = 1./connectivity.numberOfCells();
// Kokkos::parallel_for(connectivity.numberOfNodes(), KOKKOS_LAMBDA(const int& r){
// if (r%2 == 0) {
// m_xr[r][0] = r*delta_x;
// }
// else {
// m_xr[r][0] = (r*2+1)*0.5*delta_x;
// }
// });
//}
~Mesh() ~Mesh()
{ {
; ;
......
...@@ -206,8 +206,8 @@ public: ...@@ -206,8 +206,8 @@ public:
for (int ll=0; ll<cell_nb_faces(j); ++ll) { for (int ll=0; ll<cell_nb_faces(j); ++ll) {
minVl = std::min(minVl, Vl(cell_faces(j, ll))); minVl = std::min(minVl, Vl(cell_faces(j, ll)));
} }
// k=1 => (kj(j+1) + 2*kj(j) + kj(j-1)) = 4 // k=2 => (kj(j+1) + 2*kj(j) + kj(j-1)) = 8
dt_j[j]= 0.5*rhoj(j)*Vj(j)*(2./4.)*minVl; dt_j[j]= 0.5*rhoj(j)*Vj(j)*(2./8.)*minVl;
}); });
// for (int j=0; j<m_mesh.numberOfCells(); ++j) { // for (int j=0; j<m_mesh.numberOfCells(); ++j) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment