@@ -77,28 +77,9 @@ namespace aspect
77
77
* @ingroup BoundaryVelocities
78
78
*/
79
79
template <int dim>
80
- class Manager : public SimulatorAccess <dim>
80
+ class Manager : public Plugins ::ManagerBase<Interface<dim>>, public SimulatorAccess<dim>
81
81
{
82
82
public:
83
- /* *
84
- * Destructor. Made virtual since this class has virtual member
85
- * functions.
86
- */
87
- ~Manager () override ;
88
-
89
- /* *
90
- * A function that is called at the beginning of each time step and
91
- * calls the corresponding functions of all created plugins.
92
- *
93
- * The point of this function is to allow complex boundary velocity
94
- * models to do an initialization step once at the beginning of each
95
- * time step. An example would be a model that needs to call an
96
- * external program to compute the velocity change at a boundary.
97
- */
98
- virtual
99
- void
100
- update ();
101
-
102
83
/* *
103
84
* A function that calls the boundary_velocity functions of all the
104
85
* individual boundary velocity objects and uses the stored operators
@@ -144,7 +125,11 @@ namespace aspect
144
125
* If there are no prescribed boundary velocity plugins
145
126
* for a particular boundary, this boundary identifier will not appear
146
127
* in the map.
128
+ *
129
+ * @deprecated This function will be removed. Use the function
130
+ * get_active_plugin_names() of the base class ManagerBase instead.
147
131
*/
132
+ DEAL_II_DEPRECATED
148
133
const std::map<types::boundary_id, std::pair<std::string,std::vector<std::string>>> &
149
134
get_active_boundary_velocity_names () const ;
150
135
@@ -156,10 +141,43 @@ namespace aspect
156
141
* boundary models for this boundary. If there are no prescribed
157
142
* boundary velocity plugins for a particular boundary this boundary
158
143
* identifier will not appear in the map.
144
+ *
145
+ * @deprecated This function has been removed. Use the function
146
+ * get_active_plugins() of the base class ManagerBase instead.
159
147
*/
148
+ DEAL_II_DEPRECATED
160
149
const std::map<types::boundary_id,std::vector<std::unique_ptr<BoundaryVelocity::Interface<dim>>>> &
161
150
get_active_boundary_velocity_conditions () const ;
162
151
152
+ /* *
153
+ * Return a list of boundary indicators that indicate for
154
+ * each active plugin which boundary id
155
+ * it is responsible for. The list of active plugins can be
156
+ * requested by calling get_active_plugins().
157
+ */
158
+ const std::vector<types::boundary_id> &
159
+ get_active_plugin_boundary_indicators () const ;
160
+
161
+ /* *
162
+ * Return a component mask that indicates for the given
163
+ * @p boundary_id which velocity components are prescribed by
164
+ * this manager class. All plugins that are responsible
165
+ * for this boundary use the same component mask.
166
+ * The list of plugin objects can be
167
+ * requested by calling get_active_plugins() and the
168
+ * list of boundaries they are responsible for is
169
+ * returned by get_active_plugin_boundary_indicators().
170
+ */
171
+ ComponentMask
172
+ get_component_mask (const types::boundary_id boundary_id) const ;
173
+
174
+ /* *
175
+ * Return a set of boundary indicators for which boundary
176
+ * velocities are prescribed.
177
+ */
178
+ const std::set<types::boundary_id> &
179
+ get_prescribed_boundary_velocity_indicators () const ;
180
+
163
181
/* *
164
182
* Return a list of boundary ids on which the velocity is prescribed
165
183
* to be zero (no-slip).
@@ -188,7 +206,7 @@ namespace aspect
188
206
* then let these objects read their parameters as well.
189
207
*/
190
208
void
191
- parse_parameters (ParameterHandler &prm);
209
+ parse_parameters (ParameterHandler &prm) override ;
192
210
193
211
/* *
194
212
* Go through the list of all boundary velocity models that have been selected
@@ -198,9 +216,15 @@ namespace aspect
198
216
*
199
217
* This function can only be called if the given template type (the first template
200
218
* argument) is a class derived from the Interface class in this namespace.
219
+ *
220
+ * @deprecated Instead of this function, use the
221
+ * Plugins::ManagerBase::has_matching_active_plugin() and
222
+ * Plugins::ManagerBase::get_matching_active_plugin() functions of the base
223
+ * class of the current class.
201
224
*/
202
225
template <typename BoundaryVelocityType,
203
226
typename = typename std::enable_if_t <std::is_base_of<Interface<dim>,BoundaryVelocityType>::value>>
227
+ DEAL_II_DEPRECATED
204
228
bool
205
229
has_matching_boundary_velocity_model () const ;
206
230
@@ -214,9 +238,15 @@ namespace aspect
214
238
*
215
239
* This function can only be called if the given template type (the first template
216
240
* argument) is a class derived from the Interface class in this namespace.
241
+ *
242
+ * @deprecated Instead of this function, use the
243
+ * Plugins::ManagerBase::has_matching_active_plugin() and
244
+ * Plugins::ManagerBase::get_matching_active_plugin() functions of the base
245
+ * class of the current class.
217
246
*/
218
247
template <typename BoundaryVelocityType,
219
248
typename = typename std::enable_if_t <std::is_base_of<Interface<dim>,BoundaryVelocityType>::value>>
249
+ DEAL_II_DEPRECATED
220
250
const BoundaryVelocityType &
221
251
get_matching_boundary_velocity_model () const ;
222
252
@@ -243,9 +273,32 @@ namespace aspect
243
273
<< arg1
244
274
<< " > among the names of registered boundary velocity objects." );
245
275
private:
276
+ /* *
277
+ * A list of boundary indicators that indicate for
278
+ * each plugin in the list of plugin_objects which boundary id
279
+ * it is responsible for. By default each plugin
280
+ * is active for all boundaries, but this list
281
+ * can be modified by derived classes to limit the application
282
+ * of plugins to specific boundaries.
283
+ */
284
+ std::vector<types::boundary_id> boundary_indicators;
285
+
286
+ /* *
287
+ * A list of boundary indicators that indicate for
288
+ * each plugin in the list of plugin_objects which components
289
+ * it is responsible for. By default each plugin
290
+ * is active for all components, but this list
291
+ * can be modified by derived classes to limit the application
292
+ * of plugins to specific boundaries.
293
+ */
294
+ std::vector<ComponentMask> component_masks;
295
+
246
296
/* *
247
297
* A list of boundary velocity objects that have been requested in the
248
298
* parameter file.
299
+ *
300
+ * @deprecated This variable is no longer used, but needed to issue a proper
301
+ * error message in the function get_active_boundary_velocity_conditions().
249
302
*/
250
303
std::map<types::boundary_id,std::vector<std::unique_ptr<BoundaryVelocity::Interface<dim>>>> boundary_velocity_objects;
251
304
@@ -256,9 +309,19 @@ namespace aspect
256
309
* mapped to one of the plugins of velocity boundary conditions (e.g.
257
310
* "function"). If the components string is empty, it is assumed the
258
311
* plugins are used for all components.
312
+ *
313
+ * @deprecated Remove this variable when the deprecated functions
314
+ * get_active_boundary_velocity_names and
315
+ * get_active_boundary_velocity_conditions are removed. Use the base class
316
+ * variable plugin_names instead.
259
317
*/
260
318
std::map<types::boundary_id, std::pair<std::string,std::vector<std::string>>> boundary_velocity_indicators;
261
319
320
+ /* *
321
+ * A set of boundary indicators, on which velocities are prescribed.
322
+ */
323
+ std::set<types::boundary_id> prescribed_velocity_boundary_indicators;
324
+
262
325
/* *
263
326
* A set of boundary indicators, on which velocities are prescribed to
264
327
* zero (no-slip).
0 commit comments