OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

extendedLeastSquaresVectors.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::extendedLeastSquaresVectors
00027 
00028 Description
00029     Extended molecule least-squares gradient scheme vectors
00030 
00031 SourceFiles
00032     extendedLeastSquaresVectors.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef extendedLeastSquaresVectors_H
00037 #define extendedLeastSquaresVectors_H
00038 
00039 #include "MeshObject.H"
00040 #include "fvMesh.H"
00041 #include "surfaceFieldsFwd.H"
00042 #include "labelPair.H"
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 /*---------------------------------------------------------------------------*\
00050                      Class extendedLeastSquaresVectors Declaration
00051 \*---------------------------------------------------------------------------*/
00052 
00053 class extendedLeastSquaresVectors
00054 :
00055     public MeshObject<fvMesh, extendedLeastSquaresVectors>
00056 {
00057     // Private data
00058 
00059         //- Minimum determinant criterion to choose extra cells
00060         scalar minDet_;
00061 
00062         //- Least-squares gradient vectors
00063         mutable surfaceVectorField* pVectorsPtr_;
00064         mutable surfaceVectorField* nVectorsPtr_;
00065 
00066         mutable List<labelPair>* additionalCellsPtr_;
00067         mutable vectorField* additionalVectorsPtr_;
00068 
00069 
00070     // Private member functions
00071 
00072         //- Construct Least-squares gradient vectors
00073         void makeLeastSquaresVectors() const;
00074 
00075 
00076 public:
00077 
00078     // Declare name of the class and its debug switch
00079     TypeName("extendedLeastSquaresVectors");
00080 
00081 
00082     // Constructors
00083 
00084         //- Construct given an fvMesh and the minimum determinant criterion
00085         extendedLeastSquaresVectors
00086         (
00087             const fvMesh&,
00088             const scalar minDet
00089         );
00090 
00091 
00092     // Destructor
00093 
00094         virtual ~extendedLeastSquaresVectors();
00095 
00096 
00097     // Member functions
00098 
00099         //- Return reference to owner least square vectors
00100         const surfaceVectorField& pVectors() const;
00101 
00102         //- Return reference to neighbour least square vectors
00103         const surfaceVectorField& nVectors() const;
00104 
00105 
00106         //- Return reference to additional cells
00107         const List<labelPair>& additionalCells() const;
00108 
00109         //- Return reference to additional least square vectors
00110         const vectorField& additionalVectors() const;
00111 
00112 
00113         //- Delete the least square vectors when the mesh moves
00114         virtual bool movePoints();
00115 };
00116 
00117 
00118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00119 
00120 } // End namespace Foam
00121 
00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00123 
00124 #endif
00125 
00126 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd