Cloud: Accumulate warning messages associated with location failures

Warnings about initialisation of particles with locations outside of the
mesh and about the positional inaccuracy of NCC transfers are now
accumulated and printed once per time-step. This way, the log isn't
obscured by hundreds of such warnings.

Also, the pattern in which warnings are silenced after some arbitrary
number (typically 100) have been issued has been removed. This pattern
means that user viewing the log later in the run may be unaware that a
problem is still present. Accumulated warnings are concise enough that
they do not need to be silenced. They are generated every time-step, and
so remain visible throughout the log.
This commit is contained in:
Will Bainbridge
2023-09-19 09:52:35 +01:00
parent aaf04f0481
commit e5cf0cf4ed
50 changed files with 443 additions and 431 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -241,15 +241,22 @@ void Foam::mapClouds(const fvMeshToFvMesh& interp)
);
forAll(positions, tgtParticlei)
{
tgtCloud.addParticle
label nLocateBoundaryHits = 0;
autoPtr<passiveParticle> pPtr
(
new passiveParticle
(
tgtMesh,
positions[tgtParticlei],
tgtCells[tgtParticlei]
tgtCells[tgtParticlei],
nLocateBoundaryHits
)
);
if (nLocateBoundaryHits == 0)
{
tgtCloud.addParticle(pPtr.ptr());
}
}
Info<< " mapped "