1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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 "fvcLaplacian.H"
29 #include "laplacianScheme.H"
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 tmp<GeometricField<Type, fvPatchField, volMesh> >
47 const GeometricField<Type, fvPatchField, volMesh>& vf,
51 return fv::laplacianScheme<Type, scalar>::New
54 vf.mesh().laplacianScheme(name)
60 tmp<GeometricField<Type, fvPatchField, volMesh> >
63 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
67 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
69 fvc::laplacian(tvf(), name)
77 tmp<GeometricField<Type, fvPatchField, volMesh> >
80 const GeometricField<Type, fvPatchField, volMesh>& vf
83 return fvc::laplacian(vf, "laplacian(" + vf.name() + ')');
88 tmp<GeometricField<Type, fvPatchField, volMesh> >
91 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
94 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105 template<class Type, class GType>
106 tmp<GeometricField<Type, fvPatchField, volMesh> >
109 const dimensioned<GType>& gamma,
110 const GeometricField<Type, fvPatchField, volMesh>& vf,
114 return gamma*fvc::laplacian(vf, name);
118 template<class Type, class GType>
119 tmp<GeometricField<Type, fvPatchField, volMesh> >
122 const dimensioned<GType>& gamma,
123 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
127 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
129 fvc::laplacian(gamma, tvf(), name)
136 template<class Type, class GType>
137 tmp<GeometricField<Type, fvPatchField, volMesh> >
140 const dimensioned<GType>& gamma,
141 const GeometricField<Type, fvPatchField, volMesh>& vf
144 return gamma*fvc::laplacian
146 vf, "laplacian(" + gamma.name() + ',' + vf.name() + ')'
151 template<class Type, class GType>
152 tmp<GeometricField<Type, fvPatchField, volMesh> >
155 const dimensioned<GType>& gamma,
156 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
159 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
161 fvc::laplacian(gamma, tvf())
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 template<class Type, class GType>
171 tmp<GeometricField<Type, fvPatchField, volMesh> >
174 const GeometricField<GType, fvPatchField, volMesh>& gamma,
175 const GeometricField<Type, fvPatchField, volMesh>& vf,
179 return fv::laplacianScheme<Type, GType>::New
182 vf.mesh().laplacianScheme(name)
183 )().fvcLaplacian(gamma, vf);
187 template<class Type, class GType>
188 tmp<GeometricField<Type, fvPatchField, volMesh> >
191 const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
192 const GeometricField<Type, fvPatchField, volMesh>& vf,
196 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
198 fvc::laplacian(tgamma(), vf, name)
205 template<class Type, class GType>
206 tmp<GeometricField<Type, fvPatchField, volMesh> >
209 const GeometricField<GType, fvPatchField, volMesh>& gamma,
210 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
214 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
216 fvc::laplacian(gamma, tvf(), name)
223 template<class Type, class GType>
224 tmp<GeometricField<Type, fvPatchField, volMesh> >
227 const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
228 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
232 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
234 fvc::laplacian(tgamma(), tvf(), name)
242 template<class Type, class GType>
243 tmp<GeometricField<Type, fvPatchField, volMesh> >
246 const GeometricField<GType, fvPatchField, volMesh>& gamma,
247 const GeometricField<Type, fvPatchField, volMesh>& vf
250 return fvc::laplacian
254 "laplacian(" + gamma.name() + ',' + vf.name() + ')'
259 template<class Type, class GType>
260 tmp<GeometricField<Type, fvPatchField, volMesh> >
263 const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
264 const GeometricField<Type, fvPatchField, volMesh>& vf
267 return fvc::laplacian
271 "laplacian(" + tgamma().name() + ',' + vf.name() + ')'
276 template<class Type, class GType>
277 tmp<GeometricField<Type, fvPatchField, volMesh> >
280 const GeometricField<GType, fvPatchField, volMesh>& gamma,
281 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
284 return fvc::laplacian
288 "laplacian(" + gamma.name() + ',' + tvf().name() + ')'
293 template<class Type, class GType>
294 tmp<GeometricField<Type, fvPatchField, volMesh> >
297 const tmp<GeometricField<GType, fvPatchField, volMesh> >& tgamma,
298 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
301 return fvc::laplacian
305 "laplacian(" + tgamma().name() + ',' + tvf().name() + ')'
310 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
312 template<class Type, class GType>
313 tmp<GeometricField<Type, fvPatchField, volMesh> >
316 const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
317 const GeometricField<Type, fvPatchField, volMesh>& vf,
321 return fv::laplacianScheme<Type, GType>::New
324 vf.mesh().laplacianScheme(name)
325 )().fvcLaplacian(gamma, vf);
329 template<class Type, class GType>
330 tmp<GeometricField<Type, fvPatchField, volMesh> >
333 const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
334 const GeometricField<Type, fvPatchField, volMesh>& vf,
338 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
340 fvc::laplacian(tgamma(), vf, name)
347 template<class Type, class GType>
348 tmp<GeometricField<Type, fvPatchField, volMesh> >
351 const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
352 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
356 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
358 fvc::laplacian(gamma, tvf(), name)
365 template<class Type, class GType>
366 tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
368 const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
369 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
373 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
375 fvc::laplacian(tgamma(), tvf(), name)
383 template<class Type, class GType>
384 tmp<GeometricField<Type, fvPatchField, volMesh> >
387 const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
388 const GeometricField<Type, fvPatchField, volMesh>& vf
391 return fvc::laplacian
395 "laplacian(" + gamma.name() + ',' + vf.name() + ')'
400 template<class Type, class GType>
401 tmp<GeometricField<Type, fvPatchField, volMesh> >
404 const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
405 const GeometricField<Type, fvPatchField, volMesh>& vf
408 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
410 fvc::laplacian(tgamma(), vf)
417 template<class Type, class GType>
418 tmp<GeometricField<Type, fvPatchField, volMesh> >
421 const GeometricField<GType, fvsPatchField, surfaceMesh>& gamma,
422 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
425 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
427 fvc::laplacian(gamma, tvf())
434 template<class Type, class GType>
435 tmp<GeometricField<Type, fvPatchField, volMesh> > laplacian
437 const tmp<GeometricField<GType, fvsPatchField, surfaceMesh> >& tgamma,
438 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
441 tmp<GeometricField<Type, fvPatchField, volMesh> > Laplacian
443 fvc::laplacian(tgamma(), tvf())
451 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
453 } // End namespace fvc
455 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
457 } // End namespace Foam
459 // ************************************************************************* //