readFluidMultiRegionResidualControls.H
Go to the documentation of this file.
1  const dictionary& residualControl =
2  mesh.solutionDict().subDict("SIMPLE").subOrEmptyDict("residualControl");
3 
4  scalar UTol = -1.;
5  scalar ETol = -1.;
6  scalar p_rghTol = -1.;
7 
8  if (!residualControl.empty())
9  {
10  if (!residualControl.subOrEmptyDict("U").empty())
11  {
12  UTol = readScalar(residualControl.subDict("U").lookup("tolerance"));
13  }
14 
15  if (!residualControl.subOrEmptyDict("p_rgh").empty())
16  {
17  p_rghTol =
19  (
20  residualControl.subDict("p_rgh").lookup("tolerance")
21  );
22  }
23 
24  if (!residualControl.subOrEmptyDict("h").empty())
25  {
26  ETol = readScalar(residualControl.subDict("h").lookup("tolerance"));
27  }
28 
29  //- Residual control used?
30  if (UTol != -1 || ETol != -1 || p_rghTol != -1)
31  {
32  residualControlUsed = true;
33  resReachedFluid = false;
34  }
35  }
#define readScalar
Definition: doubleScalar.C:38
bool & residualControlUsed
bool & resReachedFluid
const dictionary & residualControl
dynamicFvMesh & mesh