initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / finiteVolume / gradSchemes / extendedLeastSquaresGrad / extendedLeastSquaresVectors.H
blob10df7878075688d1de74ffbfbaad4d55d5609cea
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::extendedLeastSquaresVectors
28 Description
29     Extended molecule least-squares gradient scheme vectors
31 SourceFiles
32     extendedLeastSquaresVectors.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef extendedLeastSquaresVectors_H
37 #define extendedLeastSquaresVectors_H
39 #include "MeshObject.H"
40 #include "fvMesh.H"
41 #include "surfaceFieldsFwd.H"
42 #include "labelPair.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 /*---------------------------------------------------------------------------*\
50                      Class extendedLeastSquaresVectors Declaration
51 \*---------------------------------------------------------------------------*/
53 class extendedLeastSquaresVectors
55     public MeshObject<fvMesh, extendedLeastSquaresVectors>
57     // Private data
59         //- Minimum determinant criterion to choose extra cells
60         scalar minDet_;
62         //- Least-squares gradient vectors
63         mutable surfaceVectorField* pVectorsPtr_;
64         mutable surfaceVectorField* nVectorsPtr_;
66         mutable List<labelPair>* additionalCellsPtr_;
67         mutable vectorField* additionalVectorsPtr_;
70     // Private member functions
72         //- Construct Least-squares gradient vectors
73         void makeLeastSquaresVectors() const;
76 public:
78     // Declare name of the class and its debug switch
79     TypeName("extendedLeastSquaresVectors");
82     // Constructors
84         //- Construct given an fvMesh and the minimum determinant criterion
85         extendedLeastSquaresVectors
86         (
87             const fvMesh&,
88             const scalar minDet
89         );
92     // Destructor
94         virtual ~extendedLeastSquaresVectors();
97     // Member functions
99         //- Return reference to owner least square vectors
100         const surfaceVectorField& pVectors() const;
102         //- Return reference to neighbour least square vectors
103         const surfaceVectorField& nVectors() const;
106         //- Return reference to additional cells
107         const List<labelPair>& additionalCells() const;
109         //- Return reference to additional least square vectors
110         const vectorField& additionalVectors() const;
113         //- Delete the least square vectors when the mesh moves
114         virtual bool movePoints();
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 } // End namespace Foam
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 #endif
126 // ************************************************************************* //