Loading...
Searching...
No Matches
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 Foam_edgeStats_H
38#define Foam_edgeStats_H
39
40#include "direction.H"
41#include "scalar.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48// Forward Declarations
49class polyMesh;
52/*---------------------------------------------------------------------------*\
53 Class edgeStats Declaration
54\*---------------------------------------------------------------------------*/
55
56class edgeStats
57{
58 // Private data
59
60 //- Reference to mesh.
61 const polyMesh& mesh_;
62
63 //- Component (0,1,2) of normal direction or 3 if 3D case.
64 direction normalDir_;
65
66 // Private Member Functions
67
68 //- If 2d get component of normal dir.
69 direction getNormalDir(const twoDPointCorrector*) const;
70
71
72 //- No copy construct
73 edgeStats(const edgeStats&) = delete;
74
75 //- No copy assignment
76 void operator=(const edgeStats&) = delete;
77
78
79public:
80
81 // Static data members
82
83 // Max (cos of) angle for edges to be considered aligned with axis.
84 static const scalar edgeTol_;
85
86
87 // Constructors
88
89 //- Construct from mesh
90 edgeStats(const polyMesh& mesh);
91
92 //- Construct from mesh and corrector
93 edgeStats(const polyMesh& mesh, const twoDPointCorrector* );
94
95
96 // Member Functions
98 //- Calculate minimum edge length and print
99 scalar minLen(Ostream& os) const;
100};
101
103// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105} // End namespace Foam
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109#endif
111// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
static const scalar edgeTol_
Definition edgeStats.H:89
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:79
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:49