mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -311,36 +311,25 @@ Foam::tmp<Foam::labelField> Foam::cyclicACMIFvPatch::internalFieldTransfer
|
|||||||
|
|
||||||
void Foam::cyclicACMIFvPatch::movePoints()
|
void Foam::cyclicACMIFvPatch::movePoints()
|
||||||
{
|
{
|
||||||
if (!cyclicACMIPolyPatch_.owner())
|
// Update local and higher level areas
|
||||||
{
|
const bool updated = updateAreas();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// If anything changed update the mesh flux
|
||||||
if (!cyclicACMIPolyPatch_.upToDate(areaTime_))
|
if (cyclicACMIPolyPatch_.owner() && updated)
|
||||||
{
|
{
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Pout<< "cyclicACMIFvPatch::movePoints() : updating fv areas for "
|
Pout<< "cyclicACMIFvPatch::movePoints() : areas updated for "
|
||||||
<< name() << " and " << this->nonOverlapPatch().name()
|
<< name() << "; updating mesh flux now"
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Scale the mesh flux
|
||||||
// Set the patch face areas to be consistent with the changes made
|
|
||||||
// at the polyPatch level
|
|
||||||
|
|
||||||
const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
|
const fvPatch& nonOverlapPatch = this->nonOverlapPatch();
|
||||||
const cyclicACMIFvPatch& nbrACMI = neighbPatch();
|
const cyclicACMIFvPatch& nbrACMI = neighbPatch();
|
||||||
const fvPatch& nbrNonOverlapPatch = nbrACMI.nonOverlapPatch();
|
const fvPatch& nbrNonOverlapPatch = nbrACMI.nonOverlapPatch();
|
||||||
|
|
||||||
resetPatchAreas(*this);
|
|
||||||
resetPatchAreas(nonOverlapPatch);
|
|
||||||
resetPatchAreas(nbrACMI);
|
|
||||||
resetPatchAreas(nbrNonOverlapPatch);
|
|
||||||
|
|
||||||
// Scale the mesh flux
|
|
||||||
|
|
||||||
const labelListList& newSrcAddr = AMI().srcAddress();
|
const labelListList& newSrcAddr = AMI().srcAddress();
|
||||||
const labelListList& newTgtAddr = AMI().tgtAddress();
|
const labelListList& newTgtAddr = AMI().tgtAddress();
|
||||||
|
|
||||||
@ -410,9 +399,6 @@ void Foam::cyclicACMIFvPatch::movePoints()
|
|||||||
const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
|
const scalar w = 1.0 - cyclicACMIPolyPatch_.tgtMask()[facei];
|
||||||
nbrPhiNonOverlapp[facei] *= w;
|
nbrPhiNonOverlapp[facei] *= w;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark my data to be up to date with ACMI polyPatch level
|
|
||||||
cyclicACMIPolyPatch_.setUpToDate(areaTime_);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user