Qucs-core  0.0.19
spsolver.h
Go to the documentation of this file.
00001 /*
00002  * spsolver.h - S-parameter solver class definitions
00003  *
00004  * Copyright (C) 2003, 2004, 2006, 2007, 2008 Stefan Jahn <stefan@lkcc.org>
00005  *
00006  * This is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2, or (at your option)
00009  * any later version.
00010  *
00011  * This software is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this package; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  * $Id$
00022  *
00023  */
00024 
00025 #ifndef __SPSOLVER_H__
00026 #define __SPSOLVER_H__
00027 
00028 #include <string>
00029 
00030 namespace qucs {
00031 
00032 class analysis;
00033 class circuit;
00034 class node;
00035 class vector;
00036 class sweep;
00037 class nodelist;
00038 
00039 class spsolver : public analysis
00040 {
00041  public:
00042   ACREATOR (spsolver);
00043   spsolver (char *);
00044   spsolver (spsolver &);
00045   ~spsolver ();
00046   void calc (nr_double_t);
00047   void init (void);
00048   void reduce (void);
00049   int  solve (void);
00050   void insertConnections (void);
00051   void insertDifferentialPorts (void);
00052   void insertTee (node **, const char *);
00053   void insertCross (node **, const char *);
00054   void insertConnectors (node *);
00055   void insertOpen (node *);
00056   void insertGround (node *);
00057   circuit * interconnectJoin (node *, node *);
00058   circuit * connectedJoin (node *, node *);
00059   void noiseConnect (circuit *, node *, node *);
00060   void noiseInterconnect (circuit *, node *, node *);
00061   void saveResults (nr_double_t);
00062   void saveNoiseResults (nr_complex_t[4], nr_complex_t[4],
00063                          nr_double_t, vector *);
00064   char * createSP (int, int);
00065   const char * createCV (const std::string &c, const std::string &n);
00066   void saveCharacteristics (nr_double_t);
00067   void dropTee (circuit *);
00068   void dropCross (circuit *);
00069   void dropOpen (circuit *);
00070   void dropGround (circuit *);
00071   void dropDifferentialPort (circuit *);
00072   void dropConnections (void);
00073 
00074  private:
00075   int tees, crosses, grounds, opens;
00076   int noise;
00077   int saveCVs;
00078   sweep * swp;
00079   nodelist * nlist;
00080   circuit * gnd;
00081 };
00082 
00083 } // namespace qucs
00084 
00085 #endif /* __SPSOLVER_H__ */