Skip to content

Commit cbc851f

Browse files
committed
Deprecate RBParametrized::get_parameter_names()
1 parent d5f6ea4 commit cbc851f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

include/reduced_basis/rb_parametrized.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ class RBParametrized : public ReferenceCountedObject<RBParametrized>
9090

9191
/**
9292
* Get a set that stores the parameter names.
93+
*
94+
* \deprecated to avoid making it too easy to create copies that in
95+
* most circumstances aren't needed. If this functionality really
96+
* is required, call get_parameters_min().get_parameters_map() and
97+
* loop over the keys directly.
9398
*/
9499
std::set<std::string> get_parameter_names() const;
95100

src/reduced_basis/rb_parametrized.C

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,9 @@ unsigned int RBParametrized::get_n_discrete_params() const
129129

130130
std::set<std::string> RBParametrized::get_parameter_names() const
131131
{
132+
libmesh_deprecated();
132133
libmesh_error_msg_if(!parameters_initialized, "Error: parameters not initialized in RBParametrized::get_parameter_names");
133134

134-
// TODO: We may also want to deprecate this funtion since there is
135-
// already a public accessor for the parameters_min member.
136135
std::set<std::string> parameter_names;
137136
const auto & params_map = parameters_min.get_parameters_map();
138137
for (const auto & pr : params_map)

0 commit comments

Comments
 (0)