Avoid core dump when flux-dependent bcs are evaluated in absence of flux. Author: Hrvoje Jasak. Merge: Dominik Christ.

This commit is contained in:
Dominik Christ 2014-08-15 11:51:37 +01:00
commit 7b05f67822
8 changed files with 44 additions and 2 deletions

View file

@ -129,6 +129,13 @@ void inletOutletFvPatchField<Type>::updateCoeffs()
if (!this->db().objectRegistry::found(phiName_))
{
// Flux not available, do not update
InfoIn
(
"void inletOutletFvPatchField<Type>::"
"updateCoeffs()"
) << "Flux field " << phiName_ << " not found. "
<< "Performing mixed update" << endl;
mixedFvPatchField<Type>::updateCoeffs();
return;

View file

@ -155,6 +155,13 @@ void pressureDirectedInletOutletVelocityFvPatchVectorField::updateCoeffs()
if (!this->db().objectRegistry::found(phiName_))
{
// Flux not available, do not update
InfoIn
(
"void pressureDirectedInletOutletVelocityFvPatchVectorField::"
"updateCoeffs()"
) << "Flux field " << phiName_ << " not found. "
<< "Performing mixed update" << endl;
mixedFvPatchVectorField::updateCoeffs();
return;

View file

@ -147,6 +147,13 @@ void pressureDirectedInletVelocityFvPatchVectorField::updateCoeffs()
if (!this->db().objectRegistry::found(phiName_))
{
// Flux not available, do not update
InfoIn
(
"void pressureDirectedInletVelocityFvPatchVectorField::"
"updateCoeffs()"
) << "Flux field " << phiName_ << " not found. "
<< "Performing fixed value update" << endl;
fixedValueFvPatchVectorField::updateCoeffs();
return;

View file

@ -111,6 +111,12 @@ void Foam::pressureInletVelocityFvPatchVectorField::updateCoeffs()
if (!this->db().objectRegistry::found(phiName_))
{
// Flux not available, do not update
InfoIn
(
"void ::pressureInletVelocityFvPatchVectorField::updateCoeffs()"
) << "Flux field " << phiName_ << " not found. "
<< "Performing fixed value update" << endl;
fixedValueFvPatchVectorField::updateCoeffs();
return;

View file

@ -125,6 +125,13 @@ void pressureNormalInletOutletVelocityFvPatchVectorField::updateCoeffs()
if (!this->db().objectRegistry::found(phiName_))
{
// Flux not available, do not update
InfoIn
(
"void pressureNormalInletOutletVelocityFvPatchVectorField::"
"updateCoeffs()"
) << "Flux field " << phiName_ << " not found. "
<< "Performing mixed update" << endl;
mixedFvPatchVectorField::updateCoeffs();
return;

View file

@ -56,7 +56,10 @@ class pressureNormalInletOutletVelocityFvPatchVectorField
{
// Private data
//- Name of the flux field
word phiName_;
//- Name of the density field
word rhoName_;

View file

@ -162,6 +162,13 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs(const vectorField& Up)
if (!this->db().objectRegistry::found(phiName_))
{
// Flux not available, do not update
InfoIn
(
"void totalPressureFvPatchScalarField::"
"updateCoeffs(const vectorField& Up)"
) << "Flux field " << phiName_ << " not found. "
<< "Performing fixed value update" << endl;
fixedValueFvPatchScalarField::updateCoeffs();
return;

View file

@ -82,8 +82,6 @@ class wallDist
public volScalarField,
public cellDistFuncs
{
private:
// Private Member Data