Safe execution when phi is not present
This commit is contained in:
parent
4c3ca4097c
commit
a47a1b5577
1 changed files with 15 additions and 3 deletions
|
@ -175,10 +175,22 @@ void pressureInletOutletVelocityFvPatchVectorField::updateCoeffs()
|
|||
return;
|
||||
}
|
||||
|
||||
const fvsPatchField<scalar>& phip =
|
||||
lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
||||
if (this->db().objectRegistry::found(phiName_))
|
||||
{
|
||||
const fvsPatchField<scalar>& phip =
|
||||
lookupPatchField<surfaceScalarField, scalar>(phiName_);
|
||||
|
||||
valueFraction() = neg(phip)*(I - sqr(patch().nf()));
|
||||
valueFraction() = neg(phip)*(I - sqr(patch().nf()));
|
||||
}
|
||||
else
|
||||
{
|
||||
InfoIn
|
||||
(
|
||||
"pressureInletOutletVelocityFvPatchVectorField::updateCoeffs()"
|
||||
)<< "Cannot find phi. Return" << endl;
|
||||
|
||||
valueFraction() = symmTensor::one;
|
||||
}
|
||||
|
||||
directionMixedFvPatchVectorField::updateCoeffs();
|
||||
directionMixedFvPatchVectorField::evaluate();
|
||||
|
|
Reference in a new issue