From 78ee5c8c6c85fde1ffe9f5197007506826b3336d Mon Sep 17 00:00:00 2001 From: graham Date: Fri, 22 Oct 2010 12:42:32 +0100 Subject: [PATCH 1/6] ENH: libgenericPatchFields for subsetMesh. --- .../utilities/mesh/manipulation/subsetMesh/Make/options | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/utilities/mesh/manipulation/subsetMesh/Make/options b/applications/utilities/mesh/manipulation/subsetMesh/Make/options index d27c95d033..969020c4af 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/Make/options +++ b/applications/utilities/mesh/manipulation/subsetMesh/Make/options @@ -4,4 +4,5 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ - -lmeshTools + -lmeshTools \ + -lgenericPatchFields From a67a967d9ac3a2066d06740f2924ccab8c9b7751 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 25 Oct 2010 17:49:04 +0100 Subject: [PATCH 2/6] finiteVolume: Added fvcSmooth which provides field smoothing operations: smooth, sweep and spread --- src/finiteVolume/Make/files | 1 + .../finiteVolume/fvc/fvcSmooth/fvcSmooth.C | 318 ++++++++++++++++++ .../finiteVolume/fvc/fvcSmooth/fvcSmooth.H | 73 ++++ .../finiteVolume/fvc/fvcSmooth/smoothData.H | 204 +++++++++++ .../finiteVolume/fvc/fvcSmooth/smoothDataI.H | 192 +++++++++++ .../finiteVolume/fvc/fvcSmooth/sweepData.H | 205 +++++++++++ .../finiteVolume/fvc/fvcSmooth/sweepDataI.H | 208 ++++++++++++ 7 files changed, 1201 insertions(+) create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothDataI.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H create mode 100644 src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepDataI.H diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 21b90fa409..dc325c1ddf 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -337,6 +337,7 @@ $(laplacianSchemes)/laplacianScheme/laplacianSchemes.C $(laplacianSchemes)/gaussLaplacianScheme/gaussLaplacianSchemes.C finiteVolume/fvc/fvcMeshPhi.C +finiteVolume/fvc/fvcSmooth/fvcSmooth.C general = cfdTools/general $(general)/findRefCell/findRefCell.C diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C new file mode 100644 index 0000000000..c04d16dcc9 --- /dev/null +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/fvcSmooth.C @@ -0,0 +1,318 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd. + \\/ 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 . + +\*---------------------------------------------------------------------------*/ + +#include "fvcSmooth.H" +#include "volFields.H" +#include "FaceCellWave.H" +#include "smoothData.H" +#include "sweepData.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::scalar Foam::smoothData::maxRatio = 1.0; + +void Foam::fvc::smooth +( + volScalarField& field, + const scalar coeff +) +{ + const fvMesh& mesh = field.mesh(); + smoothData::maxRatio = 1 + coeff; + + DynamicList