![]() |
|
00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2005 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 errorDrivenRefinement 00027 00028 Description 00029 Refines and coarsens based on error estimate. 00030 00031 SourceFiles 00032 errorDrivenRefinement.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef errorDrivenRefinement_H 00037 #define errorDrivenRefinement_H 00038 00039 #include "polyMeshModifier.H" 00040 #include "undoableMeshCutter.H" 00041 00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00043 00044 namespace Foam 00045 { 00046 00047 // Class forward declarations 00048 00049 /*---------------------------------------------------------------------------*\ 00050 Class errorDrivenRefinement Declaration 00051 \*---------------------------------------------------------------------------*/ 00052 00053 class errorDrivenRefinement 00054 : 00055 public polyMeshModifier 00056 { 00057 // Private data 00058 00059 //- Refinement/coarsening engine 00060 mutable undoableMeshCutter refinementEngine_; 00061 00062 //- Name of volVectorField which contains error. 00063 word errorField_; 00064 00065 00066 // Private Member Functions 00067 00068 //- Disallow default bitwise copy construct 00069 errorDrivenRefinement(const errorDrivenRefinement&); 00070 00071 //- Disallow default bitwise assignment 00072 void operator=(const errorDrivenRefinement&); 00073 00074 00075 public: 00076 00077 //- Runtime type information 00078 TypeName("errorDrivenRefinement"); 00079 00080 00081 // Constructors 00082 00083 //- Construct from dictionary 00084 errorDrivenRefinement 00085 ( 00086 const word& name, 00087 const dictionary& dict, 00088 const label index, 00089 const polyTopoChanger& mme 00090 ); 00091 00092 00093 // Destructor 00094 00095 virtual ~errorDrivenRefinement(); 00096 00097 00098 // Member Functions 00099 00100 //- Check for topology change 00101 virtual bool changeTopology() const; 00102 00103 //- Insert the layer addition/removal instructions 00104 // into the topological change 00105 virtual void setRefinement(polyTopoChange&) const; 00106 00107 //- Modify motion points to comply with the topological change 00108 virtual void modifyMotionPoints(pointField& motionPoints) const; 00109 00110 //- Force recalculation of locally stored data on topological change 00111 virtual void updateMesh(const mapPolyMesh&); 00112 00113 //- Write 00114 virtual void write(Ostream&) const; 00115 00116 //- Write dictionary 00117 virtual void writeDict(Ostream&) const; 00118 00119 00120 // Access 00121 00122 //- Underlying mesh modifier 00123 const undoableMeshCutter& refinementEngine() const 00124 { 00125 return refinementEngine_; 00126 } 00127 }; 00128 00129 00130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00131 00132 } // End namespace Foam 00133 00134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00135 00136 #endif 00137 00138 // ************************************************************************* //