Safe execution when phi is not present

This commit is contained in:
Hrvoje Jasak 2013-08-26 11:59:53 +01:00
parent 4c3ca4097c
commit a47a1b5577

View file

@ -175,10 +175,22 @@ void pressureInletOutletVelocityFvPatchVectorField::updateCoeffs()
return;
}
if (this->db().objectRegistry::found(phiName_))
{
const fvsPatchField<scalar>& phip =
lookupPatchField<surfaceScalarField, scalar>(phiName_);
valueFraction() = neg(phip)*(I - sqr(patch().nf()));
}
else
{
InfoIn
(
"pressureInletOutletVelocityFvPatchVectorField::updateCoeffs()"
)<< "Cannot find phi. Return" << endl;
valueFraction() = symmTensor::one;
}
directionMixedFvPatchVectorField::updateCoeffs();
directionMixedFvPatchVectorField::evaluate();