[Pkg-electronics-commits] [gnucap] 37/47: transient-3: bug fix .. catch trsteporder out of range user error
felix salfelder
felix-guest at moszumanska.debian.org
Mon Sep 26 10:37:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository gnucap.
commit 2d7237bc1eb18be4795c37f937570a1e2ffd4979
Author: al davis <ad211 at freeelectron.net>
Date: Tue Sep 20 13:18:50 2016 -0400
transient-3: bug fix .. catch trsteporder out of range user error
---
lib/e_elemnt.cc | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/e_elemnt.cc b/lib/e_elemnt.cc
index 64c3f73..6534784 100644
--- a/lib/e_elemnt.cc
+++ b/lib/e_elemnt.cc
@@ -1,4 +1,4 @@
-/*$Id: e_elemnt.cc 2016/03/25 al $ -*- C++ -*-
+/*$Id: e_elemnt.cc 2016/09/20 al $ -*- C++ -*-
* Copyright (C) 2001 Albert Davis
* Author: Albert Davis <aldavis at gnu.org>
*
@@ -395,7 +395,15 @@ XPROBE ELEMENT::ac_probe_ext(const std::string& x)const
/*--------------------------------------------------------------------------*/
double ELEMENT::tr_review_trunc_error(const FPOLY1* q)
{
- int error_deriv = order()+1;
+ int error_deriv;
+ if (order() >= OPT::_keep_time_steps - 2) {
+ error_deriv = OPT::_keep_time_steps - 1;
+ }else if (order() < 0) {untested();
+ error_deriv = 1;
+ }else{
+ error_deriv = order()+1;
+ }
+
double timestep;
if (_time[0] <= 0.) {
// DC, I know nothing
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gnucap.git
More information about the Pkg-electronics-commits
mailing list