From 54887f621321ea36f8b83ea1a0e30fca3bcd223f Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 3 Feb 2014 13:05:07 +0000 Subject: [PATCH 1/2] Sloshing tutorials: do not update the probe location --- .../ras/sloshingTank2D/system/controlDict | 1 + .../interDyMFoam/ras/sloshingTank2D/system/controlDict | 1 + .../interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict | 1 + .../interDyMFoam/ras/sloshingTank3D/system/controlDict | 1 + .../interDyMFoam/ras/sloshingTank3D3DoF/system/controlDict | 1 + .../interDyMFoam/ras/sloshingTank3D6DoF/system/controlDict | 1 + 6 files changed, 6 insertions(+) diff --git a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/controlDict b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/controlDict index 255b465ca0..b0b75672e3 100644 --- a/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/controlDict +++ b/tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/system/controlDict @@ -64,6 +64,7 @@ functions ( 0 9.95 19.77 ) ( 0 -9.95 19.77 ) ); + fixedLocations false; fields ( p diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict index b9a58d7cc2..ca533da823 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/system/controlDict @@ -64,6 +64,7 @@ functions ( 0 9.95 19.77 ) ( 0 -9.95 19.77 ) ); + fixedLocations false; fields ( p diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict index 252b941da7..06bdec26c6 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/system/controlDict @@ -63,6 +63,7 @@ functions ( 0 9.95 19.77 ) ( 0 -9.95 19.77 ) ); + fixedLocations false; fields ( p diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/controlDict index 35ea234666..5a5e48ec8e 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/controlDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/system/controlDict @@ -64,6 +64,7 @@ functions ( 0 9.95 19.77 ) ( 0 -9.95 19.77 ) ); + fixedLocations false; fields ( p diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/controlDict index 7874ac8ccd..7903a2ea73 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/controlDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/system/controlDict @@ -64,6 +64,7 @@ functions ( 0 9.95 19.77 ) ( 0 -9.95 19.77 ) ); + fixedLocations false; fields ( p diff --git a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/controlDict b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/controlDict index 7874ac8ccd..7903a2ea73 100644 --- a/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/controlDict +++ b/tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/system/controlDict @@ -64,6 +64,7 @@ functions ( 0 9.95 19.77 ) ( 0 -9.95 19.77 ) ); + fixedLocations false; fields ( p From e7effbebb0062db63dcacd672c760576ca00f11b Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 3 Feb 2014 13:48:49 +0000 Subject: [PATCH 2/2] ENH: snappyHexMesh: reset precision --- .../GAMGAgglomeration/GAMGAgglomeration.C | 16 ++++++++++------ .../autoHexMeshDriver/autoLayerDriver.C | 8 ++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index cc2dc1a415..5d9c5be4b2 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -177,22 +177,26 @@ void Foam::GAMGAgglomeration::compactLevels(const label nCreatedLevels) scalar totProfile = returnReduce(profile, sumOp()); + int oldPrecision = Info().precision(4); + Info<< setw(8) << levelI << setw(8) << totNprocs << " " << setw(8) << totNCells/totNprocs << setw(8) << maxNCells << " " - << setw(8) << setprecision(4) << totFaceCellRatio/totNprocs - << setw(8) << setprecision(4) << maxFaceCellRatio + << setw(8) << totFaceCellRatio/totNprocs + << setw(8) << maxFaceCellRatio << " " << setw(8) << scalar(totNInt)/totNprocs << setw(8) << maxNInt << " " - << setw(8) << setprecision(4) << totRatio/totNprocs - << setw(8) << setprecision(4) << maxRatio - << setw(12) << setprecision(4) << totProfile/totNprocs + << setw(8) << totRatio/totNprocs + << setw(8) << maxRatio + << setw(12) << totProfile/totNprocs << nl; + + Info().precision(oldPrecision); } Info<< endl; } diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index de74bbbcca..dd9d7fe2ee 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -1262,6 +1262,8 @@ void Foam::autoLayerDriver::calculateLayerThickness { const polyBoundaryMesh& patches = mesh.boundaryMesh(); + int oldPrecision = Info().precision(); + // Find maximum length of a patch name, for a nicer output label maxPatchNameLen = 0; forAll(patchIDs, i) @@ -1337,7 +1339,7 @@ void Foam::autoLayerDriver::calculateLayerThickness << " " << setw(8) << avgThickness << endl; } - Info<< endl; + Info<< setprecision(oldPrecision) << endl; } } @@ -2476,6 +2478,8 @@ void Foam::autoLayerDriver::printLayerData { const polyBoundaryMesh& pbm = mesh.boundaryMesh(); + int oldPrecision = Info().precision(); + // Find maximum length of a patch name, for a nicer output label maxPatchNameLen = 0; forAll(patchIDs, i) @@ -2554,7 +2558,7 @@ void Foam::autoLayerDriver::printLayerData << " " << setw(8) << 100*avgFraction << endl; } - Info<< endl; + Info<< setprecision(oldPrecision) << endl; }