Permalink
Browse files

alphaContactAngleFvPatchScalarField: Corrected initialisation in cons…

…tructor
  • Loading branch information...
1 parent e0a70e0 commit 7191e78dc3af8f81ba0adc4f287bc8646e01526d Henry committed Sep 7, 2010
@@ -90,7 +90,19 @@ Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
:
fixedGradientFvPatchScalarField(p, iF),
limit_(limitControlNames_.read(dict.lookup("limit")))
-{}
+{
+ if (dict.found("gradient"))
+ {
+ gradient() = scalarField("gradient", dict, p.size());
+ fixedGradientFvPatchScalarField::updateCoeffs();
+ fixedGradientFvPatchScalarField::evaluate();
+ }
+ else
+ {
+ fvPatchField<scalar>::operator=(patchInternalField());
+ gradient() = 0.0;
+ }
+}
Foam::alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
@@ -152,7 +164,7 @@ void Foam::alphaContactAngleFvPatchScalarField::write
Ostream& os
) const
{
- fvPatchScalarField::write(os);
+ fixedGradientFvPatchScalarField::write(os);
os.writeKeyword("limit")
<< limitControlNames_[limit_] << token::END_STATEMENT << nl;
}

0 comments on commit 7191e78

Please sign in to comment.