31 void Foam::GAMGSolver::scale
36 const FieldField<Field, scalar>& interfaceLevelBouCoeffs,
46 interfaceLevelBouCoeffs,
51 scalar scalingFactorNum = 0.0;
52 scalar scalingFactorDenom = 0.0;
56 scalingFactorNum += source[i]*field[i];
57 scalingFactorDenom += Acf[i]*field[i];
60 vector2D scalingVector(scalingFactorNum, scalingFactorDenom);
61 A.mesh().reduce(scalingVector, sumOp<vector2D>());
63 const scalar
sf = scalingVector.x()/
stabilise(scalingVector.y(), vSmall);
74 field[i] =
sf*field[i] + (source[i] -
sf*Acf[i])/
D[i];
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
static const Foam::dimensionedScalar D("D", Foam::dimTemperature, 257.14)
#define forAll(list, i)
Loop across all elements in list.
volScalarField scalarField(fieldObject, mesh)
volScalarField sf(fieldObject, mesh)
Vector2D< scalar > vector2D
vector2D obtained from generic Vector2D
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
prefixOSstream Pout(cout, "Pout")