temperature, precalc
Felix Salfelder <[email protected]>
| Newsgroups | gmane.comp.gnu.gnucap.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Feb 26, 2016 at 12:06:41PM -0500, al davis wrote:
> Do you have some test cases that demonstrate the problem, and that it
> is fixed?
(apologies for promoting gtithub)
https://github.com/felix-salfelder/gnucap/blob/testing-uf/tests/dc_temp.ckt
https://github.com/felix-salfelder/gnucap/blob/testing-uf/tests/dc_temp.ckt.ref
https://github.com/felix-salfelder/gnucap/blob/testing-uf/tests/tran_temp.gc
https://github.com/felix-salfelder/gnucap/blob/testing-uf/tests/tran_temp.ref
> Doing a code walk-through .. I see the problem, but this patch doesn't
> fix it. In some cases, temperature is handled in precalc_first().
lets fix s__init first, then all the devices. i can do some of them,
later.
> I think a better change to the code is to not use the flags, but
> instead move precalc_last() to always happen after setup().
i.e.
try {
setup(cmd);
+ CARD_LIST::card_list.precalc_last();
::status.set_up.stop();
in s__init.cc? perfect. it has been like this in gnucap-uf for years :D
(anyway, just trying to reduce the difference).
void SIM_DATA::init() calls precalc_last. i have never tried to remove
that. maybe i should. (also later).
> It probably should be
> that unless the calculations are needed before expand() and setup(), it
> they should be in precalc_last(). A lot of devices need to change.
yes, that wording makes perfect sense. that's what i did in -uf without
ever putting it down anywhere.
thanks
felix