From 79bb8edc9097f6cd20b701e30172493fe7cf7bb3 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 29 Aug 2022 14:12:43 +0200 Subject: [PATCH] Allow individual current measurements in switches or linear dependent sources. --- src/frontend/inpc_probe.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frontend/inpc_probe.c b/src/frontend/inpc_probe.c index 8be3bdbeb..8a6c3b6bf 100644 --- a/src/frontend/inpc_probe.c +++ b/src/frontend/inpc_probe.c @@ -715,7 +715,13 @@ void inp_probe(struct card* deck) continue; } char* thisline = tmpcard->line; - numnodes = get_number_terminals(thisline); + + /* special treatment for controlled current sources and switches: + We have three or four tokens until model name, but only the first 2 are relevant nodes. */ + if (strchr("fgsw", *instname)) + numnodes = 2; + else + numnodes = get_number_terminals(thisline); /* skip ',' */ if (*tmpstr == ',')