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 -------------------------------------------------------------------------------
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 Class
28  Foam::leastSquaresVectors
29 
30 Description
31  Least-squares gradient scheme vectors
32 
33 SourceFiles
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 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class leastSquaresVectors Declaration
52 \*---------------------------------------------------------------------------*/
53 
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 
73 public:
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 // ************************************************************************* //
Foam::leastSquaresVectors::TypeName
TypeName("leastSquaresVectors")
Foam::leastSquaresVectors::~leastSquaresVectors
virtual ~leastSquaresVectors()
Destructor.
Definition: invDistLeastSquaresVectors.C:80
Foam::leastSquaresVectors::pVectors
const surfaceVectorField & pVectors() const
Return const reference to owner least square vectors.
Definition: leastSquaresVectors.H:91
surfaceFields.H
Foam::surfaceFields.
Foam::leastSquaresVectors::movePoints
virtual bool movePoints()
Delete the least square vectors when the mesh moves.
Definition: invDistLeastSquaresVectors.C:173
Foam::leastSquaresVectors::leastSquaresVectors
leastSquaresVectors(const fvMesh &)
Construct given an fvMesh.
Definition: invDistLeastSquaresVectors.C:42
Foam::leastSquaresVectors
Least-squares gradient scheme vectors.
Definition: leastSquaresVectors.H:53
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
MeshObject.H
Foam::leastSquaresVectors::nVectors
const surfaceVectorField & nVectors() const
Return const reference to neighbour least square vectors.
Definition: leastSquaresVectors.H:97
Foam::MeshObject
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:88
Foam::GeometricField< vector, fvsPatchField, surfaceMesh >