Warn if no IB patches found
This commit is contained in:
parent
3bf258ab2b
commit
6d84054b11
1 changed files with 26 additions and 2 deletions
|
@ -39,6 +39,24 @@ Description
|
||||||
|
|
||||||
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
{
|
{
|
||||||
|
bool foundImmersedBoundaryPatch = false;
|
||||||
|
|
||||||
|
forAll (mesh.boundary(), patchI)
|
||||||
|
{
|
||||||
|
if (isA<immersedBoundaryFvPatch>(mesh.boundary()[patchI]))
|
||||||
|
{
|
||||||
|
foundImmersedBoundaryPatch = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!foundImmersedBoundaryPatch)
|
||||||
|
{
|
||||||
|
InfoInFunction
|
||||||
|
<< "Cannot find immersed boundary patch. Exiting" << endl;
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Info<< nl << "Calculating gamma" << endl;
|
Info<< nl << "Calculating gamma" << endl;
|
||||||
volScalarField gamma
|
volScalarField gamma
|
||||||
(
|
(
|
||||||
|
@ -62,7 +80,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
|
|
||||||
// Collect dead cells
|
// Collect dead cells
|
||||||
labelHashSet deadCellsHash;
|
labelHashSet deadCellsHash;
|
||||||
|
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll (mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
if (isA<immersedBoundaryFvPatch>(mesh.boundary()[patchI]))
|
if (isA<immersedBoundaryFvPatch>(mesh.boundary()[patchI]))
|
||||||
|
@ -133,6 +151,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
|
|
||||||
|
|
||||||
// Create dead cells set
|
// Create dead cells set
|
||||||
|
if (!deadCellsHash.empty())
|
||||||
{
|
{
|
||||||
cellSet
|
cellSet
|
||||||
(
|
(
|
||||||
|
@ -141,7 +160,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||||
deadCellsHash
|
deadCellsHash
|
||||||
).write();
|
).write();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InfoInFunction
|
||||||
|
<< "Dead cells not found" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Check consistency of face area vectors
|
// Check consistency of face area vectors
|
||||||
|
|
||||||
Info<< nl << "Calculating divSf" << endl;
|
Info<< nl << "Calculating divSf" << endl;
|
||||||
|
|
Reference in a new issue