Loading...
Searching...
No Matches
leastSquaresVectors.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-2013 OpenFOAM Foundation
9 Copyright (C) 2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::leastSquaresVectors
29
30Description
31 Least-squares gradient scheme vectors
32
33SourceFiles
34 leastSquaresVectors.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef leastSquaresVectors_H
39#define leastSquaresVectors_H
40
41#include "MeshObject.H"
42#include "fvMesh.H"
43#include "surfaceFields.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
50/*---------------------------------------------------------------------------*\
51 Class leastSquaresVectors Declaration
52\*---------------------------------------------------------------------------*/
53
55:
56 public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors>
57{
58 // Private Typedefs
59
60 typedef MeshObject
61 <
62 fvMesh,
65 > MeshObject_type;
66
67
68 // Private Data
69
70 //- Owner least-squares gradient vectors
71 surfaceVectorField pVectors_;
72
73 //- Neighbour least-squares gradient vectors
74 surfaceVectorField nVectors_;
75
76
77 // Private Member Functions
78
79 //- Construct Least-squares gradient vectors
80 void calcLeastSquaresVectors();
81
82
83public:
84
85 // Declare name of the class and its debug switch
86 TypeName("leastSquaresVectors");
88
89 // Constructors
90
91 //- Construct given an fvMesh
92 explicit leastSquaresVectors(const fvMesh&);
93
94
95 //- Destructor
96 virtual ~leastSquaresVectors();
97
98
99 // Member functions
100
101 //- Return const reference to owner least square vectors
102 const surfaceVectorField& pVectors() const
103 {
104 return pVectors_;
105 }
106
107 //- Return const reference to neighbour least square vectors
108 const surfaceVectorField& nVectors() const
110 return nVectors_;
111 }
112
113 //- Delete the least square vectors when the mesh moves
114 virtual bool movePoints();
115};
116
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120} // End namespace Foam
121
122// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123
124#endif
125
126// ************************************************************************* //
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
virtual ~leastSquaresVectors()
Destructor.
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
TypeName("leastSquaresVectors")
const surfaceVectorField & pVectors() const
Return const reference to owner least square vectors.
const surfaceVectorField & nVectors() const
Return const reference to neighbour least square vectors.
Namespace for OpenFOAM.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
Foam::surfaceFields.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68