Skip to content
Snippets Groups Projects
Commit 82ccbfe3 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fixes time step in dimension greater than 1

parent 4f57cfc7
No related branches found
No related tags found
No related merge requests found
......@@ -308,8 +308,16 @@ public:
KOKKOS_INLINE_FUNCTION
double acoustic_dt(const Kokkos::View<const double*>& Vj,
const Kokkos::View<const double*>& cj) const {
const Kokkos::View<const double**> ljr = m_mesh_data.ljr();
const Kokkos::View<const unsigned short*>& cell_nb_nodes
= m_connectivity.cellNbNodes();
Kokkos::parallel_for(m_mesh.numberOfCells(), KOKKOS_LAMBDA(const int& j){
m_Vj_over_cj[j] = Vj[j]/cj[j];
double S = 0;
for (int r=0; r<cell_nb_nodes(j); ++r) {
S += ljr(j,r);
}
m_Vj_over_cj[j] = 2*Vj[j]/(S*cj[j]);
});
double dt = std::numeric_limits<double>::max();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment