initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / errorEstimation / evaluateError / evaluateError.H
blobd6df8d1c3e681589cfdd1a1c8ad185992614b1f9
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::evaluateError
28 Description
29     Foam::evaluateError
31 SourceFiles
32     evaluateError.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef evaluateError_H
37 #define evaluateError_H
39 #include "labelList.H"
40 #include "volFieldsFwd.H"
41 #include "surfaceFieldsFwd.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 // Forward declaration of classes
50 class refineCell;
52 /*---------------------------------------------------------------------------*\
53                            Class evaluateError Declaration
54 \*---------------------------------------------------------------------------*/
56 class evaluateError
58     // Private data
60         // splitFaces to remove.
61         labelList unsplitFaces_;
63         // cells to refine.
64         List<refineCell> refCells_;
67     // Private Member Functions
70 public:
72     // Constructors
74         //- Construct null
75         evaluateError();
78         //- Construct from error value, error direction. Determine faces to
79         //  remove (out of candidate faces) and cells to refine (all cells):
80         //
81         //  remove all faces where the (face)error is less than
82         //     average - standard deviation
83         //  refine all cells where the (cell)error is more than
84         //      average + standard deviation. gradTheta is used to determine
85         //      direction to refine in.
86         evaluateError
87         (
88             const volScalarField& cellError,
89             const volVectorField& gradTheta,
90             const surfaceScalarField& faceError,
91             const labelList& candidateFaces
92         );
95     // Member Functions
97         const labelList& unsplitFaces() const
98         {
99             return unsplitFaces_;
100         }
102         const List<refineCell>& refCells() const
103         {
104             return refCells_;
105         }
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 } // End namespace Foam
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 #endif
117 // ************************************************************************* //