Skip to content

Commit

Permalink
alphaContactAngleFvPatchScalarField: Corrected initialisation in cons…
Browse files Browse the repository at this point in the history
…tructor
  • Loading branch information
Henry authored and Henry committed Sep 7, 2010
1 parent e0a70e0 commit 7191e78
Showing 1 changed file with 14 additions and 2 deletions.
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7191e78

Please sign in to comment.