Skip to content

Commit

Permalink
Fix invalid read on GPU. (Exawind#1296)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrood-nrel authored Sep 11, 2024
1 parent 292d5b2 commit 252a57e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/edge_kernels/VOFAdvectionEdgeAlg.C
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ VOFAdvectionEdgeAlg::execute()
const auto massVofBalancedFlowRate =
fieldMgr.get_field<double>(massVofBalancedFlowRate_);
const auto density = fieldMgr.get_field<double>(density_);
const auto density_liquid = density_liquid_;
const auto density_gas = density_gas_;

run_algorithm(
realm_.bulk_data(),
Expand Down Expand Up @@ -235,7 +237,7 @@ VOFAdvectionEdgeAlg::execute()
smdata.rhs(1) += dlhsfac * (qNp1R - qNp1L);

massVofBalancedFlowRate.get(edge, 0) =
dlhsfac * (qNp1R - qNp1L) * (density_liquid_ - density_gas_);
dlhsfac * (qNp1R - qNp1L) * (density_liquid - density_gas);

smdata.lhs(0, 0) -= dlhsfac;
smdata.lhs(0, 1) += dlhsfac;
Expand Down Expand Up @@ -287,7 +289,7 @@ VOFAdvectionEdgeAlg::execute()
smdata.rhs(1) += compression;

massVofBalancedFlowRate.get(edge, 0) +=
compression * (density_liquid_ - density_gas_);
compression * (density_liquid - density_gas);

// Left node contribution; Lag in iterations except for central 0.5*q term
DblType slhsfac = 0.0;
Expand Down

0 comments on commit 252a57e

Please sign in to comment.