1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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
26 Foam::extendedLeastSquaresVectors
29 Extended molecule least-squares gradient scheme vectors
32 extendedLeastSquaresVectors.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef extendedLeastSquaresVectors_H
37 #define extendedLeastSquaresVectors_H
39 #include "MeshObject.H"
41 #include "surfaceFieldsFwd.H"
42 #include "labelPair.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class extendedLeastSquaresVectors Declaration
51 \*---------------------------------------------------------------------------*/
53 class extendedLeastSquaresVectors
55 public MeshObject<fvMesh, extendedLeastSquaresVectors>
59 //- Minimum determinant criterion to choose extra cells
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;
78 // Declare name of the class and its debug switch
79 TypeName("extendedLeastSquaresVectors");
84 //- Construct given an fvMesh and the minimum determinant criterion
85 extendedLeastSquaresVectors
94 virtual ~extendedLeastSquaresVectors();
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 // ************************************************************************* //