steadyStateD2dt2Scheme.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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 \*---------------------------------------------------------------------------*/
25 
26 #include "steadyStateD2dt2Scheme.H"
27 #include "fvcDiv.H"
28 #include "fvMatrices.H"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 
37 namespace fv
38 {
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 template<class Type>
43 tmp<GeometricField<Type, fvPatchField, volMesh>>
45 (
47 )
48 {
50  (
52  (
53  IOobject
54  (
55  "d2dt2("+vf.name()+')',
56  mesh().time().timeName(),
57  mesh(),
60  ),
61  mesh(),
63  (
64  "0",
66  Zero
67  )
68  )
69  );
70 }
71 
72 
73 template<class Type>
76 (
77  const volScalarField& rho,
79 )
80 {
82  (
84  (
85  IOobject
86  (
87  "d2dt2("+rho.name()+','+vf.name()+')',
88  mesh().time().timeName(),
89  mesh(),
92  ),
93  mesh(),
95  (
96  "0",
98  Zero
99  )
100  )
101  );
102 }
103 
104 
105 template<class Type>
108 (
110 )
111 {
112  tmp<fvMatrix<Type>> tfvm
113  (
114  new fvMatrix<Type>
115  (
116  vf,
118  )
119  );
120 
121  return tfvm;
122 }
123 
124 
125 template<class Type>
128 (
129  const dimensionedScalar& rho,
131 )
132 {
133  tmp<fvMatrix<Type>> tfvm
134  (
135  new fvMatrix<Type>
136  (
137  vf,
139  )
140  );
141 
142  return tfvm;
143 }
144 
145 
146 template<class Type>
149 (
150  const volScalarField& rho,
152 )
153 {
154  tmp<fvMatrix<Type>> tfvm
155  (
156  new fvMatrix<Type>
157  (
158  vf,
160  )
161  );
162 
163  return tfvm;
164 }
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace fv
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // ************************************************************************* //
const word & name() const
Return name.
Definition: IOobject.H:295
tmp< fvMatrix< Type > > fvmD2dt2(const GeometricField< Type, fvPatchField, volMesh > &)
const dimensionSet dimVol(dimVolume)
Definition: dimensionSets.H:59
Generic GeometricField class.
Generic dimensioned Type class.
const dimensionSet & dimensions() const
Return dimensions.
dynamicFvMesh & mesh
labelList fv(nPoints)
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:72
static const zero Zero
Definition: zero.H:97
Calculate the divergence of the given field.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcD2dt2(const GeometricField< Type, fvPatchField, volMesh > &)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
Definition: dimensionSets.H:51
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const dimensionSet & dimensions() const
Return const reference to dimensions.
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
Namespace for OpenFOAM.