Loading...
Searching...
No Matches
lumpedPointController.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) 2019-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
26Class
27 Foam::lumpedPointController
28
29Description
30 Simple connectivity of point labels to specify a controller for lumped
31 point movement.
32
33 \heading Dictionary parameters
34 \table
35 Property | Description | Required | Default
36 pointLabels | List of point labels | yes |
37 \endtable
38
39Note
40 If the calling program itself specified a point-label mapping
41 (eg, original ids from FEA), these can be used initially and remapped.
42
43SourceFiles
44 lumpedPointController.C
45
46\*---------------------------------------------------------------------------*/
47
48#ifndef lumpedPointController_H
49#define lumpedPointController_H
50
51#include "List.H"
52
53// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54
55namespace Foam
56{
57
58// Forward Declarations
59class dictionary;
60template<class T> class Map;
61
62/*---------------------------------------------------------------------------*\
63 Class lumpedPointController Declaration
64\*---------------------------------------------------------------------------*/
65
67{
68 // Private Data
69
70 //- The lumped points associated with the controller
71 labelList pointLabels_;
72
73
74public:
75
76 // Constructors
77
78 //- Default construct
80
81 //- Copy construct from point ids
83
84 //- Move construct from point ids
86
87 //- Construct from dictionary
88 explicit lumpedPointController(const dictionary& dict);
89
90
91 //- Factory method
93 {
95 }
96
97
98 //- Destructor
99 ~lumpedPointController() = default;
100
101
102 // Member Functions
103
104 //- No controller points specified?
105 bool empty() const
106 {
107 return pointLabels_.empty();
108 }
110 //- Number of controller points specified
111 label size() const
112 {
113 return pointLabels_.size();
114 }
115
116 //- The controller points
117 const labelList& pointLabels() const
119 return pointLabels_;
120 }
121
122 //- Check point mapping (the count) or remap the point labels
124 (
125 const label nPoints,
126 const Map<label>& originalIds
127 );
128};
129
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133} // End namespace Foam
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137#endif
138
139// ************************************************************************* //
A HashTable to objects of type <T> with a label key.
Definition Map.H:54
bool empty() const noexcept
True if List is empty (ie, size() is zero).
Definition UList.H:701
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Definition autoPtr.H:178
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Simple connectivity of point labels to specify a controller for lumped point movement.
const labelList & pointLabels() const
The controller points.
~lumpedPointController()=default
Destructor.
void remapPointLabels(const label nPoints, const Map< label > &originalIds)
Check point mapping (the count) or remap the point labels.
lumpedPointController() noexcept
Default construct.
bool empty() const
No controller points specified?
label size() const
Number of controller points specified.
static autoPtr< lumpedPointController > New(const dictionary &dict)
Factory method.
label nPoints
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
const direction noexcept
Definition scalarImpl.H:265
UList< label > labelUList
A UList of labels.
Definition UList.H:75
dictionary dict