|
|
|
faceOnlySet.HGo 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::faceOnlySet 00027 00028 Description 00029 00030 SourceFiles 00031 faceOnlySet.C 00032 00033 \*---------------------------------------------------------------------------*/ 00034 00035 #ifndef faceOnlySet_H 00036 #define faceOnlySet_H 00037 00038 #include "sampledSet.H" 00039 #include "DynamicList.H" 00040 00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00042 00043 namespace Foam 00044 { 00045 00046 // Forward declaration of classes 00047 class passiveParticle; 00048 template<class Type> class Particle; 00049 00050 /*---------------------------------------------------------------------------*\ 00051 Class faceOnlySet Declaration 00052 \*---------------------------------------------------------------------------*/ 00053 00054 class faceOnlySet 00055 : 00056 public sampledSet 00057 { 00058 // Private data 00059 00060 //- Starting point 00061 point start_; 00062 00063 //- End point 00064 point end_; 00065 00066 00067 // Private Member Functions 00068 00069 //- Samples from startTrackPt/CellI. Updates particle/samplePt/sampleI 00070 // and puts 00071 // samples in the DynamicLists. Returns false if end of all samples 00072 // reached 00073 bool trackToBoundary 00074 ( 00075 Particle<passiveParticle>& singleParticle, 00076 DynamicList<point>& samplingPts, 00077 DynamicList<label>& samplingCells, 00078 DynamicList<label>& samplingFaces, 00079 DynamicList<scalar>& samplingCurve 00080 ) const; 00081 00082 //- Samples from start_ to end_. samplingSegments contains segmentNo 00083 // for each sample. 00084 void calcSamples 00085 ( 00086 DynamicList<point>& samplingPts, 00087 DynamicList<label>& samplingCells, 00088 DynamicList<label>& samplingFaces, 00089 DynamicList<label>& samplingSegments, 00090 DynamicList<scalar>& samplingCurveDist 00091 ) const; 00092 00093 //- Uses calcSamples to obtain samples. Copies them into *this. 00094 void genSamples(); 00095 00096 public: 00097 00098 //- Runtime type information 00099 TypeName("face"); 00100 00101 // Constructors 00102 00103 //- Construct from components 00104 faceOnlySet 00105 ( 00106 const word& name, 00107 const polyMesh& mesh, 00108 meshSearch& searchEngine, 00109 const word& axis, 00110 const point& start, 00111 const point& end 00112 ); 00113 00114 //- Construct from dictionary 00115 faceOnlySet 00116 ( 00117 const word& name, 00118 const polyMesh& mesh, 00119 meshSearch& searchEngine, 00120 const dictionary& dict 00121 ); 00122 00123 00124 // Destructor 00125 00126 virtual ~faceOnlySet(); 00127 00128 00129 // Member Functions 00130 00131 const point& start() const 00132 { 00133 return start_; 00134 } 00135 00136 const point& end() const 00137 { 00138 return end_; 00139 } 00140 00141 //- Get reference point 00142 virtual point getRefPoint(const List<point>&) const; 00143 }; 00144 00145 00146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00147 00148 } // End namespace Foam 00149 00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00151 00152 #endif 00153 00154 // ************************************************************************* // |