Skip to content

Commit

Permalink
Fix Solver operator== and copyctor
Browse files Browse the repository at this point in the history
A few recently added members were missing. Constraints were not copied when cloning a Solver.
  • Loading branch information
dweindl committed Mar 27, 2024
1 parent 790ab44 commit 50ff01a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Solver::Solver(Solver const& other)
, maxsteps_(other.maxsteps_)
, maxtime_(other.maxtime_)
, simulation_timer_(other.simulation_timer_)
, constraints_(other.constraints_)
, sensi_meth_(other.sensi_meth_)
, sensi_meth_preeq_(other.sensi_meth_preeq_)
, stldet_(other.stldet_)
Expand Down Expand Up @@ -564,7 +565,9 @@ bool operator==(Solver const& a, Solver const& b) {
== b.check_sensi_steadystate_conv_)
&& (a.rdata_mode_ == b.rdata_mode_)
&& (a.max_conv_fails_ == b.max_conv_fails_)
&& (a.max_nonlin_iters_ == b.max_nonlin_iters_);
&& (a.max_nonlin_iters_ == b.max_nonlin_iters_)
&& (a.max_step_size_ == b.max_step_size_)
&& (a.constraints_.getVector() == b.constraints_.getVector());

Check warning on line 570 in src/solver.cpp

View check run for this annotation

Codecov / codecov/patch

src/solver.cpp#L568-L570

Added lines #L568 - L570 were not covered by tests
}

void Solver::applyTolerances() const {
Expand Down

0 comments on commit 50ff01a

Please sign in to comment.