diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index f2c68e3b8d0fd7fe7442736ec254b90c4bcb0453..26553c8db23d673c5ff3f0caa3370d0de8c2c59b 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -858,6 +858,11 @@ int main(int argc, char *argv[]) writer<scalar>::New(setFormat) ); + const scalar maxSizeRatio + ( + meshDict.lookupOrDefault<scalar>("maxSizeRatio", 100.0) + ); + // Read decomposePar dictionary dictionary decomposeDict; @@ -1121,10 +1126,10 @@ int main(int argc, char *argv[]) // Check geometry allGeometry.checkGeometry ( - 100.0, // max size ratio - 1e-9, // intersection tolerance + maxSizeRatio, // max size ratio + 1e-9, // intersection tolerance setFormatter, - 0.01, // min triangle quality + 0.01, // min triangle quality true ); @@ -1146,12 +1151,12 @@ int main(int argc, char *argv[]) const boundBox& bb = s.bounds(); scalar ratio = bb.mag() / meshBb.mag(); - if (ratio > 100.0 || ratio < 1.0/100.0) + if (ratio > maxSizeRatio || ratio < 1.0/maxSizeRatio) { Warning << " " << allGeometry.names()[geomi] << " bounds differ from mesh" - << " by more than a factor 100:" << nl + << " by more than a factor " << maxSizeRatio << ":" << nl << " bounding box : " << bb << nl << " mesh bounding box : " << meshBb << endl; @@ -1259,10 +1264,10 @@ int main(int argc, char *argv[]) OStringStream os; bool hasErrors = features.checkSizes ( - 100.0, //const scalar maxRatio, + maxSizeRatio, //const scalar maxRatio, mesh.bounds(), - true, //const bool report, - os //FatalIOError + true, //const bool report, + os //FatalIOError ); if (hasErrors) { diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C index 003067656f4808e52763ba4841609b3cc26a2465..e5e06e0632ea8926eb5407333903aa67ae93057c 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoCheck.C @@ -143,8 +143,9 @@ bool Foam::motionSmootherAlgo::checkMesh << "Missing/incorrect required dictionary entries:" << nl << nl << IOerrorMsg.c_str() << nl - << errorMsg.c_str() << nl << nl - << "Exiting dry-run" << nl << endl; + << errorMsg.c_str() << nl + //<< nl << "Exiting dry-run" << nl + << endl; FatalError.clear(); FatalIOError.clear(); @@ -576,17 +577,18 @@ bool Foam::motionSmootherAlgo::checkMesh if (errorMsg.size() || IOerrorMsg.size()) { - errorMsg = "[dryRun] " + errorMsg; - errorMsg.replaceAll("\n", "\n[dryRun] "); - IOerrorMsg = "[dryRun] " + IOerrorMsg; - IOerrorMsg.replaceAll("\n", "\n[dryRun] "); + //errorMsg = "[dryRun] " + errorMsg; + //errorMsg.replaceAll("\n", "\n[dryRun] "); + //IOerrorMsg = "[dryRun] " + IOerrorMsg; + //IOerrorMsg.replaceAll("\n", "\n[dryRun] "); Perr<< nl << "Missing/incorrect required dictionary entries:" << nl << nl << IOerrorMsg.c_str() << nl - << errorMsg.c_str() << nl << nl - << "Exiting dry-run" << nl << endl; + << errorMsg.c_str() << nl + //<< nl << "Exiting dry-run" << nl + << endl; FatalError.clear(); FatalIOError.clear();