fusedGaussLaplacianSchemes.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2024 M. Janssens
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
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 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
30 #include "fvMesh.H"
31 
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33 
34 makeFvLaplacianScheme(fusedGaussLaplacianScheme)
35 
36 #define declareFvmLaplacianScalarGamma(Type) \
37  \
38 template<> \
39 Foam::tmp<Foam::fvMatrix<Foam::Type>> \
40 Foam::fv::fusedGaussLaplacianScheme<Foam::Type, Foam::scalar>:: \
41 fvmLaplacian \
42 ( \
43  const GeometricField<scalar, fvsPatchField, surfaceMesh>& gamma, \
44  const GeometricField<Type, fvPatchField, volMesh>& vf \
45 ) \
46 { \
47  DebugPout<< "fusedGaussLaplacianScheme::fvmLaplacian on " << vf.name() \
48  << " with scalar gamma " << gamma.name() << endl; \
49  \
50  const fvMesh& mesh = this->mesh(); \
51  \
52  GeometricField<scalar, fvsPatchField, surfaceMesh> gammaMagSf \
53  ( \
54  gamma*mesh.magSf() \
55  ); \
56  \
57  tmp<fvMatrix<Type>> tfvm = fvmLaplacianUncorrected \
58  ( \
59  gammaMagSf, \
60  this->tsnGradScheme_().deltaCoeffs(vf), \
61  vf \
62  ); \
63  fvMatrix<Type>& fvm = tfvm.ref(); \
64  \
65  if (this->tsnGradScheme_().corrected()) \
66  { \
67  if (mesh.fluxRequired(vf.name())) \
68  { \
69  fvm.faceFluxCorrectionPtr() = std::make_unique \
70  < \
71  GeometricField<Type, fvsPatchField, surfaceMesh> \
72  > \
73  ( \
74  gammaMagSf*this->tsnGradScheme_().correction(vf) \
75  ); \
76  \
77  fvm.source() -= \
78  mesh.V()* \
79  fvc::div \
80  ( \
81  *fvm.faceFluxCorrectionPtr() \
82  )().primitiveField(); \
83  } \
84  else \
85  { \
86  fvm.source() -= \
87  mesh.V()* \
88  fvc::div \
89  ( \
90  gammaMagSf*this->tsnGradScheme_().correction(vf) \
91  )().primitiveField(); \
92  } \
93  } \
94  \
95  return tfvm; \
96 } \
97  \
98  \
99 template<> \
100 Foam::tmp<Foam::GeometricField<Foam::Type, Foam::fvPatchField, Foam::volMesh>> \
101 Foam::fv::fusedGaussLaplacianScheme<Foam::Type, Foam::scalar>:: \
102 fvcLaplacian \
103 ( \
104  const GeometricField<scalar, fvsPatchField, surfaceMesh>& gamma, \
105  const GeometricField<Type, fvPatchField, volMesh>& vf \
106 ) \
107 { \
108  DebugPout<< "fvcLaplacian on " << vf.name() \
109  << " with scalar gamma " << gamma.name() << endl; \
110  \
111  const fvMesh& mesh = this->mesh(); \
112  \
113  tmp<GeometricField<Type, fvPatchField, volMesh>> tLaplacian \
114  ( \
115  fvc::div(gamma*this->tsnGradScheme_().snGrad(vf)*mesh.magSf()) \
116  ); \
117  \
118  tLaplacian.ref().rename \
119  ( \
120  "laplacian(" + gamma.name() + ',' + vf.name() + ')' \
121  ); \
122  \
123  return tLaplacian; \
124 }
125 
126 
127 template<>
128 Foam::tmp
129 <
131 >
133 (
134  const GeometricField<scalar, fvPatchField, volMesh>& gamma,
135  const GeometricField<scalar, fvPatchField, volMesh>& vf
136 )
137 {
138  typedef scalar Type;
139  typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
140  typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
141  typedef typename outerProduct<vector, Type>::type GradType;
142  typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
143 
144  DebugPout
145  << "fusedGaussLaplacianScheme<scalar, scalar>::fvcLaplacian"
146  << " on " << vf.name() << " with gamma " << gamma.name() << endl;
147 
148  const fvMesh& mesh = vf.mesh();
149 
150  tmp<FieldType> tresult
151  (
152  new FieldType
153  (
154  IOobject
155  (
156  "laplacian(" + vf.name() + ')',
157  vf.instance(),
158  mesh,
159  IOobject::NO_READ,
160  IOobject::NO_WRITE
161  ),
162  mesh,
163  dimensioned<Type>
164  (
165  gamma.dimensions()*vf.dimensions()/dimArea, Zero
166  ),
168  )
169  );
170  FieldType& result = tresult.ref();
171 
172  const auto tweights(this->tinterpGammaScheme_().weights(gamma));
173  const auto& weights = tweights();
174  const auto tdeltaCoeffs(this->tsnGradScheme_().deltaCoeffs(vf));
175  const auto& deltaCoeffs = tdeltaCoeffs();
176 
177  if (this->tsnGradScheme_().corrected())
178  {
179  // Calculate sn gradient
180  tmp<SurfaceFieldType> tfaceGrad
181  (
182  new SurfaceFieldType
183  (
184  IOobject
185  (
186  "snGradCorr("+vf.name()+')',
187  vf.instance(),
188  mesh,
189  IOobject::NO_READ,
190  IOobject::NO_WRITE
191  ),
192  mesh,
193  vf.dimensions()
194  )
195  );
196 
197  {
198  // Calculate gradient
199  tmp<GradFieldType> tgGrad
200  (
202  (
203  mesh,
204  mesh.gradScheme("grad(" + vf.name() + ')')
205  )().grad(vf, "grad(" + vf.name() + ')')
206  );
207  const auto& gGrad = tgGrad();
208 
209  // Doing a dotinterpolate with nonOrthCorrectionVectors
210  const auto dotInterpolate = [&]
211  (
212  const vector& area,
213  const scalar lambda,
214 
215  const GradType& ownVal,
216  const GradType& neiVal,
217 
218  const vector& dotVector,
219 
220  Type& result
221  )
222  {
223  result = dotVector&(lambda*(ownVal - neiVal) + neiVal);
224  };
225 
227  (
228  mesh.surfaceInterpolation::weights(), // linear interpolation
229  gGrad, // volume field
230  mesh.nonOrthCorrectionVectors(),// surface multiplier
232  tfaceGrad.ref()
233  );
234  }
235  const auto& faceGrad = tfaceGrad();
236 
237  const auto snGrad = [&]
238  (
239  const vector& Sf,
240 
241  const scalar weight,
242  const scalar ownGamma,
243  const scalar neiGamma,
244 
245  const scalar dc,
246  const Type& ownVal,
247  const Type& neiVal,
248 
249  const Type& correction
250  ) -> Type
251  {
252  const auto snGrad(dc*(neiVal-ownVal) + correction);
253  const scalar faceGamma(weight*(ownGamma-neiGamma)+neiGamma);
254  return mag(Sf)*faceGamma*snGrad;
255  };
256 
258  (
259  weights, // gamma weights
260  gamma,
261 
262  deltaCoeffs,
263  vf,
264 
265  faceGrad, // face-based addition
266 
267  snGrad,
268 
269  result,
270  false // avoid boundary evaluation until volume division
271  );
272  }
273  else
274  {
275  const auto snGrad = [&]
276  (
277  const vector& Sf,
278 
279  const scalar weight,
280  const scalar ownGamma,
281  const scalar neiGamma,
282 
283  const scalar dc,
284  const Type& ownVal,
285  const Type& neiVal
286  ) -> Type
287  {
288  const auto snGrad(dc*(neiVal-ownVal));
289  const scalar faceGamma(weight*(ownGamma-neiGamma)+neiGamma);
290  return mag(Sf)*faceGamma*snGrad;
291  };
292 
294  (
295  weights,
296  gamma,
297 
298  deltaCoeffs,
299  vf,
300 
301  snGrad,
302 
303  result,
304  false // avoid boundary evaluation until volume division
305  );
306  }
307 
308  result.primitiveFieldRef() /= mesh.V();
309  result.correctBoundaryConditions();
310 
311  return tresult;
312 }
313 
314 
315 template<>
316 Foam::tmp
317 <
319 >
321 (
322  const GeometricField<scalar, fvPatchField, volMesh>& gamma,
323  const GeometricField<vector, fvPatchField, volMesh>& vf
324 )
325 {
326  DebugPout
327  << "fusedGaussLaplacianScheme<vector, scalar>::fvcLaplacian"
328  << " on " << vf.name() << " with gamma " << gamma.name() << endl;
329 
330  typedef vector Type;
331  typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
332  typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
333  typedef typename outerProduct<vector, Type>::type GradType;
334  typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
335 
336  const fvMesh& mesh = vf.mesh();
337 
338  tmp<FieldType> tresult
339  (
340  new FieldType
341  (
342  IOobject
343  (
344  "laplacian(" + vf.name() + ')',
345  vf.instance(),
346  mesh,
347  IOobject::NO_READ,
348  IOobject::NO_WRITE
349  ),
350  mesh,
351  dimensioned<Type>
352  (
353  gamma.dimensions()*vf.dimensions()/dimArea, Zero
354  ),
356  )
357  );
358  FieldType& result = tresult.ref();
359 
360  const auto tweights(this->tinterpGammaScheme_().weights(gamma));
361  const auto& weights = tweights();
362  const auto tdeltaCoeffs(this->tsnGradScheme_().deltaCoeffs(vf));
363  const auto& deltaCoeffs = tdeltaCoeffs();
364 
365  if (this->tsnGradScheme_().corrected())
366  {
367  // Calculate sn gradient
368  tmp<SurfaceFieldType> tfaceGrad
369  (
370  new SurfaceFieldType
371  (
372  IOobject
373  (
374  "snGradCorr("+vf.name()+')',
375  vf.instance(),
376  mesh,
377  IOobject::NO_READ,
378  IOobject::NO_WRITE
379  ),
380  mesh,
381  vf.dimensions()
382  )
383  );
384 
385  {
386  // Calculate gradient
387  tmp<GradFieldType> tgGrad
388  (
390  (
391  mesh,
392  mesh.gradScheme("grad(" + vf.name() + ')')
393  )().grad(vf, "grad(" + vf.name() + ')')
394  );
395  const auto& gGrad = tgGrad();
396 
397  // Doing a dotinterpolate with nonOrthCorrectionVectors
398  const auto dotInterpolate = [&]
399  (
400  const vector& area,
401  const scalar lambda,
402 
403  const GradType& ownVal,
404  const GradType& neiVal,
405 
406  const vector& dotVector,
407 
408  Type& result
409  )
410  {
411  result = dotVector&(lambda*(ownVal - neiVal) + neiVal);
412  };
413 
415  (
416  mesh.surfaceInterpolation::weights(), // linear interpolation
417  gGrad, // volume field
418  mesh.nonOrthCorrectionVectors(),// surface multiplier
420  tfaceGrad.ref()
421  );
422  }
423  const auto& faceGrad = tfaceGrad();
424 
425  const auto snGrad = [&]
426  (
427  const vector& Sf,
428 
429  const scalar weight,
430  const scalar ownGamma,
431  const scalar neiGamma,
432 
433  const scalar dc,
434  const Type& ownVal,
435  const Type& neiVal,
436 
437  const Type& correction
438  ) -> Type
439  {
440  const auto snGrad(dc*(neiVal-ownVal) + correction);
441  const scalar faceGamma(weight*(ownGamma-neiGamma)+neiGamma);
442  return mag(Sf)*faceGamma*snGrad;
443  };
444 
446  (
447  weights, // gamma weights
448  gamma,
449 
450  deltaCoeffs,
451  vf,
452 
453  faceGrad, // face-based addition
454 
455  snGrad,
456 
457  result,
458  false // avoid boundary evaluation until volume division
459  );
460  }
461  else
462  {
463  const auto snGrad = [&]
464  (
465  const vector& Sf,
466 
467  const scalar weight,
468  const scalar ownGamma,
469  const scalar neiGamma,
470 
471  const scalar dc,
472  const Type& ownVal,
473  const Type& neiVal
474  ) -> Type
475  {
476  const auto snGrad(dc*(neiVal-ownVal));
477  const scalar faceGamma(weight*(ownGamma-neiGamma)+neiGamma);
478  return mag(Sf)*faceGamma*snGrad;
479  };
480 
482  (
483  weights, // gamma weights
484  gamma,
485 
486  deltaCoeffs,
487  vf,
488 
489  snGrad,
490 
491  result,
492  false // avoid boundary evaluation until volume division
493  );
494  }
495 
496  result.primitiveFieldRef() /= mesh.V();
497  result.correctBoundaryConditions();
498 
499  return tresult;
500 }
501 
502 
503 template<>
506 (
509 )
510 {
511  // TBD
512  DebugPout
513  << "fusedGaussLaplacianScheme<scalar, scalar>::fvmLaplacian"
514  << " on " << vf.name() << " with gamma " << gamma.name() << endl;
515  return fvmLaplacian(this->tinterpGammaScheme_().interpolate(gamma)(), vf);
516 }
517 
518 
519 template<>
522 (
525 )
526 {
527  // TBD
528  DebugPout
529  << "fusedGaussLaplacianScheme<vector, scalar>::fvmLaplacian"
530  << " on " << vf.name() << " with gamma " << gamma.name() << endl;
531  return fvmLaplacian(this->tinterpGammaScheme_().interpolate(gamma)(), vf);
532 }
533 
534 
535 template<>
536 Foam::tmp
537 <
539 >
541 (
543 )
544 {
545  typedef scalar Type;
546 
548  typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
549  typedef typename outerProduct<vector, Type>::type GradType;
551 
552  const fvMesh& mesh = vf.mesh();
553 
554  tmp<FieldType> tresult
555  (
556  new FieldType
557  (
558  IOobject
559  (
560  "laplacian(" + vf.name() + ')',
561  vf.instance(),
562  mesh,
563  IOobject::NO_READ,
564  IOobject::NO_WRITE
565  ),
566  mesh,
569  )
570  );
571  FieldType& result = tresult.ref();
572 
573  DebugPout
574  << "fusedGaussLaplacianScheme<scalar, GType>::fvcLaplacian on "
575  << vf.name()
576  << " to generate " << result.name() << endl;
577 
578 
579  const auto tdeltaCoeffs(this->tsnGradScheme_().deltaCoeffs(vf));
580  const auto& deltaCoeffs = tdeltaCoeffs();
581 
582 
583  if (this->tsnGradScheme_().corrected())
584  {
585  // Calculate sn gradient
586  tmp<SurfaceFieldType> tfaceGrad
587  (
588  new SurfaceFieldType
589  (
590  IOobject
591  (
592  "snGradCorr("+vf.name()+')',
593  vf.instance(),
594  mesh,
595  IOobject::NO_READ,
596  IOobject::NO_WRITE
597  ),
598  mesh,
599  vf.dimensions()
600  )
601  );
602 
603  {
604  // Calculate gradient
605  tmp<GradFieldType> tgGrad
606  (
608  (
609  mesh,
610  mesh.gradScheme("grad(" + vf.name() + ')')
611  )().grad(vf, "grad(" + vf.name() + ')')
612  );
613  const auto& gGrad = tgGrad();
614 
615  // Doing a dotinterpolate with nonOrthCorrectionVectors
616  const auto dotInterpolate = [&]
617  (
618  const vector& area,
619  const scalar lambda,
620 
621  const GradType& ownVal,
622  const GradType& neiVal,
623 
624  const vector& dotVector,
625 
626  Type& result
627  )
628  {
629  result = dotVector&(lambda*(ownVal - neiVal) + neiVal);
630  };
631 
633  (
634  mesh.surfaceInterpolation::weights(), // linear interpolation
635  gGrad, // volume field
636  mesh.nonOrthCorrectionVectors(),// surface multiplier
638  tfaceGrad.ref()
639  );
640  }
641  const auto& faceGrad = tfaceGrad();
642 
643  const auto snGrad = [&]
644  (
645  const vector& Sf,
646  const scalar dc,
647  const Type& ownVal,
648  const Type& neiVal,
649  const Type& correction
650  ) -> Type
651  {
652  const auto snGrad(dc*(neiVal-ownVal) + correction);
653  return mag(Sf)*snGrad;
654  };
655 
657  (
658  deltaCoeffs,
659  vf,
660  faceGrad, // face-based addition
661  snGrad,
662  result,
663  false // avoid boundary evaluation until volume division
664  );
665  }
666  else
667  {
668  const auto snGrad = [&]
669  (
670  const vector& Sf,
671  const scalar dc,
672  const Type& ownVal,
673  const Type& neiVal
674  ) -> Type
675  {
676  const auto snGrad(dc*(neiVal-ownVal));
677  return mag(Sf)*snGrad;
678  };
679 
681  (
682  deltaCoeffs,
683  vf,
684  snGrad,
685  result,
686  false // avoid boundary evaluation until volume division
687  );
688  }
689 
690  result.primitiveFieldRef() /= mesh.V();
691  result.correctBoundaryConditions();
692 
693  return tresult;
694 }
695 
696 
697 template<>
698 Foam::tmp
699 <
701 >
703 (
704  const GeometricField<vector, fvPatchField, volMesh>& vf
705 )
706 {
707  typedef vector Type;
708 
709  typedef GeometricField<Type, fvPatchField, volMesh> FieldType;
710  typedef GeometricField<Type, fvsPatchField, surfaceMesh> SurfaceFieldType;
711  typedef typename outerProduct<vector, Type>::type GradType;
712  typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
713 
714  const fvMesh& mesh = vf.mesh();
715 
716  tmp<FieldType> tresult
717  (
718  new FieldType
719  (
720  IOobject
721  (
722  "laplacian(" + vf.name() + ')',
723  vf.instance(),
724  mesh,
725  IOobject::NO_READ,
726  IOobject::NO_WRITE
727  ),
728  mesh,
729  dimensioned<Type>(vf.dimensions()/dimArea, Zero),
731  )
732  );
733  FieldType& result = tresult.ref();
734 
735  DebugPout
736  << "fusedGaussLaplacianScheme<vector, GType>::fvcLaplacian on "
737  << vf.name()
738  << " to generate " << result.name() << endl;
739 
740 
741  const auto tdeltaCoeffs(this->tsnGradScheme_().deltaCoeffs(vf));
742  const auto& deltaCoeffs = tdeltaCoeffs();
743 
744 
745  if (this->tsnGradScheme_().corrected())
746  {
747  // Calculate sn gradient
748  tmp<SurfaceFieldType> tfaceGrad
749  (
750  new SurfaceFieldType
751  (
752  IOobject
753  (
754  "snGradCorr("+vf.name()+')',
755  vf.instance(),
756  mesh,
757  IOobject::NO_READ,
758  IOobject::NO_WRITE
759  ),
760  mesh,
761  vf.dimensions()
762  )
763  );
764 
765  {
766  // Calculate gradient
767  tmp<GradFieldType> tgGrad
768  (
770  (
771  mesh,
772  mesh.gradScheme("grad(" + vf.name() + ')')
773  )().grad(vf, "grad(" + vf.name() + ')')
774  );
775  const auto& gGrad = tgGrad();
776 
777  // Doing a dotinterpolate with nonOrthCorrectionVectors
778  const auto dotInterpolate = [&]
779  (
780  const vector& area,
781  const scalar lambda,
782 
783  const GradType& ownVal,
784  const GradType& neiVal,
785 
786  const vector& dotVector,
787 
788  Type& result
789  )
790  {
791  result = dotVector&(lambda*(ownVal - neiVal) + neiVal);
792  };
793 
795  (
796  mesh.surfaceInterpolation::weights(), // linear interpolation
797  gGrad, // volume field
798  mesh.nonOrthCorrectionVectors(),// surface multiplier
800  tfaceGrad.ref()
801  );
802  }
803  const auto& faceGrad = tfaceGrad();
804 
805  const auto snGrad = [&]
806  (
807  const vector& Sf,
808  const scalar dc,
809  const Type& ownVal,
810  const Type& neiVal,
811  const Type& correction
812  ) -> Type
813  {
814  const auto snGrad(dc*(neiVal-ownVal) + correction);
815  return mag(Sf)*snGrad;
816  };
817 
819  (
820  deltaCoeffs,
821  vf,
822  faceGrad, // face-based addition
823  snGrad,
824  result,
825  false // avoid boundary evaluation until volume division
826  );
827  }
828  else
829  {
830  const auto snGrad = [&]
831  (
832  const vector& Sf,
833  const scalar dc,
834  const Type& ownVal,
835  const Type& neiVal
836  ) -> Type
837  {
838  const auto snGrad(dc*(neiVal-ownVal));
839  return mag(Sf)*snGrad;
840  };
841 
843  (
844  deltaCoeffs,
845  vf,
846  snGrad,
847  result,
848  false // avoid boundary evaluation until volume division
849  );
850  }
851 
852  result.primitiveFieldRef() /= mesh.V();
853  result.correctBoundaryConditions();
855  return tresult;
856 }
857 
858 
864 
865 
866 // ************************************************************************* //
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix by subtracting the matrix multiplied by the current fi...
type
Types of root.
Definition: Roots.H:52
makeFvLaplacianScheme(fusedGaussLaplacianScheme)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const word & name() const noexcept
Return the object name.
Definition: IOobjectI.H:195
static tmp< GeometricField< Type, faePatchField, edgeMesh > > interpolate(const GeometricField< Type, faPatchField, areaMesh > &tvf, const edgeScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Definition: products.H:118
Generic GeometricField class.
Generic dimensioned Type class.
dynamicFvMesh & mesh
const wordList area
Standard area field types (scalar, vector, tensor, etc)
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
virtual tmp< fvMatrix< Type > > fvmLaplacian(const GeometricField< GType, fvsPatchField, surfaceMesh > &, const GeometricField< Type, fvPatchField, volMesh > &)
virtual tmp< GeometricField< Type, fvPatchField, volMesh > > fvcLaplacian(const GeometricField< Type, fvPatchField, volMesh > &)
Vector< scalar > vector
Definition: vector.H:57
const Mesh & mesh() const noexcept
Return mesh.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const fileName & instance() const noexcept
Read access to instance path component.
Definition: IOobjectI.H:266
void surfaceSnSum(const surfaceScalarField &deltaCoeffs, const GeometricField< Type, fvPatchField, volMesh > &vf, const CellToFaceOp &cop, GeometricField< ResultType, fvPatchField, volMesh > &result, const bool doCorrectBoundaryConditions)
sum of snGrad
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
#define DebugPout
Report an information message using Foam::Pout.
#define declareFvmLaplacianScalarGamma(Type)
const scalar gamma
Definition: EEqn.H:9
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Tensor of scalars, i.e. Tensor<scalar>.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Definition: IOobject.H:180
const word extrapolatedCalculatedType
A combined zero-gradient and calculated patch field type.
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
Definition: fvcSnGrad.C:40
const dimensionSet dimArea(sqr(dimLength))
Definition: dimensionSets.H:57
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
Definition: facGrad.C:51
const dimensionSet & dimensions() const noexcept
Return dimensions.
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:127