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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fvsPatchField<scalar>& phip =
|
if (this->db().objectRegistry::found(phiName_))
|
||||||
lookupPatchField<surfaceScalarField, scalar>(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::updateCoeffs();
|
||||||
directionMixedFvPatchVectorField::evaluate();
|
directionMixedFvPatchVectorField::evaluate();
|
||||||
|
|
Reference in a new issue