LESfilter.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::LESfilter
26 
27 Description
28  Abstract class for LES filters
29 
30 SourceFiles
31  LESfilter.C
32  newFilter.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef LESfilter_H
37 #define LESfilter_H
38 
39 #include "volFields.H"
40 #include "typeInfo.H"
41 #include "autoPtr.H"
42 #include "runTimeSelectionTables.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 class fvMesh;
50 
51 /*---------------------------------------------------------------------------*\
52  Class LESfilter Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class LESfilter
56 {
57  // Private data
58 
59  const fvMesh& mesh_;
60 
61 
62  // Private Member Functions
63 
64  // Disallow default bitwise copy construct and assignment
65  LESfilter(const LESfilter&);
66  void operator=(const LESfilter&);
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("LESfilter");
73 
74 
75  // Declare run-time constructor selection table
76 
78  (
79  autoPtr,
80  LESfilter,
81  dictionary,
82  (
83  const fvMesh& mesh,
84  const dictionary& LESfilterDict
85  ),
86  (mesh, LESfilterDict)
87  );
88 
89 
90  // Constructors
91 
92  //- Construct from components
93  LESfilter(const fvMesh& mesh)
94  :
95  mesh_(mesh)
96  {}
97 
98 
99  // Selectors
100 
101  //- Return a reference to the selected LES filter
102  static autoPtr<LESfilter> New
103  (
104  const fvMesh&,
105  const dictionary&,
106  const word& filterDictName="filter"
107  );
108 
109 
110  //- Destructor
111  virtual ~LESfilter()
112  {}
113 
114 
115  // Member Functions
116 
117  //- Return mesh reference
118  const fvMesh& mesh() const
119  {
120  return mesh_;
121  }
122 
123  //- Read the LESfilter dictionary
124  virtual void read(const dictionary&) = 0;
125 
126 
127  // Member Operators
128 
129  virtual tmp<volScalarField> operator()
130  (
131  const tmp<volScalarField>&
132  ) const = 0;
133 
134  virtual tmp<volVectorField> operator()
135  (
136  const tmp<volVectorField>&
137  ) const = 0;
138 
139  virtual tmp<volSymmTensorField> operator()
140  (
142  ) const = 0;
143 
144  virtual tmp<volTensorField> operator()
145  (
146  const tmp<volTensorField>&
147  ) const = 0;
148 };
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace Foam
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 #endif
158 
159 // ************************************************************************* //
volFields.H
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
typeInfo.H
Foam::LESfilter::mesh_
const fvMesh & mesh_
Definition: LESfilter.H:58
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::LESfilter::mesh
const fvMesh & mesh() const
Return mesh reference.
Definition: LESfilter.H:117
Foam::LESfilter::read
virtual void read(const dictionary &)=0
Read the LESfilter dictionary.
Foam::LESfilter::TypeName
TypeName("LESfilter")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::LESfilter
Abstract class for LES filters.
Definition: LESfilter.H:54
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::LESfilter::LESfilter
LESfilter(const LESfilter &)
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::LESfilter::New
static autoPtr< LESfilter > New(const fvMesh &, const dictionary &, const word &filterDictName="filter")
Return a reference to the selected LES filter.
Definition: LESfilter.C:41
Foam::LESfilter::~LESfilter
virtual ~LESfilter()
Destructor.
Definition: LESfilter.H:110
Foam::LESfilter::LESfilter
LESfilter(const fvMesh &mesh)
Construct from components.
Definition: LESfilter.H:92
Foam::LESfilter::operator=
void operator=(const LESfilter &)
Foam::LESfilter::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, LESfilter, dictionary,(const fvMesh &mesh, const dictionary &LESfilterDict),(mesh, LESfilterDict))
autoPtr.H