|
|
|
block.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::block 00027 00028 Description 00029 Creates a single block of cells from point coordinates, 00030 numbers of cells in each direction and expansion ratio 00031 00032 00033 SourceFiles 00034 block.C 00035 blockIO.C 00036 00037 00038 \*---------------------------------------------------------------------------*/ 00039 00040 #ifndef block_H 00041 #define block_H 00042 00043 #include "pointField.H" 00044 #include "labelList.H" 00045 00046 #include "blockDescriptor.H" 00047 00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00049 00050 namespace Foam 00051 { 00052 00053 class Istream; 00054 class Ostream; 00055 00056 /*---------------------------------------------------------------------------*\ 00057 Class block Declaration 00058 \*---------------------------------------------------------------------------*/ 00059 00060 class block 00061 { 00062 // Private data 00063 00064 //- block definition 00065 blockDescriptor BlockDef; 00066 00067 //- list of vertices 00068 pointField Vertices; 00069 00070 //- list of cells 00071 labelListList Cells; 00072 00073 //- boundary patches 00074 labelListListList BoundaryPatches; 00075 00076 00077 // private member functions 00078 00079 label vtxLabel(label i, label j, label k); 00080 00081 void blockPoints(); 00082 00083 void blockCells(); 00084 00085 void blockBoundary(); 00086 00087 public: 00088 00089 // Constructors 00090 00091 //- from the block definition 00092 block(const blockDescriptor&); 00093 00094 //- as copy 00095 block(const block&); 00096 00097 //- clone function 00098 autoPtr<block> clone() const 00099 { 00100 notImplemented("block::clone()"); 00101 return autoPtr<block>(NULL); 00102 } 00103 00104 // Destructor 00105 00106 ~block(); 00107 00108 00109 // Member Functions 00110 00111 // Access 00112 00113 const blockDescriptor& blockDef() const; 00114 const pointField& points() const; 00115 const labelListList& cells() const; 00116 const labelListListList& boundaryPatches() const; 00117 00118 00119 // IOstream Operators 00120 00121 friend Ostream& operator<<(Ostream&, const block&); 00122 }; 00123 00124 00125 inline Istream& operator>>(Istream& is, block*) 00126 { 00127 notImplemented("Istream& operator>>(Istream& is, block*)"); 00128 return is; 00129 } 00130 00131 00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00133 00134 } // End namespace Foam 00135 00136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00137 00138 #endif 00139 00140 // ************************************************************************* // |