Skip to content

Commit

Permalink
minor error checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sg-s committed Aug 23, 2019
1 parent bc1d456 commit 49d5407
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions @xolotl/integrate.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
self.sim_dt = self.dt;
end

assert(self.t_end > 1,'t_end too short')
assert(self.sim_dt > 0,'sim_dt must be positive')
assert(self.dt > 0,'dt must be positive')

% check that the simulation doesn't exceed C++ intmax
assert(self.t_end/self.sim_dt<intmax,'Simulation is too long. The number of steps required exceeds INT_MAX')

Expand Down

0 comments on commit 49d5407

Please sign in to comment.