From 4156c354c34ff04cf012de6c2d19d7e35c0ea6cb Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 4 Nov 2011 10:28:49 +0000 Subject: [PATCH 1/5] STYLE: controlDict: remove unused entries --- tutorials/incompressible/icoFoam/cavity/system/controlDict | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tutorials/incompressible/icoFoam/cavity/system/controlDict b/tutorials/incompressible/icoFoam/cavity/system/controlDict index 8016db385c..d2fa09cc52 100644 --- a/tutorials/incompressible/icoFoam/cavity/system/controlDict +++ b/tutorials/incompressible/icoFoam/cavity/system/controlDict @@ -31,10 +31,6 @@ writeControl timeStep; writeInterval 20; -//- Additional dump every hour of cpuTime for e.g. restarts -//secondaryWriteControl cpuTime; -//secondaryWriteInterval 3600; - purgeWrite 0; writeFormat ascii; From 727b278fde49c597804e4c175c5ba7a277998e11 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 7 Nov 2011 13:43:57 +0000 Subject: [PATCH 2/5] ENH: PairCollision: reference instead of copy --- .../Kinematic/CollisionModel/PairCollision/PairCollision.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index 7851be5e70..4910faa51c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -179,7 +179,7 @@ void Foam::PairCollision::wallInteraction() const labelListList& dil = il_.dil(); - const labelListList directWallFaces = il_.dwfil(); + const labelListList& directWallFaces = il_.dwfil(); const labelList& patchID = mesh.boundaryMesh().patchID(); From 83ec8559d60d9f3597adb4e41f670ca932dd36b0 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 8 Nov 2011 09:31:49 +0000 Subject: [PATCH 3/5] ENH: GAMGAgglomeration: test app to dump agglomeration of GAMG --- .../test/GAMGAgglomeration/Make/files | 3 + .../test/GAMGAgglomeration/Make/options | 5 + .../Test-GAMGAgglomeration.C | 115 ++++++++++++++++++ 3 files changed, 123 insertions(+) create mode 100644 applications/test/GAMGAgglomeration/Make/files create mode 100644 applications/test/GAMGAgglomeration/Make/options create mode 100644 applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C diff --git a/applications/test/GAMGAgglomeration/Make/files b/applications/test/GAMGAgglomeration/Make/files new file mode 100644 index 0000000000..e6ad2af5d2 --- /dev/null +++ b/applications/test/GAMGAgglomeration/Make/files @@ -0,0 +1,3 @@ +Test-GAMGAgglomeration.C + +EXE = $(FOAM_USER_APPBIN)/Test-GAMGAgglomeration diff --git a/applications/test/GAMGAgglomeration/Make/options b/applications/test/GAMGAgglomeration/Make/options new file mode 100644 index 0000000000..fa15f12452 --- /dev/null +++ b/applications/test/GAMGAgglomeration/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lfiniteVolume diff --git a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C new file mode 100644 index 0000000000..1cfe12db48 --- /dev/null +++ b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C @@ -0,0 +1,115 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + Test-GAMGAgglomeration + +Description + Test application for GAMG agglomeration. Hardcoded to expect GAMG on p. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "GAMGAgglomeration.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Main program: + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + + const fvSolution& sol = static_cast(mesh); + const dictionary& pDict = sol.subDict("solvers").subDict("p"); + + const GAMGAgglomeration& agglom = GAMGAgglomeration::New + ( + mesh, + pDict + ); + + labelList cellToCoarse(identity(mesh.nCells())); + labelListList coarseToCell(invertOneToMany(mesh.nCells(), cellToCoarse)); + + for (label level = 0; level < agglom.size(); level++) + { + runTime.setTime(dimensionedScalar("time", dimTime, level), level); + + Info<< "Level = " << runTime.timeName() << nl << endl; + + const labelList& addr = agglom.restrictAddressing(level); + label coarseSize = max(addr)+1; + + Info<< " current size : " + << returnReduce(addr.size(), sumOp