pistonPointEdgeDataI.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2024 OpenFOAM Foundation
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 \*---------------------------------------------------------------------------*/
25 
26 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
27 
28 inline bool Foam::pistonPointEdgeData::update
29 (
30  const point& pt,
31  trackingData& td
32 )
33 {
34  inBowl_ = (td.axis_& pt) < td.maxZ_;
35  const bool propagate = !visited_ && inBowl_;
36  visited_ = true;
37  return propagate;
38 }
39 
40 
41 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42 
44 :
45  visited_(false),
46  inBowl_(false)
47 {}
48 
49 
51 :
52  visited_(true),
53  inBowl_(inBowl)
54 {}
55 
56 
57 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
58 
60 {
61  return inBowl_;
62 }
63 
64 
66 {
67  return visited_;
68 }
69 
70 
72 (
73  const polyPatch& patch,
74  const label patchFacei,
75  const transformer& transform,
76  trackingData& td
77 )
78 {}
79 
80 
82 (
83  const polyMesh& mesh,
84  const label pointi,
85  const label edgei,
86  const pistonPointEdgeData& edgeInfo,
87  const scalar tol,
88  trackingData& td
89 )
90 {
91  return update(td.points_[pointi], td);
92 }
93 
94 
96 (
97  const polyMesh& mesh,
98  const label pointi,
99  const pistonPointEdgeData& newPointInfo,
100  const scalar tol,
101  trackingData& td
102 )
103 {
104  return update(td.points_[pointi], td);
105 }
106 
107 
109 (
110  const polyMesh& mesh,
111  const label edgei,
112  const label pointi,
113  const pistonPointEdgeData& pointInfo,
114  const scalar tol,
115  trackingData& td
116 )
117 {
118  visited_ = true;
119  return true;
120 }
121 
122 
124 (
125  const pistonPointEdgeData& rhs,
126  trackingData& td
127 ) const
128 {
129  return operator==(rhs);
130 }
131 
132 
133 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
134 
135 inline bool Foam::pistonPointEdgeData::operator==
136 (
137  const Foam::pistonPointEdgeData& rhs
138 )
139 const
140 {
141  return visited_ == rhs.visited_ && inBowl_ == rhs.inBowl_;
142 }
143 
144 
145 inline bool Foam::pistonPointEdgeData::operator!=
146 (
147  const Foam::pistonPointEdgeData& rhs
148 )
149 const
150 {
151  return !(*this == rhs);
152 }
153 
154 
155 // ************************************************************************* //
Class used to pass data into container.
Holds information regarding nearest wall point. Used in PointEdgeWave. (so not standard FaceCellWave)...
bool valid(trackingData &td) const
Check whether origin has been changed at all or.
bool updateEdge(const polyMesh &mesh, const label edgei, const label pointi, const pistonPointEdgeData &pointInfo, const scalar tol, trackingData &td)
Influence of point on edge.
bool updatePoint(const polyMesh &mesh, const label pointi, const label edgei, const pistonPointEdgeData &edgeinfo, const scalar tol, trackingData &td)
Influence of edge on point.
void transform(const polyPatch &patch, const label patchFacei, const transformer &transform, trackingData &td)
Transform across an interface.
bool equal(const pistonPointEdgeData &, trackingData &td) const
Equivalent to operator== with trackingData.
pistonPointEdgeData()
Construct null.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:70
Vector-tensor class used to perform translations, rotations and scaling operations in 3D space.
Definition: transformer.H:84
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
vector point
Point is a vector.
Definition: point.H:41
dimensionSet transform(const dimensionSet &)
Definition: dimensionSet.C:504