@@ -44,7 +44,7 @@ SolverInterface::~SolverInterface() {}
4444 * @param variable_names Vector of all the 0D variable names.
4545 */
4646extern " C" SVZEROD_INTERFACE_API void initialize (
47- std::string input_file_arg, int & problem_id, int & pts_per_cycle,
47+ const std::string& input_file_arg, int & problem_id, int & pts_per_cycle,
4848 int & num_cycles, int & num_output_steps,
4949 std::vector<std::string>& block_names,
5050 std::vector<std::string>& variable_names) {
@@ -194,7 +194,7 @@ extern "C" SVZEROD_INTERFACE_API void set_external_step_size(
194194 * @param params New parameters for the block (structure depends on block type).
195195 */
196196extern " C" SVZEROD_INTERFACE_API void update_block_params (
197- int problem_id, std::string block_name, std::vector<double >& params) {
197+ int problem_id, const std::string& block_name, std::vector<double >& params) {
198198 auto interface = SolverInterface::interface_list_[problem_id];
199199 auto model = interface->model_ ;
200200
@@ -243,7 +243,7 @@ extern "C" SVZEROD_INTERFACE_API void update_block_params(
243243 * @param params Parameters of the block (structure depends on block type).
244244 */
245245extern " C" SVZEROD_INTERFACE_API void read_block_params (
246- int problem_id, std::string block_name, std::vector<double >& params) {
246+ int problem_id, const std::string& block_name, std::vector<double >& params) {
247247 auto interface = SolverInterface::interface_list_[problem_id];
248248 auto model = interface->model_ ;
249249 auto block = model->get_block (block_name);
@@ -270,7 +270,7 @@ extern "C" SVZEROD_INTERFACE_API void read_block_params(
270270 * nodes, outlet flow[0], outlet pressure[0],...}.
271271 */
272272extern " C" SVZEROD_INTERFACE_API void get_block_node_IDs (
273- int problem_id, std::string block_name, std::vector<int >& IDs) {
273+ int problem_id, const std::string& block_name, std::vector<int >& IDs) {
274274 auto interface = SolverInterface::interface_list_[problem_id];
275275 auto model = interface->model_ ;
276276
@@ -347,8 +347,8 @@ extern "C" SVZEROD_INTERFACE_API void return_ydot(int problem_id,
347347 * degrees-of-freedom.
348348 */
349349extern " C" SVZEROD_INTERFACE_API void update_state (
350- int problem_id, std::vector<double > new_state_y,
351- std::vector<double > new_state_ydot) {
350+ int problem_id, const std::vector<double >& new_state_y,
351+ const std::vector<double >& new_state_ydot) {
352352 auto interface = SolverInterface::interface_list_[problem_id];
353353 auto model = interface->model_ ;
354354 auto system_size = interface->system_size_ ;
0 commit comments