Qucs-core  0.0.19
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 >:
Inheritance graph
[legend]
Collaboration diagram for qucs::nasolver< nr_type_t >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 nasolver ()
 nasolver (const std::string &)
 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 std::string &n)
std::string getDescription (void) const
void saveResults (const std::string &, const std::string &, 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.
int getM ()
 Returns the number of branch currents in the circuit.

Protected Member Functions

void restartNR (void)
void savePreviousIteration (void)
void restorePreviousIteration (void)
int countNodes (void)
int getNodeNr (const std::string &)
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
std::string desc
nodelistnlist

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)
std::string createV (int, const std::string &, int)
std::string createI (int, const std::string &, int)
std::string createOP (const std::string &, const std::string &)
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 64 of file nasolver.cpp.

template<class nr_type_t >
qucs::nasolver< nr_type_t >::nasolver ( const std::string &  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 111 of file nasolver.cpp.

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

Definition at line 96 of file nasolver.cpp.


Member Function Documentation

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

Definition at line 1019 of file nasolver.cpp.

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

Definition at line 246 of file nasolver.cpp.

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

Definition at line 971 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 1134 of file nasolver.cpp.

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

Definition at line 914 of file nasolver.cpp.

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

Definition at line 946 of file nasolver.cpp.

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

Definition at line 599 of file nasolver.cpp.

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

Definition at line 639 of file nasolver.cpp.

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

Definition at line 673 of file nasolver.cpp.

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

Definition at line 887 of file nasolver.cpp.

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

Definition at line 705 of file nasolver.cpp.

template<class nr_type_t >
std::string qucs::nasolver< nr_type_t >::createI ( int  n,
const std::string &  amps,
int  saveOPs 
) [private]

Definition at line 1408 of file nasolver.cpp.

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

Definition at line 857 of file nasolver.cpp.

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

Definition at line 535 of file nasolver.cpp.

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

Definition at line 740 of file nasolver.cpp.

template<class nr_type_t >
std::string qucs::nasolver< nr_type_t >::createOP ( const std::string &  c,
const std::string &  n 
) [private]

Definition at line 1386 of file nasolver.cpp.

template<class nr_type_t >
std::string qucs::nasolver< nr_type_t >::createV ( int  n,
const std::string &  volts,
int  saveOPs 
) [private]

Definition at line 1394 of file nasolver.cpp.

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

Definition at line 906 of file nasolver.cpp.

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

Definition at line 929 of file nasolver.cpp.

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

Definition at line 955 of file nasolver.cpp.

template<class nr_type_t>
std::string qucs::nasolver< nr_type_t >::getDescription ( void  ) const [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 421 of file nasolver.cpp.

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

Returns the number of branch currents in the circuit.

Definition at line 1443 of file nasolver.cpp.

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

Returns the number of node voltages in the circuit.

Definition at line 1436 of file nasolver.cpp.

template<class nr_type_t >
int qucs::nasolver< nr_type_t >::getNodeNr ( const std::string &  str) [protected]

Definition at line 921 of file nasolver.cpp.

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

Definition at line 1046 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 579 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 585 of file nasolver.cpp.

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

Definition at line 1287 of file nasolver.cpp.

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

Definition at line 1199 of file nasolver.cpp.

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

Definition at line 1190 of file nasolver.cpp.

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

Definition at line 989 of file nasolver.cpp.

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

Definition at line 1236 of file nasolver.cpp.

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

Definition at line 1212 of file nasolver.cpp.

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

Definition at line 1175 of file nasolver.cpp.

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

Definition at line 1316 of file nasolver.cpp.

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

Definition at line 1251 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 std::string &  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 524 of file nasolver.cpp.

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

Definition at line 448 of file nasolver.cpp.

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

Definition at line 274 of file nasolver.cpp.

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

Definition at line 342 of file nasolver.cpp.

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

Definition at line 137 of file nasolver.cpp.

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

Definition at line 204 of file nasolver.cpp.

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

Definition at line 212 of file nasolver.cpp.

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

Definition at line 1099 of file nasolver.cpp.

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

Definition at line 1259 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]

Reimplemented in qucs::e_trsolver.

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>
std::string 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]

Reimplemented in qucs::e_trsolver.

Definition at line 138 of file nasolver.h.

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

Reimplemented in qucs::trsolver.

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]

Reimplemented in qucs::e_trsolver.

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: