Qucs-core
0.0.18
|
External interface class for transient simulation. More...
#include <e_trsolver.h>
Public Member Functions | |
ACREATOR (e_trsolver) | |
e_trsolver (char *) | |
e_trsolver (e_trsolver &) | |
~e_trsolver () | |
int | init (nr_double_t, nr_double_t, int) |
bool | isExternal () |
informs whether this is an external sim More... | |
int | stepsolve_sync (nr_double_t synctime) |
void | acceptstep_sync (void) |
int | stepsolve_async (nr_double_t steptime) |
void | acceptstep_async (void) |
void | rejectstep_async (void) |
void | getsolution (double *) |
int | setECVSVoltage (char *ecvsname, nr_double_t V) |
Sets the voltage of an exterally controlled voltage source. More... | |
int | getJacRows () |
Returns the number of rows in the Jacobian matrix for the circuit. More... | |
int | getJacCols () |
Returns the number of columns in the Jacobian matrix for the circuit. More... | |
void | getJacData (int r, int c, nr_double_t &data) |
Obtains the data from the Jacobian matrix for the circuit. More... | |
int | getNodeV (char *label, nr_double_t &nodeV) |
Obtains the voltage of a node by name. More... | |
int | getVProbeV (char *probename, nr_double_t &probeV) |
Obtains the voltage reported by a voltage probe. More... | |
int | getIProbeI (char *probename, nr_double_t &probeI) |
Obtains the current reported by a current probe. More... | |
void | debug (void) |
void | printx (void) |
Public Member Functions inherited from qucs::trsolver | |
ACREATOR (trsolver) | |
trsolver (char *) | |
trsolver (trsolver &) | |
~trsolver () | |
int | solve (void) |
placehoder for solution function More... | |
int | predictor (void) |
int | corrector (void) |
void | nextStates (void) |
void | fillStates (void) |
void | setMode (int) |
void | setDelta (void) |
void | adjustDelta (nr_double_t) |
void | adjustOrder (int reduce=0) |
void | initTR (void) |
void | deinitTR (void) |
void | restart (void) |
void | initDC (void) |
void | initSteps (void) |
void | saveAllResults (nr_double_t) |
nr_double_t | checkDelta (void) |
void | updateCoefficients (nr_double_t) |
void | initHistory (nr_double_t) |
void | updateHistory (nr_double_t) |
void | saveHistory (circuit *) |
void | predictBashford (void) |
void | predictEuler (void) |
void | predictGear (void) |
void | initCircuitTR (circuit *) |
void | fillSolution (tvector< nr_double_t > *) |
int | dcAnalysis (void) |
Public Member Functions inherited from qucs::nasolver< nr_type_t > | |
nasolver () | |
nasolver (char *) | |
nasolver (nasolver &) | |
~nasolver () | |
int | solve_once (void) |
int | solve_nonlinear (void) |
int | solve_nonlinear_continuation_gMin (void) |
int | solve_nonlinear_continuation_Source (void) |
int | solve_linear (void) |
void | solve_pre (void) |
void | solve_post (void) |
void | setDescription (const char *n) |
const char * | getDescription (void) |
void | saveResults (const char *, const char *, int, qucs::vector *f=NULL) |
void | setCalculation (calculate_func_t f) |
void | calculate (void) |
const char * | getHelperDescription (void) |
int | getN () |
Returns the number of node voltages in the circuit. More... | |
int | getM () |
Returns the number of branch currents in the circuit. More... | |
Public Member Functions inherited from qucs::analysis | |
analysis () | |
Constructor (Unnamed) More... | |
analysis (char *) | |
analysis (analysis &) | |
~analysis () | |
Destructor. More... | |
virtual int | initialize (void) |
placehoder for initialization function More... | |
virtual int | cleanup (void) |
placehoder for cleanup function More... | |
dataset * | getData (void) |
void | setData (dataset *d) |
net * | getNet (void) |
void | setNet (net *netlist) |
environment * | getEnv (void) |
void | setEnv (environment *e) |
ptrlist< analysis > * | getAnalysis (void) |
void | setAnalysis (ptrlist< analysis > *a) |
void | addAnalysis (analysis *) |
void | delAnalysis (analysis *) |
int | getType (void) |
void | setType (int t) |
sweep * | createSweep (const char *) |
create a named sweep object More... | |
void | saveVariable (const char *, nr_complex_t, qucs::vector *) |
Save variable into analysis dataset. More... | |
bool | getProgress (void) |
get More... | |
void | setProgress (bool p) |
Sets the progress. More... | |
Public Member Functions inherited from qucs::object | |
object () | |
object (const char *) | |
object (const object &) | |
virtual | ~object () |
object * | getNext (void) |
void | setNext (object *o) |
object * | getPrev (void) |
void | setPrev (object *o) |
void | setName (const char *) |
char * | getName (void) |
void | addProperty (property *) |
property * | addProperty (const char *, const char *) |
property * | addProperty (const char *, nr_double_t) |
property * | addProperty (const char *, variable *) |
void | setProperty (const char *, char *) |
void | setProperty (const char *, nr_double_t) |
void | setScaledProperty (const char *, nr_double_t) |
void | setProperty (const char *, variable *) |
vector * | getPropertyVector (const char *) |
char * | getPropertyString (const char *) |
char * | getPropertyReference (const char *) |
nr_double_t | getPropertyDouble (const char *) |
nr_double_t | getScaledProperty (const char *) |
int | getPropertyInteger (const char *) |
bool | hasProperty (const char *) |
bool | isPropertyGiven (const char *) |
void | copyProperties (property *) |
void | deleteProperties (void) |
int | countProperties (void) |
char * | propertyList (void) |
object () | |
object (const char *) | |
object (const object &) | |
virtual | ~object () |
object * | getNext (void) |
void | setNext (object *o) |
object * | getPrev (void) |
void | setPrev (object *o) |
void | setName (const char *) |
char * | getName (void) |
void | addProperty (property *) |
property * | addProperty (const char *, const char *) |
property * | addProperty (const char *, nr_double_t) |
property * | addProperty (const char *, variable *) |
void | setProperty (const char *, char *) |
void | setProperty (const char *, nr_double_t) |
void | setScaledProperty (const char *, nr_double_t) |
void | setProperty (const char *, variable *) |
vector * | getPropertyVector (const char *) |
char * | getPropertyString (const char *) |
char * | getPropertyReference (const char *) |
nr_double_t | getPropertyDouble (const char *) |
nr_double_t | getScaledProperty (const char *) |
int | getPropertyInteger (const char *) |
bool | hasProperty (const char *) |
bool | isPropertyGiven (const char *) |
void | copyProperties (property *) |
void | deleteProperties (void) |
int | countProperties (void) |
char * | propertyList (void) |
Public Member Functions inherited from qucs::states< state_type_t > | |
states () | |
states (const states &) | |
~states () | |
state_type_t | getState (int, int n=0) |
void | setState (int, state_type_t, int n=0) |
void | initStates (void) |
void | clearStates (void) |
int | getStates (void) |
void | setStates (int n) |
void | nextState (void) |
void | prevState (void) |
void | fillState (int, state_type_t) |
void | saveState (int, state_type_t *) |
void | inputState (int, state_type_t *) |
Data Fields | |
ETR | |
PROP_ACTION | |
PROP_NO_SUBSTRATE | |
PROP_LINEAR | |
void(* | messagefcn )(int level, const char *format,...) |
Pointer to function used to print messages during a sim. More... | |
Data Fields inherited from qucs::trsolver | |
TR | |
PROP_ACTION | |
PROP_NO_SUBSTRATE | |
PROP_LINEAR | |
Private Member Functions | |
void | initETR (nr_double_t start, nr_double_t, int) |
void | truncateHistory (nr_double_t) |
void | updateExternalInterpTime (nr_double_t) |
void | storeHistoryAges (void) |
void | updateHistoryAges (nr_double_t) |
void | adjustDelta_sync (nr_double_t) |
void | restoreSolution (void) |
void | copySolution (tvector< nr_double_t > *[8], tvector< nr_double_t > *[8]) |
void | fillLastSolution (tvector< nr_double_t > *) |
Private Attributes | |
int | MaxIterations |
nr_double_t | reltol |
nr_double_t | abstol |
nr_double_t | vntol |
nr_double_t | time |
nr_double_t | saveCurrent |
nr_double_t | lastsynctime |
int | running |
int | rejected |
int | convError |
std::vector< nr_double_t > | initialhistages |
tvector< nr_double_t > * | lastsolution [8] |
nr_double_t | lastasynctime |
nr_double_t | lastdeltas [8] |
nr_double_t | lastdelta |
External interface class for transient simulation.
This class provides access to the transient solving functionality of Qucs for external software.
Definition at line 1104 of file e_trsolver.cpp.
qucs::e_trsolver::e_trsolver | ( | char * | n | ) |
Definition at line 107 of file e_trsolver.cpp.
qucs::e_trsolver::e_trsolver | ( | e_trsolver & | o | ) |
Definition at line 151 of file e_trsolver.cpp.
qucs::e_trsolver::~e_trsolver | ( | ) |
Definition at line 124 of file e_trsolver.cpp.
void qucs::e_trsolver::acceptstep_async | ( | void | ) |
Definition at line 780 of file e_trsolver.cpp.
void qucs::e_trsolver::acceptstep_sync | ( | void | ) |
Definition at line 507 of file e_trsolver.cpp.
qucs::e_trsolver::ACREATOR | ( | e_trsolver | ) |
|
private |
Definition at line 555 of file e_trsolver.cpp.
|
private |
Definition at line 826 of file e_trsolver.cpp.
void qucs::e_trsolver::debug | ( | void | ) |
Definition at line 161 of file e_trsolver.cpp.
|
private |
Definition at line 285 of file e_trsolver.cpp.
int qucs::e_trsolver::getIProbeI | ( | char * | probename, |
nr_double_t & | probeI | ||
) |
Obtains the current reported by a current probe.
probename | Pointer to character array containing the name of the probe |
probeI | Reference to nr_double_t in which the current will be returned |
This method searches for the current probe with the given name in probename. If the probe exists, the value of the probe current is copied to probeI. Returns 0 if the probe with the given name was found and -1 otherwise.
Definition at line 949 of file e_trsolver.cpp.
int qucs::e_trsolver::getJacCols | ( | ) |
Returns the number of columns in the Jacobian matrix for the circuit.
Definition at line 1066 of file e_trsolver.cpp.
Obtains the data from the Jacobian matrix for the circuit.
r | Pointer to character array containing the name of the voltage |
c | Reference to nr_double_t in which the node voltage will be returned |
Definition at line 1071 of file e_trsolver.cpp.
int qucs::e_trsolver::getJacRows | ( | ) |
Returns the number of rows in the Jacobian matrix for the circuit.
Definition at line 1061 of file e_trsolver.cpp.
int qucs::e_trsolver::getNodeV | ( | char * | label, |
nr_double_t & | nodeV | ||
) |
Obtains the voltage of a node by name.
label | Pointer to character array containing the name of the voltage |
nodeV | Reference to nr_double_t in which the node voltage will be returned |
This method searches for the node with the given name in label. If the node exists, the value of the voltage at that node is copied to nodeV. Returns 0 if the node was found, and -1 otherwise.
Definition at line 887 of file e_trsolver.cpp.
void qucs::e_trsolver::getsolution | ( | double * | lastsol | ) |
Definition at line 873 of file e_trsolver.cpp.
int qucs::e_trsolver::getVProbeV | ( | char * | probename, |
nr_double_t & | probeV | ||
) |
Obtains the voltage reported by a voltage probe.
probename | Pointer to character array containing the name of the probe |
probeV | Reference to nr_double_t in which the node voltage will be returned |
This method searches for the voltage probe with the given name in probename. If the probe exists, the value of the probe voltage is copied to probeV. Returns 0 if the probe with the given name was found and -1 otherwise.
Definition at line 903 of file e_trsolver.cpp.
Definition at line 180 of file e_trsolver.cpp.
|
private |
Definition at line 292 of file e_trsolver.cpp.
|
inlinevirtual |
informs whether this is an external sim
External simulations will be ignored by qucsator. This function is used to determine whether the analysis is external or not.
Reimplemented from qucs::analysis.
Definition at line 66 of file e_trsolver.h.
void qucs::e_trsolver::printx | ( | void | ) |
Definition at line 370 of file e_trsolver.cpp.
void qucs::e_trsolver::rejectstep_async | ( | void | ) |
Definition at line 798 of file e_trsolver.cpp.
|
private |
int qucs::e_trsolver::setECVSVoltage | ( | char * | ecvsname, |
nr_double_t | V | ||
) |
Sets the voltage of an exterally controlled voltage source.
ecvsname | The name of the voltage source to be set. |
V | New value of the voltage. |
This method searches for the ecvs component with the given name in ecvsname. If the ecvs exists, the value of the voltage to be set at the next time step is set to the supplied value in V.
You can set the voltage of ecvs components in subcircuits created by using a name up of the subcircuit heirarchy it is in, e.g. the name
SUBtop.SUBlower.ECVS1
to set the voltage of an ecvs named ECVS1 which is located in subcircuit SUBlower, which is itself in subcircuit SUBtop in the top level circuit.
Returns 0 if the ecvs was found, and -1 otherwise.
Definition at line 990 of file e_trsolver.cpp.
int qucs::e_trsolver::stepsolve_async | ( | nr_double_t | steptime | ) |
Definition at line 637 of file e_trsolver.cpp.
int qucs::e_trsolver::stepsolve_sync | ( | nr_double_t | synctime | ) |
Definition at line 407 of file e_trsolver.cpp.
|
private |
Definition at line 272 of file e_trsolver.cpp.
|
private |
Definition at line 1051 of file e_trsolver.cpp.
|
private |
Definition at line 1031 of file e_trsolver.cpp.
|
private |
Definition at line 840 of file e_trsolver.cpp.
|
private |
Definition at line 175 of file e_trsolver.h.
|
private |
Definition at line 182 of file e_trsolver.h.
qucs::e_trsolver::ETR |
Definition at line 1105 of file e_trsolver.cpp.
|
private |
Definition at line 197 of file e_trsolver.h.
|
private |
Definition at line 199 of file e_trsolver.h.
|
private |
Definition at line 201 of file e_trsolver.h.
|
private |
Definition at line 200 of file e_trsolver.h.
|
private |
Definition at line 198 of file e_trsolver.h.
|
private |
Definition at line 179 of file e_trsolver.h.
|
private |
Definition at line 173 of file e_trsolver.h.
void(* qucs::e_trsolver::messagefcn)(int level, const char *format,...) |
Pointer to function used to print messages during a sim.
level | Inter flag indicating the log level |
format | Formatting string in the same format as printf |
... | Additional arguments to the printing function |
By default this points to the standard Qucs logprint function (found in logging.c) on creation of an e_trsolver instance. The log level flag indicates whether the message is a status update or an error message. format contains the formatting string in the same style as printf (when using logprint). The additional arguments are used by logprint in the supplied formatting string.
Definition at line 169 of file e_trsolver.h.
qucs::e_trsolver::PROP_ACTION |
Definition at line 1105 of file e_trsolver.cpp.
qucs::e_trsolver::PROP_LINEAR |
Definition at line 1105 of file e_trsolver.cpp.
qucs::e_trsolver::PROP_NO_SUBSTRATE |
Definition at line 1105 of file e_trsolver.cpp.
|
private |
Definition at line 181 of file e_trsolver.h.
|
private |
Definition at line 174 of file e_trsolver.h.
|
private |
Definition at line 180 of file e_trsolver.h.
|
private |
Definition at line 178 of file e_trsolver.h.
|
private |
Definition at line 177 of file e_trsolver.h.
|
private |
Definition at line 176 of file e_trsolver.h.