From 8f1a8dd4602a038cd64a80d39e4611b91a7a72ce Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 4 Oct 2010 10:10:22 +0100 Subject: [PATCH] BUG: corrections to NEARESTFACE clause in directMappedVelocityFlux BC --- ...MappedVelocityFluxFixedValueFvPatchField.C | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C index 2dde78acc0..716c5b1235 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C @@ -66,16 +66,16 @@ directMappedVelocityFluxFixedValueFvPatchField FatalErrorIn ( "directMappedVelocityFluxFixedValueFvPatchField::" - "directMappedVelocityFluxFixedValueFvPatchField\n" - "(\n" - " const directMappedVelocityFluxFixedValueFvPatchField&,\n" - " const fvPatch&,\n" - " const DimensionedField&,\n" - " const fvPatchFieldMapper&\n" - ")\n" - ) << "\n patch type '" << p.type() + "directMappedVelocityFluxFixedValueFvPatchField" + "(" + "const directMappedVelocityFluxFixedValueFvPatchField&, " + "const fvPatch&, " + "const DimensionedField&, " + "const fvPatchFieldMapper&" + ")" + ) << "Patch type '" << p.type() << "' not type '" << directMappedPatchBase::typeName << "'" - << "\n for patch " << p.name() + << " for patch " << p.name() << " of field " << dimensionedInternalField().name() << " in file " << dimensionedInternalField().objectPath() << exit(FatalError); @@ -102,10 +102,10 @@ directMappedVelocityFluxFixedValueFvPatchField "directMappedVelocityFluxFixedValueFvPatchField" "(" "const fvPatch&, " - "const DimensionedField& iF, " + "const DimensionedField&, " "const dictionary&" ")" - ) << "patch type '" << p.type() + ) << "Patch type '" << p.type() << "' not type '" << directMappedPatchBase::typeName << "'" << " for patch " << p.name() << " of field " << dimensionedInternalField().name() @@ -191,8 +191,8 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs() forAll(Upf, faceI) { - allUValues[faceStart++] = Upf[faceI]; - allPhiValues[faceStart] = phipf[faceI]; + allUValues[faceStart + faceI] = Upf[faceI]; + allPhiValues[faceStart + faceI] = phipf[faceI]; } } @@ -205,7 +205,7 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs() distMap.constructMap(), allUValues ); - newUValues = patch().patchSlice(newUValues); + newUValues = patch().patchSlice(allUValues); mapDistribute::distribute ( @@ -214,9 +214,9 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs() distMap.constructSize(), distMap.subMap(), distMap.constructMap(), - newPhiValues + allPhiValues ); - newPhiValues = patch().patchSlice(newPhiValues); + newPhiValues = patch().patchSlice(allPhiValues); break; } @@ -257,9 +257,10 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs() { FatalErrorIn ( - "directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs()" - )<< "patch can only be used in NEARESTPATCHFACE or NEARESTFACE " - << "mode" << nl << abort(FatalError); + "directMappedVelocityFluxFixedValueFvPatchField::" + "updateCoeffs()" + ) << "patch can only be used in NEARESTPATCHFACE or NEARESTFACE " + << "mode" << nl << abort(FatalError); } }