diff --git a/etc/controlDict b/etc/controlDict index b3ed77d82..bbcbea948 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -943,7 +943,7 @@ Tolerances slidingEdgeEndCutoffTol 0.0001; slidingEdgeCoPlanarTol 0.8; -// GGIAreaErrorTol 1e-8; + GGIAreaErrorTol 1e-8; } DimensionedConstants diff --git a/src/Pstream/gamma/Pstream.C b/src/Pstream/gamma/Pstream.C index f5f849421..9cee828e1 100644 --- a/src/Pstream/gamma/Pstream.C +++ b/src/Pstream/gamma/Pstream.C @@ -320,7 +320,7 @@ bool Pstream::init(int& argc, char**& argv) Info<< "GAMMA Pstream initialized with:" << nl << " floatTransfer : " << floatTransfer << nl - << " nProcsSimpleSum : " << nProcsSimpleSum << nl + << " nProcsSimpleSum : " << nProcsSimpleSum() << nl << " scheduledTransfer : " << Pstream::scheduledTransfer << nl << Foam::endl; diff --git a/src/Pstream/mpi/Pstream.C b/src/Pstream/mpi/Pstream.C index b7cddd6ec..1bb8ab404 100644 --- a/src/Pstream/mpi/Pstream.C +++ b/src/Pstream/mpi/Pstream.C @@ -154,7 +154,7 @@ void Foam::reduce(scalar& Value, const sumOp& bop) return; } - if (Pstream::nProcs() <= Pstream::nProcsSimpleSum) + if (Pstream::nProcs() <= Pstream::nProcsSimpleSum()) { if (Pstream::master()) { diff --git a/src/VectorN/finiteVolume/fields/fvPatchFields/fvPatchVectorNFields.C b/src/VectorN/finiteVolume/fields/fvPatchFields/fvPatchVectorNFields.C index 0bfb01b2c..e50138760 100644 --- a/src/VectorN/finiteVolume/fields/fvPatchFields/fvPatchVectorNFields.C +++ b/src/VectorN/finiteVolume/fields/fvPatchFields/fvPatchVectorNFields.C @@ -38,7 +38,7 @@ defineNamedTemplateTypeNameAndDebug(fvPatchTypeField, 0); \ template<> \ int fvPatchTypeField::disallowGenericFvPatchField \ ( \ - debug::debugSwitch("disallowGenericFvPatchField", 0) \ + debug::debugSwitchFromDict("disallowGenericFvPatchField", 0) \ ); \ defineTemplateRunTimeSelectionTable(fvPatchTypeField, patch); \ defineTemplateRunTimeSelectionTable(fvPatchTypeField, patchMapper); \ diff --git a/src/VectorN/finiteVolume/fields/fvsPatchFields/fvsPatchVectorNFields.C b/src/VectorN/finiteVolume/fields/fvsPatchFields/fvsPatchVectorNFields.C index 1c8c36503..108a80ca6 100644 --- a/src/VectorN/finiteVolume/fields/fvsPatchFields/fvsPatchVectorNFields.C +++ b/src/VectorN/finiteVolume/fields/fvsPatchFields/fvsPatchVectorNFields.C @@ -38,7 +38,7 @@ defineNamedTemplateTypeNameAndDebug(fvsPatchTypeField, 0); \ template<> \ int fvsPatchTypeField::disallowDefaultFvsPatchField \ ( \ - debug::debugSwitch("disallowDefaultFvsPatchField", 0) \ + debug::debugSwitchFromDict("disallowDefaultFvsPatchField", 0) \ ); \ defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patch); \ defineTemplateRunTimeSelectionTable(fvsPatchTypeField, patchMapper); \ diff --git a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C index 4e0e6b5f2..139cb4710 100644 --- a/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C +++ b/src/autoMesh/autoHexMesh/autoHexMeshDriver/autoRefineDriver.C @@ -393,7 +393,7 @@ void Foam::autoRefineDriver::removeInsideCells { Pout<< "Writing subsetted mesh to time " << meshRefiner_.timeName() << '.' << endl; - meshRefiner_.write(debug, mesh.time().path()/meshRefiner_.timeName()); + meshRefiner_.write(debug(), mesh.time().path()/meshRefiner_.timeName()); Pout<< "Dumped mesh in = " << mesh.time().cpuTimeIncrement() << " s\n" << nl << endl; } @@ -645,7 +645,7 @@ void Foam::autoRefineDriver::zonify << meshRefiner_.timeName() << '.' << endl; meshRefiner_.write ( - debug, + debug(), mesh.time().path()/meshRefiner_.timeName() ); } @@ -735,7 +735,7 @@ void Foam::autoRefineDriver::splitAndMergeBaffles { Pout<< "Writing handleProblemCells mesh to time " << meshRefiner_.timeName() << '.' << endl; - meshRefiner_.write(debug, mesh.time().path()/meshRefiner_.timeName()); + meshRefiner_.write(debug(), mesh.time().path()/meshRefiner_.timeName()); } } diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index 65cc227d6..3a8f31ba7 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -229,7 +229,7 @@ void Foam::meshRefinement::getBafflePatches { autoPtr str; label vertI = 0; - if (debug&OBJINTERSECTIONS) + if (debug & OBJINTERSECTIONS) { str.reset ( @@ -1499,13 +1499,13 @@ void Foam::meshRefinement::baffleAndSplitMesh Info<< "Created baffles in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; - printMeshInfo(debug, "After introducing baffles"); + printMeshInfo(debug(), "After introducing baffles"); if (debug) { Pout<< "Writing baffled mesh to time " << timeName() << endl; - write(debug, runTime.path()/"baffles"); + write(debug(), runTime.path()/"baffles"); Pout<< "Dumped debug data in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; } @@ -1581,13 +1581,13 @@ void Foam::meshRefinement::baffleAndSplitMesh Info<< "Created baffles in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; - printMeshInfo(debug, "After introducing baffles"); + printMeshInfo(debug(), "After introducing baffles"); if (debug) { Pout<< "Writing extra baffled mesh to time " << timeName() << endl; - write(debug, runTime.path()/"extraBaffles"); + write(debug(), runTime.path()/"extraBaffles"); Pout<< "Dumped debug data in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; } @@ -1617,13 +1617,13 @@ void Foam::meshRefinement::baffleAndSplitMesh Info<< "Split mesh in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; - printMeshInfo(debug, "After subsetting"); + printMeshInfo(debug(), "After subsetting"); if (debug) { Pout<< "Writing subsetted mesh to time " << timeName() << endl; - write(debug, runTime.path()/timeName()); + write(debug(), runTime.path()/timeName()); Pout<< "Dumped debug data in = " << runTime.cpuTimeIncrement() << " s\n" << nl << endl; } diff --git a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C index 858020005..85d0996ed 100644 --- a/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C +++ b/src/autoMesh/autoHexMesh/meshRefinement/meshRefinementRefine.C @@ -1269,7 +1269,7 @@ Foam::meshRefinement::refineAndBalance << " mesh to time " << timeName() << endl; write ( - debug, + debug(), mesh_.time().path() /timeName() ); @@ -1282,7 +1282,7 @@ Foam::meshRefinement::refineAndBalance Info<< "Refined mesh in = " << mesh_.time().cpuTimeIncrement() << " s" << endl; - printMeshInfo(debug, "After refinement " + msg); + printMeshInfo(debug(), "After refinement " + msg); // Load balancing @@ -1324,7 +1324,7 @@ Foam::meshRefinement::refineAndBalance Info<< "Balanced mesh in = " << mesh_.time().cpuTimeIncrement() << " s" << endl; - printMeshInfo(debug, "After balancing " + msg); + printMeshInfo(debug(), "After balancing " + msg); if (debug) @@ -1333,7 +1333,7 @@ Foam::meshRefinement::refineAndBalance << " mesh to time " << timeName() << endl; write ( - debug, + debug(), mesh_.time().path()/timeName() ); Pout<< "Dumped debug data in = " @@ -1447,7 +1447,7 @@ Foam::meshRefinement::balanceAndRefine // Info<< endl; //} - printMeshInfo(debug, "After balancing " + msg); + printMeshInfo(debug(), "After balancing " + msg); if (debug) { @@ -1455,7 +1455,7 @@ Foam::meshRefinement::balanceAndRefine << " mesh to time " << timeName() << endl; write ( - debug, + debug(), mesh_.time().path()/timeName() ); Pout<< "Dumped debug data in = " @@ -1478,7 +1478,7 @@ Foam::meshRefinement::balanceAndRefine << " mesh to time " << timeName() << endl; write ( - debug, + debug(), mesh_.time().path() /timeName() ); @@ -1504,7 +1504,7 @@ Foam::meshRefinement::balanceAndRefine // Info<< endl; //} - printMeshInfo(debug, "After refinement " + msg); + printMeshInfo(debug(), "After refinement " + msg); return distMap; } diff --git a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C index d5be28ff9..097b5df7e 100644 --- a/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C +++ b/src/dynamicMesh/dynamicFvMesh/dynamicTopoFvMesh/dynamicTopoFvMeshCoupled.C @@ -56,6 +56,7 @@ Author #include "processorPolyPatch.H" #include "decompositionMethod.H" #include "mapDistributePolyMesh.H" +#include "controlSwitches.H" namespace Foam { @@ -4894,7 +4895,11 @@ bool dynamicTopoFvMesh::checkCoupledBoundaries(bool report) const bool sizeError = false, misMatchError = false; // Check if a geometric tolerance has been specified. - scalar gTol = debug::tolerances("processorMatchTol", 1e-4); + const Foam::debug::tolerancesSwitch gTol + ( + "processorMatchTol", + 1e-4 + ); // Maintain a list of master / neighbour anchors List mAnchors(boundary.size()); @@ -5053,7 +5058,7 @@ bool dynamicTopoFvMesh::checkCoupledBoundaries(bool report) const scalar rMagSf = mag(half1Areas[faceI]); scalar avSf = 0.5 * (fMagSf + rMagSf); - if (mag(fMagSf - rMagSf)/avSf > gTol) + if (mag(fMagSf - rMagSf)/avSf > gTol()) { misMatchError = true; @@ -5071,7 +5076,7 @@ bool dynamicTopoFvMesh::checkCoupledBoundaries(bool report) const Foam::max ( pTol, - gTol * mag(lP[lF[faceI][0]] - lC[faceI]) + gTol() * mag(lP[lF[faceI][0]] - lC[faceI]) ) ); } @@ -5217,7 +5222,7 @@ bool dynamicTopoFvMesh::checkCoupledBoundaries(bool report) const scalar nbrMagSf = mag(fAreas[pI][faceI]); scalar avSf = 0.5 * (magSf + nbrMagSf); - if (mag(magSf - nbrMagSf)/avSf > gTol) + if (mag(magSf - nbrMagSf)/avSf > gTol()) { misMatchError = true; @@ -5236,7 +5241,7 @@ bool dynamicTopoFvMesh::checkCoupledBoundaries(bool report) const Foam::max ( pTol, - gTol * + gTol() * mag ( myPoints[myFaces[faceI][0]] @@ -6116,10 +6121,14 @@ void dynamicTopoFvMesh::buildLocalCoupledMaps() // Check if a geometric tolerance has been specified. const boundBox& box = polyMesh::bounds(); - scalar relTol = debug::tolerances("patchFaceMatchTol", 1e-4); + const Foam::debug::tolerancesSwitch relTol + ( + "patchFaceMatchTol", + 1e-4 + ); // Compute tolerance - scalar tol = relTol * box.mag(); + scalar tol = relTol() * box.mag(); const polyBoundaryMesh& boundary = boundaryMesh(); @@ -6181,7 +6190,7 @@ void dynamicTopoFvMesh::buildLocalCoupledMaps() FatalErrorIn("void dynamicTopoFvMesh::buildLocalCoupledMaps()") << " Failed to match all points" << " within a tolerance of: " << tol << nl - << " relTol: " << relTol << nl + << " relTol: " << relTol() << nl << abort(FatalError); } @@ -6843,10 +6852,14 @@ void dynamicTopoFvMesh::buildProcessorCoupledMaps() const Map