Skip to content

Commit 0118689

Browse files
committed
Un-deprecate RBParameters::get_parameter_names()
Now that we have the possibility of multi-step RBParameters objects, the advice given in the previous deprecation message is no longer accurate, since it is not efficient to iterate over hundreds (or possibly thousands) of steps just to get the list of parameter names.
1 parent 9d49eb0 commit 0118689

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

include/reduced_basis/rb_parameters.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -284,22 +284,20 @@ class RBParameters
284284
/**
285285
* Fill \p param_names with the names of the parameters.
286286
*
287-
* \deprecated to avoid making it too easy to create copies that in
288-
* most circumstances aren't needed. If you really need a list of
289-
* the parameter names, the best approach is to iterate over this
290-
* object using the begin()/end() APIs and build a std::set that
291-
* way.
287+
* Note: this function was previously deprecated, but now that
288+
* multi-step RBParameters objects are possible, this is actually
289+
* the most efficient way to get a list of the parameter names
290+
* stored on this object.
292291
*/
293292
void get_parameter_names(std::set<std::string> & param_names) const;
294293

295294
/**
296295
* Fill \p param_names with the names of the extra parameters.
297296
*
298-
* \deprecated to avoid making it too easy to create copies that in
299-
* most circumstances aren't needed. If you really need a list of
300-
* the parameter names, the best approach is to iterate over this
301-
* object using the extra_begin()/extra_end() APIs and build a std::set that
302-
* way.
297+
* Note: this function was previously deprecated, but now that
298+
* multi-step RBParameters objects are possible, this is actually
299+
* the most efficient way to get a list of the parameter names
300+
* stored on this object.
303301
*/
304302
void get_extra_parameter_names(std::set<std::string> & param_names) const;
305303

src/reduced_basis/rb_parameters.C

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,17 +192,13 @@ unsigned int RBParameters::n_steps() const
192192

193193
void RBParameters::get_parameter_names(std::set<std::string> & param_names) const
194194
{
195-
libmesh_deprecated();
196-
197195
param_names.clear();
198196
for (const auto & pr : _parameters)
199197
param_names.insert(pr.first);
200198
}
201199

202200
void RBParameters::get_extra_parameter_names(std::set<std::string> & param_names) const
203201
{
204-
libmesh_deprecated();
205-
206202
param_names.clear();
207203
for (const auto & pr : _extra_parameters)
208204
param_names.insert(pr.first);

0 commit comments

Comments
 (0)