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 Set of directions for each cell in the mesh. Either uniform and size=1
30 or one set of directions per cell.
32 Used in splitting cells.
33 Either all cells have similar refinement direction ('global') or
34 direction is dependent on local cell geometry. Controlled by dictionary.
39 \*---------------------------------------------------------------------------*/
45 #include "vectorField.H"
46 #include "NamedEnum.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 // Forward declaration of classes
56 class twoDPointCorrector;
61 /*---------------------------------------------------------------------------*\
62 Class directions Declaration
63 \*---------------------------------------------------------------------------*/
67 public List<vectorField>
72 //- Enumeration listing the possible coordinate directions.
82 static const NamedEnum<directionType, 3> directionTypeNames_;
85 // Private Member Functions
88 //- For debugging. Write point coordinate.
89 static void writeOBJ(Ostream& os, const point& pt);
91 //- For debugging. Write edge between two points.
100 //- For debugging. Write hedgehog display of vectorField as obj file.
103 const fileName& fName,
104 const primitiveMesh& mesh,
105 const vectorField& dirs
108 //- Check if vec has no component in 2D normal direction. Exits if
112 const twoDPointCorrector* correct2DPtr,
116 //- Get coordinate direction for all cells in mesh by propagating from
118 static vectorField propagateDirection
120 const polyMesh& mesh,
123 const vectorField& ppField,
124 const vector& defaultDir
127 //- Disallow default bitwise copy construct
128 directions(const directions&);
130 //- Disallow default bitwise assignment
131 void operator=(const directions&);
138 //- Construct from mesh and dictionary and optional 2D corrector.
141 const polyMesh& mesh,
142 const dictionary& dict,
143 const twoDPointCorrector* correct2DPtr = NULL
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 } // End namespace Foam
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 // ************************************************************************* //