edgeStats.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::edgeStats
28
29Description
30 Helper class to calculate minimum edge length on mesh.
31
32SourceFiles
33 edgeStats.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef edgeStats_H
38#define edgeStats_H
39
40#include "direction.H"
41#include "scalar.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48// Forward declaration of classes
49class polyMesh;
50class Ostream;
51class twoDPointCorrector;
52
53/*---------------------------------------------------------------------------*\
54 Class edgeStats Declaration
55\*---------------------------------------------------------------------------*/
57class edgeStats
58{
59 // Private data
60
61 //- Reference to mesh.
62 const polyMesh& mesh_;
63
64 //- Component (0,1,2) of normal direction or 3 if 3D case.
65 direction normalDir_;
66
67 // Private Member Functions
68
69 //- If 2d get component of normal dir.
70 direction getNormalDir(const twoDPointCorrector*) const;
71
72
73 //- No copy construct
74 edgeStats(const edgeStats&) = delete;
75
76 //- No copy assignment
77 void operator=(const edgeStats&) = delete;
78
79
80public:
81
82 // Static data members
83
84 // Max (cos of) angle for edges to be considered aligned with axis.
85 static const scalar edgeTol_;
86
87
88 // Constructors
89
90 //- Construct from mesh
91 edgeStats(const polyMesh& mesh);
92
93 //- Construct from mesh and corrector
95
96
97 // Member Functions
98
99 //- Calculate minimum edge length and print
100 scalar minLen(Ostream& os) const;
101};
102
103
104// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
105
106} // End namespace Foam
107
108// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109
110#endif
111
112// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Helper class to calculate minimum edge length on mesh.
Definition: edgeStats.H:57
static const scalar edgeTol_
Definition: edgeStats.H:84
edgeStats(const polyMesh &mesh)
Construct from mesh.
scalar minLen(Ostream &os) const
Calculate minimum edge length and print.
edgeStats(const polyMesh &mesh, const twoDPointCorrector *)
Construct from mesh and corrector.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:81
Class applies a two-dimensional correction to mesh motion point field.
dynamicFvMesh & mesh
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
uint8_t direction
Definition: direction.H:56