48 setDescription (
"AC");
71 swp = o.
swp ?
new sweep (*(o.
swp)) : NULL;
72 xn = o.
xn ?
new tvector<nr_double_t> (*(o.
xn)) : NULL;
96 for (
int i = 0;
i <
swp->getSize ();
i++) {
123 circuit * root =
self->getNet()->getRoot ();
124 for (circuit *
c = root;
c != NULL;
c = (circuit *)
c->getNext ()) {
125 c->calcAC (self->freq);
126 if (self->noise)
c->calcNoiseAC (self->freq);
133 circuit * root =
subnet->getRoot ();
134 for (circuit *
c = root;
c != NULL;
c = (circuit *)
c->getNext ()) {
135 if (
c->isNonLinear ())
c->calcOperatingPoints ();
137 if (
noise)
c->initNoiseAC ();
146 if ((f =
data->findDependency (
"acfrequency")) == NULL) {
148 data->addDependency (f);
164 for (
int r = 0;
r < N +
M;
r++) {
170 circuit * root =
subnet->getRoot ();
171 for (circuit *
c = root;
c != NULL;
c = (circuit *)
c->getNext ()) {
172 if (!
c->isProbe ())
continue;
176 vp = np > 0 ?
xn->
get (np - 1) : 0.0;
178 vn = nn > 0 ?
xn->
get (nn - 1) : 0.0;
179 c->setOperatingPoint (
"Vr", fabs ((vp - vn) *
sqrt (
kB *
T0)));
180 c->setOperatingPoint (
"Vi", 0.0);
193 tvector<nr_complex_t> xsave = *
x;
198 if (
xn == NULL)
xn =
new tvector<nr_double_t> (N +
M);
201 tvector<nr_complex_t> zn = tvector<nr_complex_t> (N +
M);
215 for (
int i = 0;
i < N +
M;
i++) {
216 z->set (0);
z->set (
i, -1);
static void calc(acsolver *)
int solve(void)
placehoder for solution function
tvector< nr_double_t > * xn
std::complex< nr_double_t > nr_complex_t
matrix real(matrix a)
Real part matrix.
#define T0
standard temperature
nr_type_t scalar(tvector< nr_type_t > a, tvector< nr_type_t > b)
void logprogressclear(int points)
void saveNoiseResults(qucs::vector *)
void setDescription(const char *n)
nr_complex_t sqrt(const nr_complex_t z)
Compute principal value of square root.
void saveResults(const char *, const char *, int, qucs::vector *f=NULL)
void setCalculation(calculate_func_t f)
#define kB
Boltzmann constant ( )
void saveAllResults(nr_double_t)
The analysis class header file.
The circuit class header file.
int countVoltageSources(void)
void logprogressbar(nr_double_t current, nr_double_t final, int points)
sweep * createSweep(const char *)
create a named sweep object
void createNoiseMatrix(void)
matrix conj(matrix a)
Conjugate complex matrix.
char * getPropertyString(const char *)
void logprint(int level, const char *format,...)
void(* calculate_func_t)(nasolver< nr_type_t > *)