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];
UPtrList< const lduInterfaceField > lduInterfaceFieldPtrsList
List of coupled interface fields to be used in coupling.
#define forAll(list, i)
Loop across all elements in list.
Vector2D< scalar > vector2D
vector2D obtained from generic Vector2D
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
volScalarField scalarField(fieldObject, mesh)
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
prefixOSstream Pout(cout, "Pout")