ATCModelTemplates.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2007-2019 PCOpt/NTUA
9  Copyright (C) 2013-2019 FOSS GP
10  Copyright (C) 2019 OpenCFD Ltd.
11 -------------------------------------------------------------------------------
12 License
13  This file is part of OpenFOAM.
14 
15  OpenFOAM is free software: you can redistribute it and/or modify it
16  under the terms of the GNU General Public License as published by
17  the Free Software Foundation, either version 3 of the License, or
18  (at your option) any later version.
19 
20  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
21  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23  for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
27 
28 \*---------------------------------------------------------------------------*/
29 
30 #include "ATCModel.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 template<class Type>
37 (
39  const labelList& cells
40 )
41 {
43  (
44  IOobject
45  (
46  vf.name() + "Limiter",
47  mesh_.time().timeName(),
48  mesh_,
51  ),
52  mesh_,
53  scalar(1),
54  dimless,
56  );
57 
59 
60  //Limit actual field
61  vf *= limiter;
62 }
63 
64 
65 // ************************************************************************* //
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
Definition: fvPatchField.H:221
void computeLimiter()
Compute limiter based on the cells given by zeroATCcells.
Definition: ATCModel.C:38
const word & name() const noexcept
Return the object name.
Definition: IOobjectI.H:195
Generic GeometricField class.
Definition: areaFieldsFwd.H:50
Ignore writing from objectRegistry::writeObject()
const dimensionSet dimless
Dimensionless.
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:360
tmp< areaScalarField > limiter(const areaScalarField &phi)
Definition: faNVDscheme.C:31
void smoothFieldBasedOnCells(GeometricField< Type, fvPatchField, volMesh > &vf, const labelList &cells)
Smooth an arbitrary field on a given list of cells.
const cellShapeList & cells
const label nSmooth_
Definition: ATCModel.H:87
const fvMesh & mesh_
Definition: ATCModel.H:79
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
Definition: Time.C:714
Nothing to be read.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:172