diff --git a/ProcessLib/ProcessOutput.cpp b/ProcessLib/ProcessOutput.cpp index fd130468a9417eae8d8b8239f0c91d51de1f52ea..a49ded0a4802164ebe1bbdd7df6e2c9e8cfd6f22 100644 --- a/ProcessLib/ProcessOutput.cpp +++ b/ProcessLib/ProcessOutput.cpp @@ -15,10 +15,7 @@ namespace ProcessLib { -ProcessOutput::ProcessOutput(BaseLib::ConfigTree const& output_config, - std::vector<std::reference_wrapper<ProcessVariable>> const& - process_variables, - SecondaryVariableCollection const& secondary_variables) +ProcessOutput::ProcessOutput(BaseLib::ConfigTree const& output_config) { //! \ogs_file_param{process__output__variables} auto const out_vars = output_config.getConfigSubtree("variables"); diff --git a/ProcessLib/ProcessOutput.h b/ProcessLib/ProcessOutput.h index d791b0ac17c5f561ceceb0d1b80da9e2835ac8cf..db13504f76676e20efd38b0c4abb6655586bd8fe 100644 --- a/ProcessLib/ProcessOutput.h +++ b/ProcessLib/ProcessOutput.h @@ -20,10 +20,7 @@ namespace ProcessLib struct ProcessOutput final { //! Constructs a new instance. - ProcessOutput(BaseLib::ConfigTree const& output_config, - std::vector<std::reference_wrapper<ProcessVariable>> const& - process_variables, - SecondaryVariableCollection const& secondary_variables); + ProcessOutput(BaseLib::ConfigTree const& output_config); //! All variables that shall be output. std::set<std::string> output_variables; diff --git a/ProcessLib/SecondaryVariable.cpp b/ProcessLib/SecondaryVariable.cpp index ee7f24b3cca1852b226b7ca4fe514e6dee2e67e2..170329384eecbe37e520fb585240ec4f1cb53cf5 100644 --- a/ProcessLib/SecondaryVariable.cpp +++ b/ProcessLib/SecondaryVariable.cpp @@ -12,17 +12,6 @@ namespace ProcessLib { -SecondaryVariableCollection::SecondaryVariableCollection( - std::initializer_list<std::string> internal_names) -{ - // read which variables are defined in the config - for (auto const& internal_name : internal_names) { - if (!_all_secondary_variables.insert(internal_name).second) { - OGS_FATAL("Tag name <%s> has been specified twice as a secondary variable."); - } - } -} - void SecondaryVariableCollection::addNameMapping(std::string const& internal_name, std::string const& external_name) { @@ -35,13 +24,6 @@ void SecondaryVariableCollection::addNameMapping(std::string const& internal_nam "Secondary variable names must be unique."); } -bool SecondaryVariableCollection::variableExists( - std::string const& external_name) const -{ - return _map_external_to_internal.find(external_name) != - _map_external_to_internal.cend(); -} - void SecondaryVariableCollection::addSecondaryVariable( std::string const& internal_name, const unsigned num_components, diff --git a/ProcessLib/SecondaryVariable.h b/ProcessLib/SecondaryVariable.h index dff5f9c006d3325215f0fe461aaf93557bf38355..065f56f806513f70e78305f2a06348ca02719a65 100644 --- a/ProcessLib/SecondaryVariable.h +++ b/ProcessLib/SecondaryVariable.h @@ -99,23 +99,10 @@ struct SecondaryVariable final class SecondaryVariableCollection final { public: - /*! Constructs new instance. - * - * \param internal_names list of internal variable names known initially. - */ - SecondaryVariableCollection( - std::initializer_list<std::string> internal_names); - //! Register a variable with the given internal and external names. void addNameMapping(std::string const& internal_name, std::string const& external_name); - /*! Tells if a secondary variable with the specified name has been set up. - * - * \note \c external_name is not the tag name in the project file! - */ - bool variableExists(std::string const& external_name) const; - /*! Set up a secondary variable. * * \param internal_name the tag in the project file associated with this @@ -132,20 +119,7 @@ public: const unsigned num_components, SecondaryVariableFunctions&& fcts); - //! Returns an iterator to the first secondary variable. - std::map<std::string, SecondaryVariable>::const_iterator - begin() const - { - return _configured_secondary_variables.begin(); - } - - //! Returns an iterator past the last secondary variable. - std::map<std::string, SecondaryVariable>::const_iterator - end() const - { - return _configured_secondary_variables.end(); - } - + //! Returns the secondary variable with the given external name. SecondaryVariable const& get(std::string const& external_name); private: