From e06306b79818f0c9eade90c4f07b8c9a0d1c4049 Mon Sep 17 00:00:00 2001 From: Sergio Ferraris Date: Thu, 9 Jun 2011 16:36:55 +0100 Subject: [PATCH] BUG: If refGrad and refValue are in the init fiel read them otherwise set the BC to fixedValue using refValues as values --- .../BCs/U/maxwellSlipUFvPatchVectorField.C | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 07896a6e6c..765dd666ce 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -104,12 +104,17 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField vectorField("value", dict, p.size()) ); - this->refValue() = vectorField("refValue", dict, p.size()); - this->valueFraction() = scalarField("valueFraction", dict, p.size()); - } - else - { - mixedFixedValueSlipFvPatchVectorField::evaluate(); + if (dict.found("refValue") && dict.found("valueFraction")) + { + this->refValue() = vectorField("refValue", dict, p.size()); + this->valueFraction() = + scalarField("valueFraction", dict, p.size()); + } + else + { + this->refValue() = *this; + this->valueFraction() = scalar(1.0); + } } }