00001 /*---------------------------------------------------------------------------*\ 00002 ========= | 00003 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox 00004 \\ / O peration | 00005 \\ / A nd | Copyright (C) 1991-2010 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 00013 the Free Software Foundation, either version 3 of the License, or 00014 (at your 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, see <http://www.gnu.org/licenses/>. 00023 00024 Class 00025 Foam::block 00026 00027 Description 00028 creates a single block of cells from point coordinates, 00029 numbers of cells in each direction and expansion ratio 00030 00031 SourceFiles 00032 block.C 00033 00034 \*---------------------------------------------------------------------------*/ 00035 00036 #ifndef block_H 00037 #define block_H 00038 00039 #include <OpenFOAM/pointField.H> 00040 #include <OpenFOAM/labelList.H> 00041 00042 #include "blockDescriptor.H" 00043 00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00045 00046 namespace Foam 00047 { 00048 00049 class Istream; 00050 class Ostream; 00051 00052 /*---------------------------------------------------------------------------*\ 00053 Class block Declaration 00054 \*---------------------------------------------------------------------------*/ 00055 00056 class block 00057 { 00058 // Private data 00059 00060 //- block definition 00061 blockDescriptor blockDef_; 00062 00063 //- list of vertices 00064 pointField vertices_; 00065 00066 //- list of cells 00067 labelListList cells_; 00068 00069 //- boundary patches 00070 labelListListList boundaryPatches_; 00071 00072 00073 // private member functions 00074 00075 label vtxLabel(label i, label j, label k); 00076 00077 void blockPoints(); 00078 00079 void blockCells(); 00080 00081 void blockBoundary(); 00082 00083 00084 public: 00085 00086 // Constructors 00087 00088 //- Construct from the block definition 00089 block(const blockDescriptor&); 00090 00091 //- Clone 00092 autoPtr<block> clone() const 00093 { 00094 notImplemented("block::clone()"); 00095 return autoPtr<block>(NULL); 00096 } 00097 00098 00099 // Member Functions 00100 00101 // Access 00102 00103 const blockDescriptor& blockDef() const; 00104 const pointField& points() const; 00105 const labelListList& cells() const; 00106 const labelListListList& boundaryPatches() const; 00107 00108 00109 // Ostream Operator 00110 00111 friend Ostream& operator<<(Ostream&, const block&); 00112 }; 00113 00114 00115 inline Istream& operator>>(Istream& is, block*) 00116 { 00117 notImplemented("Istream& operator>>(Istream& is, block*)"); 00118 return is; 00119 } 00120 00121 00122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00123 00124 } // End namespace Foam 00125 00126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 00127 00128 #endif 00129 00130 // ************************ vim: set sw=4 sts=4 et: ************************ //