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
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -308,8 +308,6 @@ void mappedFixedValueFvPatchField<Type>::updateCoeffs()
}
case mappedPatchBase::NEARESTFACE:
{
const mapDistribute& distMap = mpp.map();
Field<Type> allValues(nbrMesh.nFaces(), pTraits<Type>::zero);
const fieldType& nbrField = sampleField();
@ -326,7 +324,7 @@ void mappedFixedValueFvPatchField<Type>::updateCoeffs()
}
}
distMap.distribute(allValues);
mpp.distribute(allValues);
newValues.transfer(allValues);
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 fvPatch& nbrPatch =
@ -162,7 +159,7 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
nbrPatch.index()
]
);
distMap.distribute(emissivity);
mpp.distribute(emissivity);
return emissivity;

View File

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

View File

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