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

evaluateError.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::evaluateError
00027 
00028 Description
00029     Foam::evaluateError
00030 
00031 SourceFiles
00032     evaluateError.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef evaluateError_H
00037 #define evaluateError_H
00038 
00039 #include "labelList.H"
00040 #include "volFieldsFwd.H"
00041 #include "surfaceFieldsFwd.H"
00042 
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 
00049 // Forward declaration of classes
00050 class refineCell;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                            Class evaluateError Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class evaluateError
00057 {
00058     // Private data
00059 
00060         // splitFaces to remove.
00061         labelList unsplitFaces_;
00062 
00063         // cells to refine.
00064         List<refineCell> refCells_;
00065 
00066 
00067     // Private Member Functions
00068 
00069 
00070 public:
00071 
00072     // Constructors
00073 
00074         //- Construct null
00075         evaluateError();
00076 
00077 
00078         //- Construct from error value, error direction. Determine faces to
00079         //  remove (out of candidate faces) and cells to refine (all cells):
00080         //
00081         //  remove all faces where the (face)error is less than
00082         //     average - standard deviation
00083         //  refine all cells where the (cell)error is more than
00084         //      average + standard deviation. gradTheta is used to determine
00085         //      direction to refine in.
00086         evaluateError
00087         (
00088             const volScalarField& cellError,
00089             const volVectorField& gradTheta,
00090             const surfaceScalarField& faceError,
00091             const labelList& candidateFaces
00092         );
00093 
00094 
00095     // Member Functions
00096 
00097         const labelList& unsplitFaces() const
00098         {
00099             return unsplitFaces_;
00100         }
00101 
00102         const List<refineCell>& refCells() const
00103         {
00104             return refCells_;
00105         }
00106 };
00107 
00108 
00109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00110 
00111 } // End namespace Foam
00112 
00113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00114 
00115 #endif
00116 
00117 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd