Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/dc_sim.cpp
Go to the documentation of this file.
00001 /***************************************************************************
00002                           dc_sim.cpp  -  description
00003                              -------------------
00004     begin                : Sat Aug 23 2003
00005     copyright            : (C) 2003 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #include "dc_sim.h"
00018 #include "main.h"
00019 
00020 
00021 DC_Sim::DC_Sim()
00022 {
00023   Description = QObject::tr("dc simulation");
00024 
00025   QString s = Description;
00026   int a = s.indexOf(" ");
00027   int b = s.findRev(" ");
00028   if (a != -1 && b != -1) {
00029     if (a > (int) s.length() - b)  b = a;
00030   }
00031   if (a < 8 || s.length() - b < 8) b = -1;
00032   if (b != -1) s[b] = '\n';
00033 
00034   Texts.append(new Text(0, 0, s.left(b), Qt::darkBlue, QucsSettings.largeFontSize));
00035   if (b != -1)
00036     Texts.append(new Text(0, 0, s.mid(b+1), Qt::darkBlue, QucsSettings.largeFontSize));
00037 
00038   x1 = -10; y1 = -9;
00039   x2 = x1+128; y2 = y1+41;
00040 
00041   tx = 0;
00042   ty = y2+1;
00043   Model = ".DC";
00044   Name  = "DC";
00045 
00046   Props.append(new Property("Temp", "26.85", false,
00047     QObject::tr("simulation temperature in degree Celsius")));
00048   Props.append(new Property("reltol", "0.001", false,
00049     QObject::tr("relative tolerance for convergence")));
00050   Props.append(new Property("abstol", "1 pA", false,
00051     QObject::tr("absolute tolerance for currents")));
00052   Props.append(new Property("vntol", "1 uV", false,
00053     QObject::tr("absolute tolerance for voltages")));
00054   Props.append(new Property("saveOPs", "no", false,
00055     QObject::tr("put operating points into dataset")+
00056     " [yes, no]"));
00057   Props.append(new Property("MaxIter", "150", false,
00058     QObject::tr("maximum number of iterations until error")));
00059   Props.append(new Property("saveAll", "no", false,
00060   QObject::tr("save subcircuit nodes into dataset")+
00061   " [yes, no]"));
00062   Props.append(new Property("convHelper", "none", false,
00063   QObject::tr("preferred convergence algorithm")+
00064   " [none, gMinStepping, SteepestDescent, LineSearch, Attenuation, SourceStepping]"));
00065   Props.append(new Property("Solver", "CroutLU", false,
00066   QObject::tr("method for solving the circuit matrix")+
00067   " [CroutLU, DoolittleLU, HouseholderQR, HouseholderLQ, GolubSVD]"));
00068 }
00069 
00070 DC_Sim::~DC_Sim()
00071 {
00072 }
00073 
00074 Component* DC_Sim::newOne()
00075 {
00076   return new DC_Sim();
00077 }
00078 
00079 Element* DC_Sim::info(QString& Name, char* &BitmapFile, bool getNewOne)
00080 {
00081   Name = QObject::tr("dc simulation");
00082   BitmapFile = (char *) "dc";
00083 
00084   if(getNewOne)  return new DC_Sim();
00085   return 0;
00086 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines