00001 // SuperMix version 1.0 C++ source file 00002 // 00003 // Copyright (c) 1999 California Institute of Technology. 00004 // All rights reserved. 00005 // 00006 // Redistribution and use in source and binary forms for noncommercial 00007 // purposes are permitted provided that the above copyright notice and 00008 // this paragraph are duplicated in all such forms and that any 00009 // documentation and other materials related to such distribution and 00010 // use acknowledge that the software was developed by California 00011 // Institute of Technology. Redistribution and/or use in source or 00012 // binary forms is not permitted for any commercial purpose. Use of 00013 // this software does not include a permitted use of the Institute's 00014 // name or trademark for any purpose. 00015 // 00016 // DISCLAIMER: 00017 // THIS SOFTWARE AND/OR RELATED MATERIALS ARE PROVIDED "AS-IS" WITHOUT 00018 // WARRANTY OF ANY KIND INCLUDING ANY WARRANTIES OF PERFORMANCE OR 00019 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE (AS SET 00020 // FORTH IN UCC 23212-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE 00021 // LICENSED PRODUCT, HOWEVER USED. IN NO EVENT SHALL CALTECH/JPL BE 00022 // LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING BUT NOT LIMITED TO 00023 // INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND, INCLUDING ECONOMIC 00024 // DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF 00025 // WHETHER CALTECH/JPL SHALL BE ADVISED, HAVE REASON TO KNOW, OR IN 00026 // FACT SHALL KNOW OF THE POSSIBILITY. THE USER BEARS ALL RISK 00027 // RELATING TO QUALITY AND PERFORMANCE OF THE SOFTWARE AND/OR RELATED 00028 // MATERIALS. 00029 // 00030 00031 // ************************************************************************** 00032 00043 // ************************************************************************** 00044 // 00045 // 5/14/01: Converted comments to javadoc format 00046 // 10/29/99: Generator R now shadows device::Z0 by default 00047 // 6/23/98: Added voltage_source and current_sink objects. FR. 00048 // 00049 // ************************************************************************** 00050 00051 #ifndef SOURCES_H 00052 #define SOURCES_H 1 00053 00054 #include "nport.h" 00055 00056 // ************************************************************************** 00057 00082 class generator : public nport 00083 { 00084 public: 00086 parameter R; 00087 00092 parameter Temp; 00093 00095 parameter source_f; 00096 00098 parameter source_width; 00099 00101 parameter source_power; 00102 00104 parameter source_phase; 00105 00107 generator(); 00108 00114 int size() { return 1; } 00115 00116 // is an "active" noise source if its temperature is not the global T 00117 // is a wave source if source_power is nonzero 00118 const nport::data_info & get_data_info(); 00119 00120 private: 00121 // The calculation is done here. 00122 void recalc(); 00123 void recalc_S(); 00124 }; 00125 00126 // ************************************************************************** 00127 00151 class voltage_source : public nport 00152 { 00153 public: 00155 parameter R; 00156 00161 parameter Temp; 00162 00164 parameter source_f; 00165 00167 parameter source_width; 00168 00170 parameter source_voltage; 00171 00173 parameter source_phase; 00174 00176 voltage_source(); 00177 00183 int size() { return 1; } 00184 00185 // is an "active" noise source if its temperature is not the global T 00186 // is a wave source if source_power is nonzero 00187 const nport::data_info & get_data_info(); 00188 00189 private: 00190 // The calculation is done here. 00191 void recalc(); 00192 void recalc_S(); 00193 }; 00194 00195 // ************************************************************************** 00196 00224 class current_sink : public nport 00225 { 00226 public: 00228 parameter Y; 00229 00234 parameter Temp; 00235 00237 parameter source_f; 00238 00240 parameter source_width; 00241 00243 parameter sink_current; 00244 00246 parameter sink_phase; 00247 00249 current_sink(); 00250 00256 int size() { return 1; } 00257 00258 // is an "active" noise source if its temperature is not the global T 00259 // is a wave source if source_power is nonzero 00260 const nport::data_info & get_data_info(); 00261 00262 // The calculation is done here. 00263 void recalc(); 00264 void recalc_S(); 00265 }; 00266 00267 #endif /* SOURCES_H */
Please direct comments and corrections to
supermix@submm.caltech.edu
Go to the supermix home page
Generated by
1.2.7