prismMatcher.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-2016 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::prismMatcher
28
29Description
30 A cellMatcher for prism cells (cellModel::PRISM)
31
32See also
33 cellMatcher, cellModel
34
35SourceFiles
36 prismMatcher.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef prismMatcher_H
41#define prismMatcher_H
42
43#include "cellMatcher.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class prismMatcher Declaration
52\*---------------------------------------------------------------------------*/
54class prismMatcher
55:
56 public cellMatcher
57{
58 // Static Data Members
59
60 // Constants for this shape
61 static constexpr label vertPerCell = 6;
62 static constexpr label facePerCell = 5;
63 static constexpr label maxVertPerFace = 4;
64
65
66 // Private Member Functions
67
68 //- No copy construct
69 prismMatcher(const prismMatcher&) = delete;
70
71 //- No copy assignment
72 prismMatcher& operator=(const prismMatcher&) = delete;
73
74
75public:
76
77 // Constructors
78
79 //- Default construct
81
82
83 //- Destructor
84 ~prismMatcher() = default;
85
86
87 // Member Functions
89 virtual label nVertPerCell() const
90 {
91 return vertPerCell;
92 }
94 virtual label nFacePerCell() const
95 {
96 return facePerCell;
97 }
99 virtual label nMaxVertPerFace() const
100 {
101 return maxVertPerFace;
102 }
103
104 virtual label faceHashValue() const;
105
106 virtual bool faceSizeMatch(const faceList&, const labelList&) const;
107
108 virtual bool matchShape
109 (
110 const bool checkOnly,
111 const faceList& faces,
112 const labelList& faceOwner,
113 const label celli,
114 const labelList& myFaces
115 );
116
117 virtual bool isA(const primitiveMesh& mesh, const label celli);
118
119 virtual bool isA(const faceList&);
120
121 virtual bool matches
122 (
123 const primitiveMesh& mesh,
124 const label celli,
125 cellShape& shape
126 );
127};
128
129
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132} // End namespace Foam
133
134// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135
136#endif
137
138// ************************************************************************* //
Base class for cellshape matchers (hexMatch, prismMatch, etc.). These are classes which given a mesh ...
Definition: cellMatcher.H:100
An analytical geometric cellShape.
Definition: cellShape.H:72
Cell-face mesh analysis engine.
Definition: primitiveMesh.H:79
A cellMatcher for prism cells (cellModel::PRISM)
Definition: prismMatcher.H:56
virtual bool faceSizeMatch(const faceList &, const labelList &) const
Check whether number of face sizes match the shape.
Definition: prismMatcher.C:293
prismMatcher()
Default construct.
Definition: prismMatcher.C:34
virtual bool matchShape(const bool checkOnly, const faceList &faces, const labelList &faceOwner, const label celli, const labelList &myFaces)
Low level shape recognition. Return true if matches.
Definition: prismMatcher.C:49
virtual label nVertPerCell() const
Definition: prismMatcher.H:88
virtual bool matches(const primitiveMesh &mesh, const label celli, cellShape &shape)
Like isA but also constructs a cellShape (if shape matches)
Definition: prismMatcher.C:356
virtual bool isA(const primitiveMesh &mesh, const label celli)
Exact match. Uses faceSizeMatch.
Definition: prismMatcher.C:328
virtual label nMaxVertPerFace() const
Definition: prismMatcher.H:98
virtual label faceHashValue() const
Hash value of all face sizes of this shape. Can be used for.
Definition: prismMatcher.C:286
~prismMatcher()=default
Destructor.
virtual label nFacePerCell() const
Definition: prismMatcher.H:93
dynamicFvMesh & mesh
Namespace for OpenFOAM.