Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
qucs::nasolver< nr_type_t > Class Template Reference

#include <nasolver.h>

Inheritance diagram for qucs::nasolver< nr_type_t >:
qucs::analysis qucs::object qucs::acsolver qucs::dcsolver qucs::trsolver qucs::e_trsolver

Public Types

typedef void(* calculate_func_t )(nasolver< nr_type_t > *)
 

Public Member Functions

 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 solve (void)
 placehoder for solution function More...
 
virtual int initialize (void)
 placehoder for initialization function More...
 
virtual int cleanup (void)
 placehoder for cleanup function More...
 
virtual bool isExternal (void)
 informs whether this is an external sim 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 ()
 
objectgetNext (void)
 
void setNext (object *o)
 
objectgetPrev (void)
 
void setPrev (object *o)
 
void setName (const char *)
 
char * getName (void)
 
void addProperty (property *)
 
propertyaddProperty (const char *, const char *)
 
propertyaddProperty (const char *, nr_double_t)
 
propertyaddProperty (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 *)
 
vectorgetPropertyVector (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 ()
 
objectgetNext (void)
 
void setNext (object *o)
 
objectgetPrev (void)
 
void setPrev (object *o)
 
void setName (const char *)
 
char * getName (void)
 
void addProperty (property *)
 
propertyaddProperty (const char *, const char *)
 
propertyaddProperty (const char *, nr_double_t)
 
propertyaddProperty (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 *)
 
vectorgetPropertyVector (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)
 

Protected Member Functions

void restartNR (void)
 
void savePreviousIteration (void)
 
void restorePreviousIteration (void)
 
int countNodes (void)
 
int getNodeNr (char *)
 
int findAssignedNode (circuit *, int)
 
int countVoltageSources (void)
 
void saveSolution (void)
 
circuitfindVoltageSource (int)
 
void applyNodeset (bool nokeep=true)
 
void createNoiseMatrix (void)
 
void runMNA (void)
 
void createMatrix (void)
 
void storeSolution (void)
 
void recallSolution (void)
 
int checkConvergence (void)
 

Protected Attributes

tvector< nr_type_t > * z
 
tvector< nr_type_t > * x
 
tvector< nr_type_t > * xprev
 
tvector< nr_type_t > * zprev
 
tmatrix< nr_type_t > * A
 
tmatrix< nr_type_t > * C
 
int iterations
 
int convHelper
 
int fixpoint
 
int eqnAlgo
 
int updateMatrix
 
nr_double_t gMin
 
nr_double_t srcFactor
 
const char * desc
 
nodelistnlist
 
- Protected Attributes inherited from qucs::analysis
int runs
 
int type
 
net * subnet
 
dataset * data
 
environment * env
 
ptrlist< analysis > * actions
 
bool progress
 

Private Member Functions

void assignVoltageSources (void)
 
void createGMatrix (void)
 
void createBMatrix (void)
 
void createCMatrix (void)
 
void createDMatrix (void)
 
void createIVector (void)
 
void createEVector (void)
 
void createZVector (void)
 
void applyAttenuation (void)
 
void lineSearch (void)
 
void steepestDescent (void)
 
char * createV (int, const char *, int)
 
char * createI (int, const char *, int)
 
char * createOP (const char *, const char *)
 
void saveNodeVoltages (void)
 
void saveBranchCurrents (void)
 
nr_type_t MatValX (nr_complex_t, nr_complex_t *)
 
nr_type_t MatValX (nr_complex_t, nr_double_t *)
 

Private Attributes

eqnsys< nr_type_t > * eqns
 
nr_double_t reltol
 
nr_double_t abstol
 
nr_double_t vntol
 
nasolution< nr_type_t > solution
 
calculate_func_t calculate_func
 

Detailed Description

template<class nr_type_t>
class qucs::nasolver< nr_type_t >

Definition at line 51 of file nasolver.h.

Member Typedef Documentation

template<class nr_type_t>
typedef void(* qucs::nasolver< nr_type_t >::calculate_func_t)(nasolver< nr_type_t > *)

Definition at line 68 of file nasolver.h.

Constructor & Destructor Documentation

template<class nr_type_t >
qucs::nasolver< nr_type_t >::nasolver ( )

Definition at line 63 of file nasolver.cpp.

template<class nr_type_t >
qucs::nasolver< nr_type_t >::nasolver ( char *  n)

Definition at line 80 of file nasolver.cpp.

template<class nr_type_t >
qucs::nasolver< nr_type_t >::nasolver ( nasolver< nr_type_t > &  o)

Definition at line 112 of file nasolver.cpp.

template<class nr_type_t >
qucs::nasolver< nr_type_t >::~nasolver ( )

Definition at line 97 of file nasolver.cpp.

Member Function Documentation

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::applyAttenuation ( void  )
private

Definition at line 1017 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::applyNodeset ( bool  nokeep = true)
protected

Definition at line 247 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::assignVoltageSources ( void  )
private

Definition at line 969 of file nasolver.cpp.

template<class nr_type_t>
void qucs::nasolver< nr_type_t >::calculate ( void  )
inline

Definition at line 70 of file nasolver.h.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::checkConvergence ( void  )
protected

Definition at line 1132 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::countNodes ( void  )
protected

Definition at line 912 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::countVoltageSources ( void  )
protected

Definition at line 944 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createBMatrix ( void  )
private

Definition at line 600 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createCMatrix ( void  )
private

Definition at line 640 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createDMatrix ( void  )
private

Definition at line 674 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createEVector ( void  )
private

Definition at line 885 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createGMatrix ( void  )
private

Definition at line 706 of file nasolver.cpp.

template<class nr_type_t >
char * qucs::nasolver< nr_type_t >::createI ( int  n,
const char *  amps,
int  saveOPs 
)
private

Definition at line 1405 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createIVector ( void  )
private

Definition at line 855 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createMatrix ( void  )
protected

Definition at line 536 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createNoiseMatrix ( void  )
protected

Definition at line 741 of file nasolver.cpp.

template<class nr_type_t >
char * qucs::nasolver< nr_type_t >::createOP ( const char *  c,
const char *  n 
)
private

Definition at line 1382 of file nasolver.cpp.

template<class nr_type_t >
char * qucs::nasolver< nr_type_t >::createV ( int  n,
const char *  volts,
int  saveOPs 
)
private

Definition at line 1392 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::createZVector ( void  )
private

Definition at line 904 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::findAssignedNode ( circuit c,
int  port 
)
protected

Definition at line 927 of file nasolver.cpp.

template<class nr_type_t >
circuit * qucs::nasolver< nr_type_t >::findVoltageSource ( int  n)
protected

Definition at line 953 of file nasolver.cpp.

template<class nr_type_t>
const char* qucs::nasolver< nr_type_t >::getDescription ( void  )
inline

Definition at line 66 of file nasolver.h.

template<class nr_type_t >
const char * qucs::nasolver< nr_type_t >::getHelperDescription ( void  )

Definition at line 422 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::getM ( )

Returns the number of branch currents in the circuit.

Definition at line 1442 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::getN ( )

Returns the number of node voltages in the circuit.

Definition at line 1435 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::getNodeNr ( char *  str)
protected

Definition at line 919 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::lineSearch ( void  )
private

Definition at line 1044 of file nasolver.cpp.

template<class nr_type_t >
nr_type_t qucs::nasolver< nr_type_t >::MatValX ( nr_complex_t  z,
nr_complex_t  
)
private

Definition at line 580 of file nasolver.cpp.

template<class nr_type_t >
nr_type_t qucs::nasolver< nr_type_t >::MatValX ( nr_complex_t  z,
nr_double_t *   
)
private

Definition at line 586 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::recallSolution ( void  )
protected

Definition at line 1282 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::restartNR ( void  )
protected

Definition at line 1197 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::restorePreviousIteration ( void  )
protected

Definition at line 1188 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::runMNA ( void  )
protected

Definition at line 987 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::saveBranchCurrents ( void  )
private

Definition at line 1235 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::saveNodeVoltages ( void  )
private

Definition at line 1210 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::savePreviousIteration ( void  )
protected

Definition at line 1173 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::saveResults ( const char *  volts,
const char *  amps,
int  saveOPs,
qucs::vector f = NULL 
)

Definition at line 1308 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::saveSolution ( void  )
protected

Definition at line 1250 of file nasolver.cpp.

template<class nr_type_t>
void qucs::nasolver< nr_type_t >::setCalculation ( calculate_func_t  f)
inline

Definition at line 69 of file nasolver.h.

template<class nr_type_t>
void qucs::nasolver< nr_type_t >::setDescription ( const char *  n)
inline

Definition at line 65 of file nasolver.h.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::solve_linear ( void  )

Definition at line 525 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::solve_nonlinear ( void  )

Definition at line 449 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::solve_nonlinear_continuation_gMin ( void  )

Definition at line 275 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::solve_nonlinear_continuation_Source ( void  )

Definition at line 343 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::solve_once ( void  )

Definition at line 138 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::solve_post ( void  )

Definition at line 205 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::solve_pre ( void  )

Definition at line 213 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::steepestDescent ( void  )
private

Definition at line 1097 of file nasolver.cpp.

template<class nr_type_t >
void qucs::nasolver< nr_type_t >::storeSolution ( void  )
protected

Definition at line 1258 of file nasolver.cpp.

Field Documentation

template<class nr_type_t>
tmatrix<nr_type_t>* qucs::nasolver< nr_type_t >::A
protected

Definition at line 125 of file nasolver.h.

template<class nr_type_t>
nr_double_t qucs::nasolver< nr_type_t >::abstol
private

Definition at line 139 of file nasolver.h.

template<class nr_type_t>
tmatrix<nr_type_t>* qucs::nasolver< nr_type_t >::C
protected

Definition at line 126 of file nasolver.h.

template<class nr_type_t>
calculate_func_t qucs::nasolver< nr_type_t >::calculate_func
private

Definition at line 145 of file nasolver.h.

template<class nr_type_t>
int qucs::nasolver< nr_type_t >::convHelper
protected

Definition at line 128 of file nasolver.h.

template<class nr_type_t>
const char* qucs::nasolver< nr_type_t >::desc
protected

Definition at line 133 of file nasolver.h.

template<class nr_type_t>
int qucs::nasolver< nr_type_t >::eqnAlgo
protected

Definition at line 130 of file nasolver.h.

template<class nr_type_t>
eqnsys<nr_type_t>* qucs::nasolver< nr_type_t >::eqns
private

Definition at line 137 of file nasolver.h.

template<class nr_type_t>
int qucs::nasolver< nr_type_t >::fixpoint
protected

Definition at line 129 of file nasolver.h.

template<class nr_type_t>
nr_double_t qucs::nasolver< nr_type_t >::gMin
protected

Definition at line 132 of file nasolver.h.

template<class nr_type_t>
int qucs::nasolver< nr_type_t >::iterations
protected

Definition at line 127 of file nasolver.h.

template<class nr_type_t>
nodelist* qucs::nasolver< nr_type_t >::nlist
protected

Definition at line 134 of file nasolver.h.

template<class nr_type_t>
nr_double_t qucs::nasolver< nr_type_t >::reltol
private

Definition at line 138 of file nasolver.h.

template<class nr_type_t>
nasolution<nr_type_t> qucs::nasolver< nr_type_t >::solution
private

Definition at line 141 of file nasolver.h.

template<class nr_type_t>
nr_double_t qucs::nasolver< nr_type_t >::srcFactor
protected

Definition at line 132 of file nasolver.h.

template<class nr_type_t>
int qucs::nasolver< nr_type_t >::updateMatrix
protected

Definition at line 131 of file nasolver.h.

template<class nr_type_t>
nr_double_t qucs::nasolver< nr_type_t >::vntol
private

Definition at line 140 of file nasolver.h.

template<class nr_type_t>
tvector<nr_type_t>* qucs::nasolver< nr_type_t >::x
protected

Definition at line 122 of file nasolver.h.

template<class nr_type_t>
tvector<nr_type_t>* qucs::nasolver< nr_type_t >::xprev
protected

Definition at line 123 of file nasolver.h.

template<class nr_type_t>
tvector<nr_type_t>* qucs::nasolver< nr_type_t >::z
protected

Definition at line 121 of file nasolver.h.

template<class nr_type_t>
tvector<nr_type_t>* qucs::nasolver< nr_type_t >::zprev
protected

Definition at line 124 of file nasolver.h.


The documentation for this class was generated from the following files: