BranchEquation.hh

Go to the documentation of this file.
00001 #ifndef BRANCH_EQUATION_HH
00002 #define BRANCH_EQUATION_HH
00003 
00004 // Copyright (c) 2002-2005 The University of Cincinnati.
00005 // All rights reserved.
00006 
00007 // You may modify, distribute, and use the software contained in this
00008 // package under the terms of the "GNU LIBRARY GENERAL PUBLIC LICENSE"
00009 // version 2, June 1991. A copy of this license agreement can be found in
00010 // the file "LGPL", distributed with this archive.
00011 
00012 // Authors: Vinod Chamarty                    chamarv@ececs.uc.edu
00013 //          Sameer Kher                       kherss@ececs.uc.edu
00014 //          Shriram Subramanian               subramsi@ececs.uc.edu
00015 
00016 #include <stdarg.h>
00017 #include "tyvis/Component.hh"
00018 #include "tyvis/vhdl_ams.hh"
00019 #include "tyvis/Quantity.hh"
00020 #include "tyvis/VHDLType.hh"
00021 #include "tyvis/AMSType.hh"
00022 #include "tyvis/adouble.h"
00023 #include "tyvis/adutils.h"
00024 
00025 class _savant_entity_ams_elab;
00026 class component;
00027 class AMSType;
00028 
00036 class branchEquation : public component {
00037 
00038 public:
00040   branchEquation();   
00041   
00043   virtual ~branchEquation();
00044   
00052   branchEquation(const char* name, adouble (*functionPtr) (component *, adouble*),
00053                  int noOfVariables, VHDLType **Qty);
00054 
00065   branchEquation(_savant_entity_ams_elab *designPtr, component **&parent_equation, int caseValue, const char* name,
00066                  adouble (*functionPtr) (component *, adouble*),int noOfVariables, ...);
00067 
00069   virtual void init();
00070   
00072   virtual bool getConsCheck(); 
00073 
00075   virtual void setBranch();
00076   
00078   virtual void definePointers();
00079   
00086   virtual int findBranch(int posNode, int negNode);
00087 
00089   virtual eqnType getEquationType();
00090 
00092   virtual Quantity** getQuantities();
00093 
00095   virtual int getNumberOfQuantities();
00096 
00104   virtual int checkCurrent(int posNode, int negNode, int index);
00105 
00107   virtual int load();
00108  
00110   virtual int pointerAllocation();
00111 
00113   virtual void add(component *comp);
00114 
00121   int loadImplicitEqns(Quantity* qty); 
00122 
00125   int loadImplicitEqns();
00126 
00129   virtual component* getImplicitEquationList(void);  
00130 
00132   void initializeImplicitEqns();
00133 
00135   int pointerAllocationForImplicitEqns();
00136 
00137 
00138 protected:
00139 
00140 private:
00142   int numberOfQuantities;
00143 
00145   component *implicitEquationList;
00146 
00148   bool conservativeCheck;
00149 
00151   adouble (*functionPointer) (component *, adouble*);
00152 
00154   spREAL **dcMatrixPointers;
00155 
00157   spREAL **transientMatrixPointers;
00158 
00160   int matrixCount;
00161 
00163   int* base;
00164 
00166   int* correctValue;
00167 
00169   Quantity** branchQty;
00170 
00172   int branch;
00173 
00175   int sourceCurrent;
00176 
00177 };
00178 
00179 #endif
00180 

Generated on Fri Mar 31 11:05:08 2006 for Tyvis by  doxygen 1.4.6