Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Xyce::Device::Device Class Referenceabstract

The Device class is an interface for device implementations. More...

#include <N_DEV_Device.h>

Inheritance diagram for Xyce::Device::Device:

Public Member Functions

 Device ()
 
virtual ~Device ()
 
virtual bool isLinearDevice () const =0
 Returns true if the device is linear. More...
 
virtual bool isPDEDevice () const =0
 Returns true is the device is a PDE device. More...
 
virtual const std::string & getName () const =0
 Returns the name given to the device. More...
 
virtual const std::string & getDefaultModelName () const =0
 Returns the name of the default model that would to used for this device. More...
 
virtual DeviceEntityfindEntity (const std::string &entity_name)=0
 Returns the device entity with the specified name. More...
 
virtual const DeviceEntityfindEntity (const std::string &entity_name) const =0
 Returns the device entity with the specified name. More...
 
virtual DeviceModeladdModel (const ModelBlock &model_block, const FactoryBlock &factory_block)=0
 Creates a device model and adds it to the device's list of models. More...
 
virtual DeviceInstanceaddInstance (const InstanceBlock &instance_block, const FactoryBlock &factory_block)=0
 Creates a device instance and adds to the device model's instance list. More...
 
virtual bool updateSources ()
 Updates the devices source information. More...
 
virtual bool updateState (double *solVec, double *staVec, double *stoVec)
 Updates the devices state information. More...
 
virtual bool updateSecondaryState (double *staDerivVec, double *stoVec)
 Updates the devices secondary state information. More...
 
virtual bool loadDAEVectors (double *solVec, double *fVec, double *qVec, double *storeLeadF, double *storeLeadQ)
 Populates the device's ExternData object with these pointers. More...
 
virtual bool loadDAEMatrices (N_LAS_Matrix &dFdx, N_LAS_Matrix &dQdx)
 Populates the device's Jacobian object with these pointers. More...
 
virtual void forEachModel (DeviceModelOp &op) const =0
 Executes op on each DeviceModel pointer of the device. More...
 
virtual void forEachInstance (DeviceInstanceOp &op) const =0
 Executes op on each DeviceInstance pointer of the device. More...
 

Private Member Functions

 Device (const Device &)
 No copying. More...
 
Deviceoperator= (const Device &)
 No assignment. More...
 

Detailed Description

The Device class is an interface for device implementations.

In general, DeviceMaster is the only class that actually inherits from Device. Most devices either use the DeviceMaster class, but some derive from DeviceMaster in what is known as a Master class.

The interfaces are unfortunately used for but derived implementation as well as usage. This should be changed at some point, but this is the currently basic design of most interface classes.

Author
Eric Keiter, SNL, Parallel Computational Sciences
Date
3/16/00

Definition at line 93 of file N_DEV_Device.h.

Constructor & Destructor Documentation

Xyce::Device::Device::Device ( )
inline

Definition at line 96 of file N_DEV_Device.h.

virtual Xyce::Device::Device::~Device ( )
inlinevirtual

Definition at line 99 of file N_DEV_Device.h.

Xyce::Device::Device::Device ( const Device )
private

No copying.

Member Function Documentation

virtual DeviceInstance* Xyce::Device::Device::addInstance ( const InstanceBlock instance_block,
const FactoryBlock factory_block 
)
pure virtual

Creates a device instance and adds to the device model's instance list.

Parameters
instance_blockconst reference to the model block describing the instance to create
factory_blockconst reference to the factory data needed to create the instance
Returns
pointer to the newly creates device instance
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:43:08 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual DeviceModel* Xyce::Device::Device::addModel ( const ModelBlock model_block,
const FactoryBlock factory_block 
)
pure virtual

Creates a device model and adds it to the device's list of models.

Parameters
model_blockconst reference to the model block describing the model to create
factory_blockconst reference to the factory data needed to create the model
Returns
pointer to the newly created device model
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:40:30 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual DeviceEntity* Xyce::Device::Device::findEntity ( const std::string &  entity_name)
pure virtual

Returns the device entity with the specified name.

Parameters
entity_nameconst reference to the name of the entity
Returns
pointer to the device entity
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:39:23 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual const DeviceEntity* Xyce::Device::Device::findEntity ( const std::string &  entity_name) const
pure virtual

Returns the device entity with the specified name.

Parameters
entity_nameconst reference name of the entity
Returns
const pointer to the device entity
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:39:23 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual void Xyce::Device::Device::forEachInstance ( DeviceInstanceOp op) const
pure virtual

Executes op on each DeviceInstance pointer of the device.

To use this function, create a class which derives from DeviceInstanceOp. Then implement the operator()(DeviceInstance *). Sample classes are defined in N_DEV_Algorithm.C.

Parameters
opreference to operator functor
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Mon Feb 3 10:36:04 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual void Xyce::Device::Device::forEachModel ( DeviceModelOp op) const
pure virtual

Executes op on each DeviceModel pointer of the device.

To use this function, create a class which derives from DeviceModelOp. Then implement the operator()(DeviceModel/// ). Sample classes are defined in N_DEV_Algorithm.C.

Parameters
opreference to operator functor
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Mon Feb 3 10:36:04 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual const std::string& Xyce::Device::Device::getDefaultModelName ( ) const
pure virtual

Returns the name of the default model that would to used for this device.

Returns
const reference to the name of the default model
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:38:02 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual const std::string& Xyce::Device::Device::getName ( ) const
pure virtual

Returns the name given to the device.

Returns
const reference to the device name.
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:37:34 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual bool Xyce::Device::Device::isLinearDevice ( ) const
pure virtual

Returns true if the device is linear.

Returns
true if the device is linear.
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:36:27 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual bool Xyce::Device::Device::isPDEDevice ( ) const
pure virtual

Returns true is the device is a PDE device.

Returns
true is the device is a PDE device.
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:37:02 2014

Implemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

virtual bool Xyce::Device::Device::loadDAEVectors ( double *  solVec,
double *  fVec,
double *  qVec,
double *  storeLeadF,
double *  storeLeadQ 
)
inlinevirtual

Populates the device's ExternData object with these pointers.

THIS FUNCTION MUST BE CALLED PRIOR TO CALLING loadDAEMatrices.

Parameters
solVecpointer to the analysis solution vector for this device
fVecpointer to the analysis f vector for this device
qVecpointer to the analysis q vector for this device
storeLeadFpointer to the analysis lead store f vector for this device
storeLeadQpoitner to the analysis load store q vector for this device
Returns
true if the update was successful
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:47:20 2014

Reimplemented in Xyce::Device::MOSFET_B3SOI::Master, Xyce::Device::MOSFET_B4::Master, Xyce::Device::MOSFET_B3::Master, Xyce::Device::VDMOS::Master, Xyce::Device::MOSFET1::Master, Xyce::Device::BJT::Master, Xyce::Device::MOSFET2::Master, Xyce::Device::MOSFET3::Master, Xyce::Device::MOSFET6::Master, Xyce::Device::LTRA::Master, Xyce::Device::JFET::Master, Xyce::Device::MESFET::Master, Xyce::Device::Resistor::Master, Xyce::Device::Diode::Master, Xyce::Device::MutIndLin::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::Capacitor::Master, Xyce::Device::DeviceMaster< T >, Xyce::Device::DeviceMaster< Traits >, Xyce::Device::Vsrc::Master, Xyce::Device::Resistor3::Master, Xyce::Device::Bsrc::Master, Xyce::Device::Inductor::Master, Xyce::Device::SW::Master, Xyce::Device::ThermalResistor::Master, Xyce::Device::Synapse4::Master, Xyce::Device::ROM::Master, Xyce::Device::ISRC::Master, Xyce::Device::DAC::Master, Xyce::Device::ADC::Master, Xyce::Device::Vcvs::Master, and Xyce::Device::VCCS::Master.

Definition at line 248 of file N_DEV_Device.h.

Device& Xyce::Device::Device::operator= ( const Device )
private

No assignment.

virtual bool Xyce::Device::Device::updateSecondaryState ( double *  staDerivVec,
double *  stoVec 
)
inlinevirtual

Updates the devices secondary state information.

This function is called by the analysis subsystem when it is time to update the device secondary state information.

Returns
true if the update was successful
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:44:34 2014

Reimplemented in Xyce::Device::VDMOS::Master, Xyce::Device::BJT::Master, Xyce::Device::LTRA::Master, Xyce::Device::MutIndNonLin::Master, Xyce::Device::DeviceMaster< T >, Xyce::Device::DeviceMaster< Traits >, Xyce::Device::Bsrc::Master, Xyce::Device::Inductor::Master, Xyce::Device::SW::Master, Xyce::Device::Synapse4::Master, Xyce::Device::DAC::Master, Xyce::Device::Synapse::Master, Xyce::Device::Synapse2::Master, and Xyce::Device::ADC::Master.

Definition at line 228 of file N_DEV_Device.h.

virtual bool Xyce::Device::Device::updateSources ( )
inlinevirtual

Updates the devices source information.

This function is called by the analysis subsystem when it is time to update the device source information.

Returns
true if the update was successful
Author
David G. Baur Raytheon Sandia National Laboratories 1355
Date
Wed Jan 29 16:44:34 2014

Reimplemented in Xyce::Device::DeviceMaster< T >, and Xyce::Device::DeviceMaster< Traits >.

Definition at line 200 of file N_DEV_Device.h.

virtual bool Xyce::Device::Device::updateState ( double *  solVec,
double *  staVec,
double *  stoVec 
)
inlinevirtual

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