Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

resistor Class Reference

A series or parallel 2-port resistor, derived from class spimp. More...

#include <elements.h>

Inheritance diagram for resistor::

spimp nport device List of all members.

Public Methods

 resistor (double r=0.0)
 Default constructor sets temperature to shadow device::T. More...

 resistor (const abstract_real_parameter *r)
 Construct a shadowed parameter resistance. More...

resistor& set (double r)
 Set the resistance. More...

resistor& set (abstract_real_parameter *r)
 Set the resistance to shadow a parameter. More...

resistor& set_T (double t)
 Set the temperature. More...

resistor& set_T (abstract_real_parameter *t)
 Set the temperature to shadow a parameter. More...

const nport::data_infoget_data_info ()
 Is an "active" noise source if its temperature is not the global T. More...


Public Attributes

parameter R
 Resistance in standard units. More...

parameter Temp
 Temperature in standard units. More...


Private Methods

void recalc ()
 The function for calculating sdata. More...

void recalc_S ()
 If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale. More...


Detailed Description

A series or parallel 2-port resistor, derived from class spimp.

It has two real member parameters:

Its resistance may be set during construction as well. Example:
    resistor r(100*Ohm); // a resistor named "r" with a value of 100 Ohms
 

Definition at line 173 of file elements.h.


Constructor & Destructor Documentation

resistor::resistor ( double r = 0.0 ) [inline, explicit]
 

Default constructor sets temperature to shadow device::T.

Parameters:
r   the resistance in standard units. Defaults to 0.

Definition at line 192 of file elements.h.

resistor::resistor ( const abstract_real_parameter * r ) [inline, explicit]
 

Construct a shadowed parameter resistance.

Parameters:
r   pointer to the parameter to be shadowed.

Definition at line 200 of file elements.h.


Member Function Documentation

const nport::data_info & resistor::get_data_info ( ) [inline, virtual]
 

Is an "active" noise source if its temperature is not the global T.

Reimplemented from nport.

Definition at line 238 of file elements.h.

void resistor::recalc ( ) [inline, private, virtual]
 

The function for calculating sdata.

recalc() should do the following:

  • (1) Read device::f, device::Z0, and, by default, device::T to get the operating conditions for the response calculation.
  • (2) Calculate the S, C, and B matrix values and store them to nport::data, with all values normalized using device::Z0.
  • (3) Store the normalizing impedance to nport::data by calling data.set_znorm().

Reimplemented from nport.

Definition at line 243 of file elements.h.

void resistor::recalc_S ( ) [inline, private, virtual]
 

If the following function is implemented, it should only calculate the S matrix and B vector parts of data, leaving the C matrix part stale.

Reimplemented from nport.

Definition at line 244 of file elements.h.

resistor & resistor::set ( abstract_real_parameter * r ) [inline]
 

Set the resistance to shadow a parameter.

Parameters:
r   parameter of resistance in standard units.

Definition at line 216 of file elements.h.

resistor & resistor::set ( double r ) [inline]
 

Set the resistance.

Parameters:
r   resistance in standard units.

Definition at line 208 of file elements.h.

resistor & resistor::set_T ( abstract_real_parameter * t ) [inline]
 

Set the temperature to shadow a parameter.

Parameters:
t   parameter of temperature in standard units.

Definition at line 232 of file elements.h.

resistor & resistor::set_T ( double t ) [inline]
 

Set the temperature.

Parameters:
t   temperature in standard units.

Definition at line 224 of file elements.h.


Member Data Documentation

parameter resistor::R
 

Resistance in standard units.

Definition at line 179 of file elements.h.

parameter resistor::Temp
 

Temperature in standard units.

Shadows global temperature T by default.

Definition at line 185 of file elements.h.


The documentation for this class was generated from the following file:

Please direct comments and corrections to supermix@submm.caltech.edu
Go to the supermix home page
Generated by doxygen1.2.7