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

execution en parallele ok

parent 6cf56d16
No related branches found
No related tags found
No related merge requests found
...@@ -161,10 +161,11 @@ int main(int argc, char *argv[]) ...@@ -161,10 +161,11 @@ int main(int argc, char *argv[])
dt=tmax-t; dt=tmax-t;
} }
std::cout << "t=" << t << " dt=" << dt << '\n'; //std::cout << "t=" << t << " dt=" << dt << '\n';
//acoustic_solver.computeNextStep(t,dt, unknowns); //acoustic_solver.computeNextStep(t,dt, unknowns);
finite_volumes_diffusion.computeNextStep(t, dt, unknowns); finite_volumes_diffusion.computeNextStep(t, dt, unknowns);
block_eos.updatePandCFromRhoE(); block_eos.updatePandCFromRhoE();
t += dt; t += dt;
......
...@@ -98,6 +98,10 @@ private: ...@@ -98,6 +98,10 @@ private:
} }
m_Vl[l] = sum_cjr_xj; m_Vl[l] = sum_cjr_xj;
}); });
//for (int l=0; l<m_mesh.numberOfFaces(); ++l) {
//std::cout << "Vj(" << l << ") = " << m_Vl(l) << std::endl;
//}
//std::exit(0);
} }
KOKKOS_INLINE_FUNCTION KOKKOS_INLINE_FUNCTION
......
...@@ -90,7 +90,7 @@ private: ...@@ -90,7 +90,7 @@ private:
const Kokkos::View<const double*>& Vl = m_mesh_data.Vl(); const Kokkos::View<const double*>& Vl = m_mesh_data.Vl();
Kokkos::parallel_for(m_mesh.numberOfFaces(), KOKKOS_LAMBDA(const int& l) { Kokkos::parallel_for(m_mesh.numberOfFaces(), KOKKOS_LAMBDA(const int& l) {
Rdd sum; Rdd sum = zero;
for (int j=0; j<face_nb_cells(l); ++j) { for (int j=0; j<face_nb_cells(l); ++j) {
int cell_here = face_cells(l,j); int cell_here = face_cells(l,j);
int local_face_number_in_cell = face_cell_local_face(l,j); int local_face_number_in_cell = face_cell_local_face(l,j);
...@@ -134,7 +134,6 @@ private: ...@@ -134,7 +134,6 @@ private:
}); });
return m_Gl ; return m_Gl ;
} }
...@@ -208,7 +207,7 @@ public: ...@@ -208,7 +207,7 @@ public:
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=1 => (kj(j+1) + 2*kj(j) + kj(j-1)) = 4
dt_j[j]= 0.5*rhoj(j)*Vj(j)*(2./4)*minVl; dt_j[j]= 0.5*rhoj(j)*Vj(j)*(2./4.)*minVl;
}); });
// for (int j=0; j<m_mesh.numberOfCells(); ++j) { // for (int j=0; j<m_mesh.numberOfCells(); ++j) {
...@@ -278,6 +277,7 @@ public: ...@@ -278,6 +277,7 @@ public:
const Kokkos::View<const double*> mj = unknowns.mj(); const Kokkos::View<const double*> mj = unknowns.mj();
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){ Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){
rhoj[j] = mj[j]/Vj[j]; rhoj[j] = mj[j]/Vj[j];
}); });
} }
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment