From 628cef3d97103a7a7348f66c1a9f6a7680b64443 Mon Sep 17 00:00:00 2001 From: couriersud Date: Mon, 28 Mar 2016 13:45:45 +0200 Subject: [PATCH] Added some notes about Sherman-Morrison. --- nl_examples/kidniki.c | 4 ++-- src/lib/netlist/solver/nld_ms_sm.h | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/nl_examples/kidniki.c b/nl_examples/kidniki.c index 263e0d3eb7d..603d2064f8d 100644 --- a/nl_examples/kidniki.c +++ b/nl_examples/kidniki.c @@ -14,8 +14,8 @@ NETLIST_START(dummy) PARAM(Solver.NR_LOOPS, 300) PARAM(Solver.GS_LOOPS, 1) PARAM(Solver.GS_THRESHOLD, 6) - PARAM(Solver.ITERATIVE, "SM") - //PARAM(Solver.ITERATIVE, "MAT") + //PARAM(Solver.ITERATIVE, "SM") + PARAM(Solver.ITERATIVE, "MAT") //PARAM(Solver.ITERATIVE, "GMRES") //PARAM(Solver.ITERATIVE, "SOR") PARAM(Solver.DYNAMIC_TS, 0) diff --git a/src/lib/netlist/solver/nld_ms_sm.h b/src/lib/netlist/solver/nld_ms_sm.h index 81395a11492..7336e060510 100644 --- a/src/lib/netlist/solver/nld_ms_sm.h +++ b/src/lib/netlist/solver/nld_ms_sm.h @@ -3,6 +3,31 @@ /* * nld_ms_direct.h * + * + * Sherman-Morrison Solver + * + * Computes the updated inverse of A given that the change in A is + * + * A <- A + (u x v) u,v vectors + * + * In this specific implementation, u is a unit vector specifying the row which + * changed. Thus v contains the changed column. + * + * Than z = A⁻¹ u , w = transpose(A⁻¹) v , lambda = v z + * + * A⁻¹ <- 1.0 / (1.0 + lambda) * (z x w) + * + * The approach is iterative and applied for each row changed. + * + * The performance for a typical circuit like kidniki compared to Gaussian + * elimination is poor: + * + * a) The code needs to be run for each row change. + * b) The inverse of A typically is fully occupied. + * + * It may have advantages for circuits with a high number of elements and only + * few dynamic/active components. + * */ #ifndef NLD_MS_SM_H_