Skip to content

Commit

Permalink
Merge pull request #28668 from grmnptr/force-correction-fix-28667
Browse files Browse the repository at this point in the history
Restrict the volume force baseline check to a subdomain.
  • Loading branch information
grmnptr authored Sep 23, 2024
2 parents ee23740 + b01184a commit ee78ae4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,18 @@ INSFVRhieChowInterpolator::initialSetup()
if (_bool_correct_vf && _volume_force_correction_method == "force-consistent")
{
_baseline_volume_force = 1e10;
for (const auto & loc_elem : _mesh.element_ptr_range())
for (const auto & loc_elem : *_elem_range)
{
Real elem_value = 0.0;
for (const auto i : make_range(_volumetric_force.size()))
elem_value += (*_volumetric_force[i])(makeElemArg(loc_elem), determineState());

if (std::abs(elem_value) < _baseline_volume_force)
_baseline_volume_force = std::abs(elem_value);
if (_baseline_volume_force == 0)
break;
}
_communicator.min(_baseline_volume_force);
}
}

Expand Down

0 comments on commit ee78ae4

Please sign in to comment.