Loading...
Searching...
No Matches
correctedLnGrad.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) 2016-2017 Wikki Ltd
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
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
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28#include "areaFields.H"
29#include "edgeFields.H"
30#include "gaussFaGrad.H"
31
32// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
33
34namespace Foam
35{
36
37// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39namespace fa
40{
41
42// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
43
44template<class Type>
46{}
47
48
49// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
50
51template<class Type>
54(
56) const
57{
58 const faMesh& mesh = this->mesh();
59
61 (
63 (
65 (
66 "lnGradCorr("+vf.name()+')',
67 vf.instance(),
68 vf.db()
69 ),
70 mesh,
71 vf.dimensions()*mesh.deltaCoeffs().dimensions()
72 )
73 );
75
76 for (direction cmpt = 0; cmpt < pTraits<Type>::nComponents; ++cmpt)
77 {
78 ssf.replace
79 (
80 cmpt,
81 mesh.correctionVectors()
83 <
84 typename
86 >(mesh).interpolate
87 (
89 (
90 mesh,
91 mesh.gradScheme(ssf.name())
92 )()
93 .grad(vf.component(cmpt))
94 )
95 );
96 }
97
98 return tssf;
99}
100
101
102// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
103
104} // End namespace fa
105
106// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107
108} // End namespace Foam
109
110// ************************************************************************* //
const dimensionSet & dimensions() const noexcept
Return dimensions.
Generic GeometricField class.
void replace(const direction d, const GeometricField< cmptType, PatchField, GeoMesh > &gcf)
Replace specified field component with content from another field.
Internal & ref(const bool updateAccessTime=true)
Same as internalFieldRef().
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition IOobject.H:191
const word & name() const noexcept
Return the object name.
Definition IOobjectI.H:205
const objectRegistry & db() const noexcept
Return the local objectRegistry.
Definition IOobject.C:450
const fileName & instance() const noexcept
Read access to instance path component.
Definition IOobjectI.H:289
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
virtual tmp< GeometricField< Type, faePatchField, edgeMesh > > correction(const GeometricField< Type, faPatchField, areaMesh > &) const
Return the explicit correction to the correctedLnGrad.
virtual ~correctedLnGrad()
Destructor.
Abstract base class for finite area calculus gradient schemes.
const faMesh & mesh() const noexcept
Return mesh reference.
static tmp< lnGradScheme< Type > > New(const faMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
Central-differencing interpolation scheme class.
A traits class, which is primarily used for primitives and vector-space.
Definition pTraits.H:64
A class for managing temporary objects.
Definition tmp.H:75
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
Definition tmpI.H:235
dynamicFvMesh & mesh
Namespace for finite-area.
Definition limitHeight.C:30
Namespace for OpenFOAM.
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.
uint8_t direction
Definition direction.H:49
Vector< scalar > vector
Definition vector.H:57