![]() |
|
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 rotatedBoxToCell 00027 00028 Description 00029 Select cells based on cell centres inside rotatex/skewed box 00030 (parallelopiped?). Box defined as origin and i,j,k vectors. 00031 E.g. box rotated 45 degrees around z-axis with sizes sqrt(0.2^2+0.2^2) 00032 (and extra large, 200 in z direction): 00033 00034 origin ( 0.4 0.4 -100); 00035 i ( 0.2 0.2 0); 00036 j (-0.2 0.2 0); 00037 k ( 0.0 0.0 100); 00038 00039 SourceFiles 00040 rotatedBoxToCell.C 00041 00042 \*---------------------------------------------------------------------------*/ 00043 00044 #ifndef rotatedBoxToCell_H 00045 #define rotatedBoxToCell_H 00046 00047 #include "topoSetSource.H" 00048 #include "treeBoundBox.H" 00049 00050 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00051 00052 namespace Foam 00053 { 00054 00055 /*---------------------------------------------------------------------------*\ 00056 Class rotatedBoxToCell Declaration 00057 \*---------------------------------------------------------------------------*/ 00058 00059 class rotatedBoxToCell 00060 : 00061 public topoSetSource 00062 { 00063 00064 // Private data 00065 00066 //- Add usage string 00067 static addToUsageTable usage_; 00068 00069 00070 //- skewed box 00071 const vector origin_; 00072 const vector i_; 00073 const vector j_; 00074 const vector k_; 00075 00076 00077 // Private Member Functions 00078 00079 void combine(topoSet& set, const bool add) const; 00080 00081 00082 public: 00083 00084 //- Runtime type information 00085 TypeName("rotatedBoxToCell"); 00086 00087 // Constructors 00088 00089 //- Construct from components 00090 rotatedBoxToCell 00091 ( 00092 const polyMesh& mesh, 00093 const vector& origin, 00094 const vector& i, 00095 const vector& j, 00096 const vector& k 00097 ); 00098 00099 //- Construct from dictionary 00100 rotatedBoxToCell(const polyMesh& mesh, const dictionary& dict); 00101 00102 //- Construct from Istream 00103 rotatedBoxToCell(const polyMesh& mesh, Istream&); 00104 00105 00106 // Destructor 00107 00108 virtual ~rotatedBoxToCell(); 00109 00110 00111 // Member Functions 00112 00113 virtual void applyToSet(const topoSetSource::setAction action, topoSet&) 00114 const; 00115 00116 }; 00117 00118 00119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00120 00121 } // End namespace Foam 00122 00123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00124 00125 #endif 00126 00127 // ************************************************************************* //