Debug improvements in view factors

This commit is contained in:
Hrvoje Jasak 2017-05-25 14:46:55 +01:00
parent 8ad0250310
commit 270c91d279

View file

@ -235,8 +235,8 @@ int main(int argc, char *argv[])
// Calculate total number of fine and coarse faces
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
label nCoarseFaces = 0; //total number of coarse faces
label nFineFaces = 0; //total number of fine faces
label nCoarseFaces = 0; // total number of coarse faces
label nFineFaces = 0; // total number of fine faces
const polyBoundaryMesh& patches = mesh.boundaryMesh();
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
@ -256,7 +256,7 @@ int main(int argc, char *argv[])
viewFactorsPatches[count] = QrpI.patch().index();
nCoarseFaces += coarsePatches[patchI].size();
nFineFaces += patches[patchI].size();
count ++;
count++;
}
}
@ -267,6 +267,26 @@ int main(int argc, char *argv[])
reduce(totalNCoarseFaces, sumOp<label>());
if (totalNCoarseFaces == 0)
{
WarningIn(args.executable())
<< "No coarse faces detected: no rays." << nl
<< "This is probably not intended: please reconsider case setup"
<< endl;
return 0;
}
if (count == 0)
{
WarningIn(args.executable())
<< "No radiation patches detected: no rays." << nl
<< "This is probably not intended: please reconsider case setup"
<< endl;
return 0;
}
if (Pstream::master())
{
Info << "\nTotal number of coarse faces: "<< totalNCoarseFaces << endl;