14#ifndef SVZERODSOLVER_SOLVE_SOLVER_HPP_
15#define SVZERODSOLVER_SOLVE_SOLVER_HPP_
32 Solver(
const nlohmann::json& config);
83 const std::vector<double>& new_params);
102 std::shared_ptr<Model> model;
104 std::vector<State> states;
107 std::vector<double> times;
111 void sanity_checks();
120 std::vector<std::pair<int, int>> get_vessel_caps_dof_indices();
133 bool check_vessel_cap_convergence(
134 const std::vector<State>& states_last_two_cycles,
135 const std::vector<std::pair<int, int>>& vessel_caps_dof_indices);
149 std::pair<double, double> get_cycle_to_cycle_errors_in_flow_and_pressure(
150 const std::vector<State>& states_last_two_cycles,
151 const std::pair<int, int>& dof_indices);
Source file to read simulation configuration.
Generalized-alpha integrator.
Definition Integrator.h:26
std::vector< double > read_block_params(const std::string &block_name)
Read the parameters of a block.
Definition Solver.cpp:406
void run()
Run the simulation.
Definition Solver.cpp:245
void setup_integrator()
Set up integrator.
Definition Solver.cpp:85
void run_integration()
Run the integration.
Definition Solver.cpp:111
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:382
void setup_initial()
Set up and initialize the simulation parameters and model.
Definition Solver.cpp:59
double get_single_result_avg(const std::string &dof_name) const
Get the result of a single DOF averaged over time.
Definition Solver.cpp:370
std::vector< double > get_times() const
Get the time steps of the result.
Definition Solver.cpp:339
Eigen::VectorXd get_single_result(const std::string &dof_name) const
Get the result of a single DOF over time.
Definition Solver.cpp:358
void write_result_to_csv(const std::string &filename) const
Write the result to a csv file.
Definition Solver.cpp:425
std::string get_full_result() const
Get the full result as a csv encoded string.
Definition Solver.cpp:341
State of the system.
Definition State.h:19
Simulation parameters.
Definition SimulationParameters.h:37