[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnucap-devel] [Help-gnucap] Help adapting POLY H source
From: |
al davis |
Subject: |
Re: [Gnucap-devel] [Help-gnucap] Help adapting POLY H source |
Date: |
Thu, 19 Mar 2015 13:36:42 -0400 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
On Thursday 19 March 2015, Felix Salfelder wrote:
> On Wed, Mar 18, 2015 at 10:13:28PM -0400, al davis wrote:
> > The problem ..... POLY(1) , POLY(2), and POLY(3) are
> > really completely different devices, in spite of all being
> > chosen by the letter H. You can't turn one into another
> > with a bm_ alone.
>
> true.
>
> the problem i encountered was that parsing H (and others)
> from spice gives me an ELEMENT. as i can not change spice, i
> changed ELEMENT -- hence the (unfortunate) dependency on
> gnucap-uf.
Spice has separate parsing code for every device, and there can
be several different devices hiding under one letter. In Gnucap
Spice mode (lang_spice.cc), determining the device type is in
find_type_in_string(), which is trivial in non-spice formats,
but the spice format needs to deal with this.
Other formats do not have this problem.
The new device, in this case, needs to handle the extra partial
derivatives. If you miss the partial derivatives, it may seem
to work in simple tests, but will have convergence and AC
problems.
Remember ....
If I have y = f(x) ...
What is in FPOLY1 is enough ..
x is the input
f0 is the function evaluated
f1 is the derivative df/dx
Extending ..
If I have y = f(x1, x2, x3)
FPOLY1 is no longer adequate
I need for the stamp:
x1, x2, x3 ... inputs
f0 is the function evaluated at (x1, x2, x3)
df/dx1 .. the partial derivative of f with respect to x1
evaluated at (x2, x3)
df/dx2 .. the partial derivative of f with respect to x2
evaluated at (x1, x3)
df/dx3 .. the partial derivative of f with respect to x3
evaluated at (x1, x2)
So the DEV_FPOLY_G and DEV_CPOLY_G use the arrays _values and
_inputs to handle the storage of the partials and inputs. Then
tr_load() (and all *_load) call *_load_extended to load the
extra partials to the matrix.
> > Felix mentioned gnucap-adms and some bm plugins in
> > gnucap-uf. Unfortunately, they are incomplete works in
> > progress that don't yet really work as intended.
>
> gnucap-adms is incomplete, but it gives you a working
> multiplier, see tests/mul.va. better than nothing for all
> applications that need a multiplier.
Proper implementation of a subset is useful, but the problem I
see is that it fails to compile, because it can't find admsxml,
and provides no help about how to get it.
>
> cheers
> felix
>
> _______________________________________________
> Gnucap-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnucap-devel