Added fucnctions conversion

This commit is contained in:
Vadim Kuznetzov 2015-04-18 10:13:56 +03:00
parent 24f93f75de
commit b1a6550fb2
2 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#include "qucs2spice.h"
#include "spicecompat.h"
#include "components/equation.h"
namespace qucs2spice
@ -336,6 +337,9 @@ QString qucs2spice::convert_edd(QString line, QStringList &EqnsAndVars)
QStringList Itokens;
Equation::splitEqn(Ieqn,Itokens);
subsVoltages(Itokens,plus,minus);
for(QStringList::iterator it = Itokens.begin();it != Itokens.end(); it++) {
*it = spicecompat::convert_functions(*it,false);
}
s += QString("BI%1 %2 %3 I=%4\n").arg(nam).arg(minus).arg(plus).arg(Itokens.join(""));
// charge part

View File

@ -53,7 +53,9 @@ QString spicecompat::convert_functions(QString tok, bool isXyce)
conv_list_ngspice<<"q"<<"1.6021765e-19"
<<"kB"<<"1.38065e-23"
<<"pi"<<"3.1415926539"
<<"step"<<"stp";
<<"step"<<"stp"
<<"sign"<<"sgn"
<<"log10"<<"log";
QStringList conv_list_xyce = conv_list_ngspice;
QStringList conv_list;