4d7389be730ca272b6f01960f604e909b424ea51
[OpenFOAM-1.5.x.git] / src / finiteVolume / cfdTools / general / MRF / MRFZones.C
blob4d7389be730ca272b6f01960f604e909b424ea51
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "MRFZones.H"
28 #include "Time.H"
29 #include "fvMesh.H"
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 namespace Foam
35     defineTemplateTypeNameAndDebug(IOPtrList<MRFZone>, 0);
38 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
40 Foam::MRFZones::MRFZones(const fvMesh& mesh)
42     IOPtrList<MRFZone>
43     (
44         IOobject
45         (
46             "MRFZones",
47             mesh.time().constant(),
48             mesh,
49             IOobject::MUST_READ,
50             IOobject::NO_WRITE
51         ),
52         MRFZone::iNew(mesh)
53     )
57 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
59 void Foam::MRFZones::addCoriolis(fvVectorMatrix& UEqn) const
61     forAll(*this, i)
62     {
63         operator[](i).addCoriolis(UEqn);
64     }
68 void Foam::MRFZones::relativeFlux(surfaceScalarField& phi) const
70     forAll(*this, i)
71     {
72         operator[](i).relativeFlux(phi);
73     }
77 void Foam::MRFZones::correctBoundaryVelocity(volVectorField& U) const
79     forAll(*this, i)
80     {
81         operator[](i).correctBoundaryVelocity(U);
82     }
86 // ************************************************************************* //