1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 block descriptor. Takes the description of the block and the list
30 of curved edges and creates a list of points on edges together
31 with the weighting factors
36 \*---------------------------------------------------------------------------*/
38 #ifndef blockDescriptor_H
39 #define blockDescriptor_H
44 #include "cellShape.H"
45 #include "scalarList.H"
46 #include "curvedEdgeList.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 /*---------------------------------------------------------------------------*\
57 Class blockDescriptor Declaration
58 \*---------------------------------------------------------------------------*/
65 const pointField& blockMeshPoints_;
68 cellShape blockShape_;
70 // reference to a list of curved edges
71 const curvedEdgeList& curvedEdges_;
74 List<List<point> > edgePoints_;
76 //- block edge weighting factors
77 scalarListList edgeWeights_;
79 //- number of point in each direction
82 //- expansion ratios in all directions
85 //- name of the zone (empty string if none)
88 // Private member functions
90 void makeBlockEdges();
92 void setEdge(label edge, label start, label end, label dim);
99 //- Construct from components. Optional cellSet/zone name.
103 const pointField& blockMeshPoints,
104 const curvedEdgeList& edges,
105 const Vector<label>& n,
106 const scalarList& expand,
107 const word& zoneName = ""
110 //- Construct from Istream
113 const pointField& blockMeshPoints,
114 const curvedEdgeList& edges,
119 autoPtr<blockDescriptor> clone() const
121 notImplemented("blockDescriptor::clone()");
122 return autoPtr<blockDescriptor>(NULL);
130 const pointField& points() const;
132 const cellShape& blockShape() const;
134 const List<List<point> >& blockEdgePoints() const;
136 const scalarListList& blockEdgeWeights() const;
138 const Vector<label>& n() const;
140 const word& zoneName() const;
144 void operator=(const blockDescriptor&);
147 // IOstream Operators
149 friend Ostream& operator<<(Ostream&, const blockDescriptor&);
153 inline Istream& operator>>(Istream& is, blockDescriptor*)
155 notImplemented("Istream& operator>>(Istream& is, blockDescriptor*)");
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 } // End namespace Foam
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 // ************************************************************************* //