Commit a54927fa authored by andy's avatar andy
Browse files

ENH: Added warning if using AMI with particle tracking

parent fd18a387
......@@ -31,9 +31,33 @@ License
#include "Time.H"
#include "OFstream.H"
#include "wallPolyPatch.H"
#include "cyclicAMIPolyPatch.H"
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
template<class ParticleType>
void Foam::Cloud<ParticleType>::checkPatches() const
{
const polyBoundaryMesh& pbm = polyMesh_.boundaryMesh();
bool ok = true;
forAll(pbm, patchI)
{
if (isA<cyclicAMIPolyPatch>(pbm[patchI]))
{
ok = false;
break;
}
}
if (!ok)
{
WarningIn("void Foam::Cloud<ParticleType>::initCloud(const bool)")
<< "Particle tracking across AMI patches is not currently "
<< "supported" << endl;
}
}
template<class ParticleType>
void Foam::Cloud<ParticleType>::calcCellWallFaces() const
{
......@@ -76,6 +100,8 @@ Foam::Cloud<ParticleType>::Cloud
nTrackingRescues_(),
cellWallFacesPtr_()
{
checkPatches();
// Ask for the tetBasePtIs to trigger all processors to build
// them, otherwise, if some processors have no particles then
// there is a comms mismatch.
......@@ -100,6 +126,8 @@ Foam::Cloud<ParticleType>::Cloud
nTrackingRescues_(),
cellWallFacesPtr_()
{
checkPatches();
// Ask for the tetBasePtIs to trigger all processors to build
// them, otherwise, if some processors have no particles then
// there is a comms mismatch.
......
......@@ -93,6 +93,9 @@ class Cloud
// Private Member Functions
//- Check patches
void checkPatches() const;
//- Initialise cloud on IO constructor
void initCloud(const bool checkClass);
......
......@@ -162,6 +162,8 @@ Foam::Cloud<ParticleType>::Cloud
nTrackingRescues_(),
cellWallFacesPtr_()
{
checkPatches();
initCloud(checkClass);
}
......@@ -180,6 +182,8 @@ Foam::Cloud<ParticleType>::Cloud
nTrackingRescues_(),
cellWallFacesPtr_()
{
checkPatches();
initCloud(checkClass);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment