14#ifndef SVZERODSOLVER_SOLVE_SOLVER_HPP_
15#define SVZERODSOLVER_SOLVE_SOLVER_HPP_
32 Solver(
const nlohmann::json& config);
77 const std::vector<double>& new_params);
96 std::shared_ptr<Model> model;
98 std::vector<State> states;
99 std::vector<double> times;
102 void sanity_checks();
111 std::vector<std::pair<int, int>> get_vessel_caps_dof_indices();
124 bool check_vessel_cap_convergence(
125 const std::vector<State>& states_last_two_cycles,
126 const std::vector<std::pair<int, int>>& vessel_caps_dof_indices);
140 std::pair<double, double> get_cycle_to_cycle_errors_in_flow_and_pressure(
141 const std::vector<State>& states_last_two_cycles,
142 const std::pair<int, int>& dof_indices);
Source file to read simulation configuration.
std::vector< double > read_block_params(const std::string &block_name)
Read the parameters of a block.
Definition Solver.cpp:367
void run()
Run the simulation.
Definition Solver.cpp:43
Solver(const nlohmann::json &config)
Construct a new Solver object.
Definition Solver.cpp:8
void update_block_params(const std::string &block_name, const std::vector< double > &new_params)
Update the parameters of a block.
Definition Solver.cpp:343
double get_single_result_avg(const std::string &dof_name) const
Get the result of a single DOF averaged over time.
Definition Solver.cpp:331
std::vector< double > get_times() const
Get the time steps of the result.
Definition Solver.cpp:300
Eigen::VectorXd get_single_result(const std::string &dof_name) const
Get the result of a single DOF over time.
Definition Solver.cpp:319
void write_result_to_csv(const std::string &filename) const
Write the result to a csv file.
Definition Solver.cpp:386
std::string get_full_result() const
Get the full result as a csv encoded string.
Definition Solver.cpp:302
State of the system.
Definition State.h:19
Simulation parameters.
Definition SimulationParameters.h:23