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 -------------------------------------------------------------------------------
10 License
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 Class
27  Foam::leastSquaresVectors
28 
29 Description
30  Least-squares gradient scheme vectors
31 
32 SourceFiles
33  leastSquaresVectors.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef leastSquaresVectors_H
38 #define leastSquaresVectors_H
39 
40 #include "MeshObject.H"
41 #include "fvMesh.H"
42 #include "surfaceFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class leastSquaresVectors Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors>
56 {
57  // Private data
58 
59  //- Least-squares gradient vectors
60  surfaceVectorField pVectors_;
61  surfaceVectorField nVectors_;
62 
63 
64  // Private Member Functions
65 
66  //- Construct Least-squares gradient vectors
67  void calcLeastSquaresVectors();
68 
69 
70 public:
71 
72  // Declare name of the class and its debug switch
73  TypeName("leastSquaresVectors");
74 
75 
76  // Constructors
77 
78  //- Construct given an fvMesh
79  explicit leastSquaresVectors(const fvMesh&);
80 
81 
82  //- Destructor
83  virtual ~leastSquaresVectors();
84 
85 
86  // Member functions
87 
88  //- Return reference to owner least square vectors
89  const surfaceVectorField& pVectors() const
90  {
91  return pVectors_;
92  }
93 
94  //- Return reference to neighbour least square vectors
95  const surfaceVectorField& nVectors() const
96  {
97  return nVectors_;
98  }
99 
100  //- Delete the least square vectors when the mesh moves
101  virtual bool movePoints();
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #endif
112 
113 // ************************************************************************* //
Foam::leastSquaresVectors::TypeName
TypeName("leastSquaresVectors")
Foam::leastSquaresVectors::~leastSquaresVectors
virtual ~leastSquaresVectors()
Destructor.
Definition: invDistLeastSquaresVectors.C:80
Foam::leastSquaresVectors::pVectors
const surfaceVectorField & pVectors() const
Return reference to owner least square vectors.
Definition: leastSquaresVectors.H:88
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:52
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:83
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
MeshObject.H
Foam::leastSquaresVectors::nVectors
const surfaceVectorField & nVectors() const
Return reference to neighbour least square vectors.
Definition: leastSquaresVectors.H:94
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 >