BUG: mapped bc: use distribute on the mappedPatchBase to account for AMI

This commit is contained in:
mattijs
2012-12-13 13:12:21 +00:00
parent 97ea228532
commit 333d37ea7d
4 changed files with 9 additions and 18 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -308,8 +308,6 @@ void mappedFixedValueFvPatchField<Type>::updateCoeffs()
} }
case mappedPatchBase::NEARESTFACE: case mappedPatchBase::NEARESTFACE:
{ {
const mapDistribute& distMap = mpp.map();
Field<Type> allValues(nbrMesh.nFaces(), pTraits<Type>::zero); Field<Type> allValues(nbrMesh.nFaces(), pTraits<Type>::zero);
const fieldType& nbrField = sampleField(); const fieldType& nbrField = sampleField();
@ -326,7 +324,7 @@ void mappedFixedValueFvPatchField<Type>::updateCoeffs()
} }
} }
distMap.distribute(allValues); mpp.distribute(allValues);
newValues.transfer(allValues); newValues.transfer(allValues);
break; break;

View File

@ -146,9 +146,6 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
); );
// Force recalculation of mapping and schedule
const mapDistribute& distMap = mpp.map();
const fvMesh& nbrFvMesh = refCast<const fvMesh>(nbrMesh); const fvMesh& nbrFvMesh = refCast<const fvMesh>(nbrMesh);
const fvPatch& nbrPatch = const fvPatch& nbrPatch =
@ -162,7 +159,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
nbrPatch.index() nbrPatch.index()
] ]
); );
distMap.distribute(emissivity); mpp.distribute(emissivity);
return emissivity; return emissivity;

View File

@ -158,8 +158,6 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
nbrMesh nbrMesh
).boundary()[mpp.samplePolyPatch().index()]; ).boundary()[mpp.samplePolyPatch().index()];
// Force recalculation of mapping and schedule
const mapDistribute& distMap = mpp.map();
tmp<scalarField> intFld = patchInternalField(); tmp<scalarField> intFld = patchInternalField();
@ -181,11 +179,11 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs()
// Swap to obtain full local values of neighbour internal field // Swap to obtain full local values of neighbour internal field
scalarField nbrIntFld(nbrField.patchInternalField()); scalarField nbrIntFld(nbrField.patchInternalField());
distMap.distribute(nbrIntFld); mpp.distribute(nbrIntFld);
// Swap to obtain full local values of neighbour kappa*delta // Swap to obtain full local values of neighbour kappa*delta
scalarField nbrKDelta(nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs()); scalarField nbrKDelta(nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs());
distMap.distribute(nbrKDelta); mpp.distribute(nbrKDelta);
tmp<scalarField> myKDelta = kappa(*this)*patch().deltaCoeffs(); tmp<scalarField> myKDelta = kappa(*this)*patch().deltaCoeffs();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -163,8 +163,6 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
const fvPatch& nbrPatch = const fvPatch& nbrPatch =
refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI]; refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI];
// Force recalculation of mapping and schedule
const mapDistribute& distMap = mpp.map();
scalarField Tc(patchInternalField()); scalarField Tc(patchInternalField());
scalarField& Tp = *this; scalarField& Tp = *this;
@ -178,12 +176,12 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
// Swap to obtain full local values of neighbour internal field // Swap to obtain full local values of neighbour internal field
scalarField TcNbr(nbrField.patchInternalField()); scalarField TcNbr(nbrField.patchInternalField());
distMap.distribute(TcNbr); mpp.distribute(TcNbr);
// Swap to obtain full local values of neighbour K*delta // Swap to obtain full local values of neighbour K*delta
scalarField KDeltaNbr(nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs()); scalarField KDeltaNbr(nbrField.kappa(nbrField)*nbrPatch.deltaCoeffs());
distMap.distribute(KDeltaNbr); mpp.distribute(KDeltaNbr);
scalarField KDelta(kappa(*this)*patch().deltaCoeffs()); scalarField KDelta(kappa(*this)*patch().deltaCoeffs());
@ -198,7 +196,7 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs()
if (QrNbrName_ != "none") if (QrNbrName_ != "none")
{ {
QrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrNbrName_); QrNbr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrNbrName_);
distMap.distribute(QrNbr); mpp.distribute(QrNbr);
} }
scalarField alpha(KDeltaNbr - (Qr + QrNbr)/Tp); scalarField alpha(KDeltaNbr - (Qr + QrNbr)/Tp);