mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: viewFactor: smoothing when zero visible faces. Fixes #2622
This commit is contained in:
@ -419,6 +419,9 @@ void Foam::radiation::viewFactor::initialise()
|
||||
{
|
||||
scalar maxDelta = 0;
|
||||
scalar totalDelta = 0;
|
||||
|
||||
if (myF.size())
|
||||
{
|
||||
forAll (myF, i)
|
||||
{
|
||||
scalar sumF = 0.0;
|
||||
@ -439,6 +442,7 @@ void Foam::radiation::viewFactor::initialise()
|
||||
}
|
||||
}
|
||||
totalDelta /= myF.size();
|
||||
}
|
||||
reduce(totalDelta, sumOp<scalar>());
|
||||
reduce(maxDelta, maxOp<scalar>());
|
||||
Info << "Smoothing average delta : " << totalDelta << endl;
|
||||
@ -1122,7 +1126,7 @@ void Foam::radiation::viewFactor::calculate()
|
||||
|
||||
if (debug)
|
||||
{
|
||||
forAll(qrBf, patchID)
|
||||
for (const label patchID : selectedPatches_)
|
||||
{
|
||||
const scalarField& qrp = qrBf[patchID];
|
||||
const scalarField& magSf = mesh_.magSf().boundaryField()[patchID];
|
||||
|
||||
Reference in New Issue
Block a user