Skip to content

Commit

Permalink
dsmcFoam+: load balancing #76: changing sign < to <=, i.e., last doma…
Browse files Browse the repository at this point in the history
…in repartitioning can happen at t = loadBalacingUntilTime
  • Loading branch information
vincentcasseau committed May 29, 2021
1 parent 5357476 commit 4a40ae8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,18 @@ void dsmcDynamicLoadBalancing::update()
Foam::reduce(localImbalance, maxOp<scalar>());
scalar maxImbalance = localImbalance/idealNParticles;

Info<< " Maximum imbalance = " << 100*maxImbalance << "%"
Info<< " Maximum imbalance = " << 100*maxImbalance << "%" << nl
<< endl;

// explanation of modes:
// 1. enableBalancing = true:
// 1. if time < balanceUntilTime -> load balance
// 2. if time >= balanceUntilTime -> do not load balance
// 1. if time <= balanceUntilTime -> load balance
// 2. if time > balanceUntilTime -> do not load balance
// 2. enableBalancing = false -> do not load balance
if
(
enableBalancing_
&& time_.time().value() < balanceUntilTime_
&& time_.time().value() <= balanceUntilTime_
&& maxImbalance > allowableImbalance
)
{
Expand Down

0 comments on commit 4a40ae8

Please sign in to comment.