1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, see <http://www.gnu.org/licenses/>.
28 Set of directions for each cell in the mesh. Either uniform and size=1
29 or one set of directions per cell.
31 Used in splitting cells.
32 Either all cells have similar refinement direction ('global') or
33 direction is dependent on local cell geometry. Controlled by dictionary.
38 \*---------------------------------------------------------------------------*/
44 #include "vectorField.H"
45 #include "NamedEnum.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 // Forward declaration of classes
55 class twoDPointCorrector;
60 /*---------------------------------------------------------------------------*\
61 Class directions Declaration
62 \*---------------------------------------------------------------------------*/
66 public List<vectorField>
71 //- Enumeration listing the possible coordinate directions.
81 static const NamedEnum<directionType, 3> directionTypeNames_;
84 // Private Member Functions
87 //- For debugging. Write point coordinate.
88 static void writeOBJ(Ostream& os, const point& pt);
90 //- For debugging. Write edge between two points.
99 //- For debugging. Write hedgehog display of vectorField as obj file.
102 const fileName& fName,
103 const primitiveMesh& mesh,
104 const vectorField& dirs
107 //- Check if vec has no component in 2D normal direction. Exits if
111 const twoDPointCorrector* correct2DPtr,
115 //- Get coordinate direction for all cells in mesh by propagating from
117 static vectorField propagateDirection
119 const polyMesh& mesh,
122 const vectorField& ppField,
123 const vector& defaultDir
126 //- Disallow default bitwise copy construct
127 directions(const directions&);
129 //- Disallow default bitwise assignment
130 void operator=(const directions&);
137 //- Construct from mesh and dictionary and optional 2D corrector.
140 const polyMesh& mesh,
141 const dictionary& dict,
142 const twoDPointCorrector* correct2DPtr = NULL
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace Foam
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 // ************************************************************************* //