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{
49
50/*---------------------------------------------------------------------------*\
51 Class leastSquaresVectors Declaration
52\*---------------------------------------------------------------------------*/
55:
56 public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors>
57{
58 // Private Data
59
60 //- Owner least-squares gradient vectors
61 surfaceVectorField pVectors_;
62
63 //- Neighbour least-squares gradient vectors
64 surfaceVectorField nVectors_;
65
66
67 // Private Member Functions
68
69 //- Construct Least-squares gradient vectors
70 void calcLeastSquaresVectors();
71
72
73public:
74
75 // Declare name of the class and its debug switch
76 TypeName("leastSquaresVectors");
77
78
79 // Constructors
80
81 //- Construct given an fvMesh
82 explicit leastSquaresVectors(const fvMesh&);
83
84
85 //- Destructor
86 virtual ~leastSquaresVectors();
87
88
89 // Member functions
90
91 //- Return const reference to owner least square vectors
92 const surfaceVectorField& pVectors() const
93 {
94 return pVectors_;
95 }
96
97 //- Return const reference to neighbour least square vectors
98 const surfaceVectorField& nVectors() const
99 {
100 return nVectors_;
101 }
102
103 //- Delete the least square vectors when the mesh moves
104 virtual bool movePoints();
105};
106
107
108// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109
110} // End namespace Foam
111
112// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113
114#endif
115
116// ************************************************************************* //
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:91
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
Least-squares gradient scheme vectors.
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
virtual ~leastSquaresVectors()
Destructor.
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.
Foam::surfaceFields.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73