All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
fvscStencil.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10  Copyright (C) 2016-2019 ISP RAS (www.ispras.ru) UniCFD Group (www.unicfd.ru)
11 -------------------------------------------------------------------------------
12 License
13  This file is part of QGDsolver library, based on OpenFOAM+.
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22  You should have received a copy of the GNU General Public License
23  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 Class
25  Foam::fvsc::fvscStencil
26 Source file
27  fvscStencil.C
28 /*---------------------------------------------------------------------------*\
29 
30 #include "fvMesh.H"
31 #include "regIOobject.H"
32 #include "runTimeSelectionTables.H"
33 #include "surfaceFields.H"
34 
35 #ifndef fvscStencil_H
36 #define fvscStencil_H
37 
38 namespace Foam
39 {
40 
41 namespace fvsc
42 {
43 
44 class fvscStencil : public regIOobject, public refCount
45 {
46 
47 protected:
48 
49  //-
50  const fvMesh& mesh_;
51 
52  //-
53  const Time& runTime_;
54 
55  //-
56  surfaceVectorField nf_;
57 
58  //-
59  static PtrList<fvscStencil> stencils_;
60 
61 public:
62 
63  //-
64  TypeName("fvscStencil");
65 
66  //-
67  declareRunTimeSelectionTable
68  (
69  autoPtr,
70  fvscStencil,
71  components,
72  (
73  const IOobject& io
74  ),
75  (io)
76  );
77 
78  //- Construct from components
79  fvscStencil
80  (
81  const IOobject& io
82  );
83 
84  //- Return a reference to the selected fvscStencil model
85  static autoPtr<fvscStencil> New
86  (
87  const word& name,
88  const fvMesh& mesh
89  );
90 
91  //-
92  //static tmp<fvscStencil> lookupOrNew
93  static fvscStencil& lookupOrNew
94  (
95  const word& nname,
96  const fvMesh& mesh
97  );
98 
99  //-
100  virtual ~fvscStencil();
101 
102  //-
103  virtual tmp<surfaceVectorField> Grad(const volScalarField& vF)
104  {
105  notImplemented("tmp<surfaceVectorField> Grad(const volScalarField& vF)");
106  return tmp<surfaceVectorField>(nullptr);
107  }
108 
109  //-
110  virtual tmp<surfaceTensorField> Grad(const volVectorField& iVF)
111  {
112  notImplemented("tmp<surfaceTensorField> Grad(const volVectorField& vF)");
113  return tmp<surfaceTensorField>(nullptr);
114  }
115 
116  //-
117  virtual tmp<surfaceScalarField> Div(const volVectorField& iVF)
118  {
119  notImplemented("tmp<surfaceScalarField> Grad(const volVectorField& vF)");
120  return tmp<surfaceScalarField>(nullptr);
121  }
122 
123  //-
124  virtual tmp<surfaceVectorField> Div(const volTensorField& iTF)
125  {
126  notImplemented("tmp<surfaceVectorField> Grad(const volTensorField& vF)");
127  return tmp<surfaceVectorField>(nullptr);
128  }
129 
130 
131  virtual bool writeData(Ostream&) const
132  {
133  return true;
134  }
135 };
137 }
138 
139 }
140 
141 #endif
142 
143 //END-OF-FILE
144