BUG: cyclicACMI: update face areas on lower levels. Fixes #2394
In movePoints had some duplicated code but did not update the lower level (polyPatch) areas. This caused scaling to be applied multiple times (so only 1.0 would not be affected)
This commit is contained in:
parent
97c78a78f3
commit
7de07fd8ba
@ -311,36 +311,25 @@ Foam::tmp<Foam::labelField> Foam::cyclicACMIFvPatch::internalFieldTransfer
|
||||
|
||||
void Foam::cyclicACMIFvPatch::movePoints()
|
||||
{
|
||||
if (!cyclicACMIPolyPatch_.owner())
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Update local and higher level areas
|
||||
const bool updated = updateAreas();
|
||||
|
||||
|
||||
if (!cyclicACMIPolyPatch_.upToDate(areaTime_))
|
||||
// If anything changed update the mesh flux
|
||||
if (cyclicACMIPolyPatch_.owner() && updated)
|
||||
{
|
||||
if (debug)
|
||||
{
|
||||
Pout<< "cyclicACMIFvPatch::movePoints() : updating fv areas for "
|
||||
<< name() << " and " << this->nonOverlapPatch().name()
|
||||
Pout<< "cyclicACMIFvPatch::movePoints() : areas updated for "
|
||||
<< name() << "; updating mesh flux now"
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
// Set the patch face areas to be consistent with the changes made
|
||||
// at the polyPatch level
|
||||
// Scale the mesh flux
|
||||
|
||||
const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
|
||||
const cyclicACMIFvPatch& nbrACMI = neighbPatch();
|
||||
const fvPatch& nbrNonOverlapPatch = nbrACMI.nonOverlapPatch();
|
||||
|
||||
resetPatchAreas(*this);
|
||||
resetPatchAreas(nonOverlapPatch);
|
||||
resetPatchAreas(nbrACMI);
|
||||
resetPatchAreas(nbrNonOverlapPatch);
|
||||
|
||||
// Scale the mesh flux
|
||||
|
||||
const labelListList& newSrcAddr = AMI().srcAddress();
|
||||
const labelListList& newTgtAddr = AMI().tgtAddress();
|
||||
|
||||
@ -410,9 +399,6 @@ void Foam::cyclicACMIFvPatch::movePoints()
|
||||
const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
|
||||
nbrPhiNonOverlapp[facei] *= w;
|
||||
}
|
||||
|
||||
// Mark my data to be up to date with ACMI polyPatch level
|
||||
cyclicACMIPolyPatch_.setUpToDate(areaTime_);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user