Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
dynamicMesh
meshCut
directions
directions.H
Go to the documentation of this file.
1
/*---------------------------------------------------------------------------*\
2
========= |
3
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4
\\ / O peration |
5
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6
\\/ M anipulation |
7
-------------------------------------------------------------------------------
8
License
9
This file is part of OpenFOAM.
10
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.
15
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
19
for more details.
20
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/>.
23
24
Class
25
Foam::directions
26
27
Description
28
Set of directions for each cell in the mesh. Either uniform and size=1
29
or one set of directions per cell.
30
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.
34
35
SourceFiles
36
directions.C
37
38
\*---------------------------------------------------------------------------*/
39
40
#ifndef directions_H
41
#define directions_H
42
43
#include <
OpenFOAM/List.H
>
44
#include <
OpenFOAM/vectorField.H
>
45
#include <
OpenFOAM/NamedEnum.H
>
46
#include <
OpenFOAM/point.H
>
47
48
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50
namespace
Foam
51
{
52
53
// Forward declaration of classes
54
class
polyMesh;
55
class
twoDPointCorrector;
56
class
primitiveMesh;
57
class
polyPatch;
58
class
dictionary;
59
60
/*---------------------------------------------------------------------------*\
61
Class directions Declaration
62
\*---------------------------------------------------------------------------*/
63
64
class
directions
65
:
66
public
List
<vectorField>
67
{
68
public
:
69
// Data types
70
71
//- Enumeration listing the possible coordinate directions.
72
enum
directionType
73
{
74
TAN1
,
75
TAN2
,
76
NORMAL
,
77
};
78
79
private
:
80
81
static
const
NamedEnum<directionType, 3>
directionTypeNames_;
82
83
84
// Private Member Functions
85
86
87
//- For debugging. Write point coordinate.
88
static
void
writeOBJ(
Ostream
& os,
const
point
& pt);
89
90
//- For debugging. Write edge between two points.
91
static
void
writeOBJ
92
(
93
Ostream
& os,
94
const
point
& pt0,
95
const
point
& pt1,
96
label& vertI
97
);
98
99
//- For debugging. Write hedgehog display of vectorField as obj file.
100
static
void
writeOBJ
101
(
102
const
fileName
& fName,
103
const
primitiveMesh
&
mesh
,
104
const
vectorField
& dirs
105
);
106
107
//- Check if vec has no component in 2D normal direction. Exits if
108
// so.
109
static
void
check2D
110
(
111
const
twoDPointCorrector
* correct2DPtr,
112
const
vector
& vec
113
);
114
115
//- Get coordinate direction for all cells in mesh by propagating from
116
// vector on patch.
117
static
vectorField
propagateDirection
118
(
119
const
polyMesh
&
mesh
,
120
const
bool
useTopo,
121
const
polyPatch
& pp,
122
const
vectorField
& ppField,
123
const
vector
& defaultDir
124
);
125
126
//- Disallow default bitwise copy construct
127
directions
(
const
directions
&);
128
129
//- Disallow default bitwise assignment
130
void
operator=(
const
directions
&);
131
132
133
public
:
134
135
// Constructors
136
137
//- Construct from mesh and dictionary and optional 2D corrector.
138
directions
139
(
140
const
polyMesh
&
mesh
,
141
const
dictionary
& dict,
142
const
twoDPointCorrector
* correct2DPtr = NULL
143
);
144
145
};
146
147
148
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149
150
}
// End namespace Foam
151
152
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154
#endif
155
156
// ************************ vim: set sw=4 sts=4 et: ************************ //