Debug improvements in view factors
This commit is contained in:
parent
8ad0250310
commit
270c91d279
1 changed files with 23 additions and 3 deletions
|
@ -235,8 +235,8 @@ int main(int argc, char *argv[])
|
||||||
// Calculate total number of fine and coarse faces
|
// Calculate total number of fine and coarse faces
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
label nCoarseFaces = 0; //total number of coarse faces
|
label nCoarseFaces = 0; // total number of coarse faces
|
||||||
label nFineFaces = 0; //total number of fine faces
|
label nFineFaces = 0; // total number of fine faces
|
||||||
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
|
const polyBoundaryMesh& coarsePatches = coarseMesh.boundaryMesh();
|
||||||
|
@ -256,7 +256,7 @@ int main(int argc, char *argv[])
|
||||||
viewFactorsPatches[count] = QrpI.patch().index();
|
viewFactorsPatches[count] = QrpI.patch().index();
|
||||||
nCoarseFaces += coarsePatches[patchI].size();
|
nCoarseFaces += coarsePatches[patchI].size();
|
||||||
nFineFaces += patches[patchI].size();
|
nFineFaces += patches[patchI].size();
|
||||||
count ++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,6 +267,26 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
reduce(totalNCoarseFaces, sumOp<label>());
|
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())
|
if (Pstream::master())
|
||||||
{
|
{
|
||||||
Info << "\nTotal number of coarse faces: "<< totalNCoarseFaces << endl;
|
Info << "\nTotal number of coarse faces: "<< totalNCoarseFaces << endl;
|
||||||
|
|
Reference in a new issue