Loading...
Searching...
No Matches
lumpedPointMovementI.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) 2017-2020 OpenCFD Ltd.
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\*---------------------------------------------------------------------------*/
26
28inline bool Foam::lumpedPointMovement::empty() const
29{
30 return state0_.empty();
31}
32
34inline Foam::label Foam::lumpedPointMovement::size() const
35{
36 return state0_.size();
37}
38
40inline Foam::label Foam::lumpedPointMovement::ownerId() const
41{
42 return ownerId_;
43}
44
45
47{
48 ownerId_ = id;
49}
50
51
52inline bool
53Foam::lumpedPointMovement::hasPatchControl(const label patchIndex) const
54{
55 return patchControls_.found(patchIndex);
56}
57
58
59inline bool
60Foam::lumpedPointMovement::hasInterpolator(const label patchIndex) const
61{
62 const auto iter = patchControls_.cfind(patchIndex);
63
64 return (iter.good() && iter().interp_.size());
65}
66
67
70{
71 return coupler_;
72}
73
78}
79
82{
83 return state0_;
84}
85
88{
89 return state_;
90}
91
94{
95 return origin_;
96}
97
98
100(
102) const
103{
104 state.scalePoints(scaleInput_[scalingType::LENGTH]);
105}
106
108inline Foam::scalar Foam::lumpedPointMovement::relax() const
109{
110 return relax_;
111}
112
114inline Foam::scalar& Foam::lumpedPointMovement::relax()
115{
116 return relax_;
117}
118
121{
122 return inputName_;
123}
124
127{
128 return outputName_;
129}
130
131
133{
134 return logName_;
135}
136
137
140{
141 return inputFormat_;
142}
143
144
147{
148 return outputFormat_;
149}
150
151
154{
155 return state0().rotationOrder();
156}
157
159inline bool Foam::lumpedPointMovement::degrees() const
160{
161 return state0().degrees();
162}
163
164
166{
167 return !patchControls_.empty();
168}
169
170
171// ************************************************************************* //
Encapsulates the logic for coordinating between OpenFOAM and an external application.
const word & outputName() const
The output (forces) file name.
bool hasPatchControl(const label patchIndex) const
Check if patch control exists for specified patch.
void scalePoints(lumpedPointState &state) const
Scale the lumped points (on input).
scalar relax() const
The relaxation factor when changing states.
bool degrees() const
Rotation angles in degrees.
const word & logName() const
The log file name.
label size() const
The number of lumped points (number of locations).
lumpedPointMovement::outputFormatType outputFormat() const
The output (forces) file format.
const lumpedPointState & state() const
The current state (positions/rotations).
bool empty() const
If no number of lumped points (locations) were specified.
quaternion::eulerOrder rotationOrder() const
The Euler-angle rotation order.
label ownerId() const
An owner Id, if needed for bookkeeping purposes.
const word & inputName() const
The input (state) file name.
bool hasMapping() const
True if the pressure-zones mapping has already been performed.
outputFormatType
Output format types.
lumpedPointState::inputFormatType inputFormat() const
The input (state) file format.
const externalFileCoupler & coupler() const
Communication control.
const lumpedPointState & state0() const
The initial state (positions/rotations).
bool hasInterpolator(const pointPatch &fpatch) const
Check if patch control exists for specified patch.
const point & origin() const
The offset for lumped points, used on input.
@ LENGTH
The "length" scaling.
The state of lumped points corresponds to positions and rotations.
inputFormatType
Input format types.
eulerOrder
Euler-angle rotation order.
Definition quaternion.H:116
A class for handling words, derived from Foam::string.
Definition word.H:66
vector point
Point is a vector.
Definition point.H:37