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

Resistor master. More...

#include <N_DEV_Resistor.h>

Inheritance diagram for Xyce::Device::Resistor::Master:
Collaboration diagram for Xyce::Device::Resistor::Master:

Public Member Functions

 Master (const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &solver_state, const DeviceOptions &device_options)
 Construct a Resistor Device. More...
 
virtual bool updateState (double *solVec, double *staVec, double *stoVec)
 Update state for all resistor instances, regardless of model. More...
 
virtual bool loadDAEVectors (double *solVec, double *fVec, double *qVec, double *storeLeadF, double *storeLeadQ)
 Load DAE vectors of all resistor instances, regardless of model. More...
 
virtual bool loadDAEMatrices (N_LAS_Matrix &dFdx, N_LAS_Matrix &dQdx)
 Load DAE matrices for all resistor instances, regardless of model. More...
 
- Public Member Functions inherited from Xyce::Device::DeviceMaster< Traits >
 DeviceMaster (const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &solver_state, const DeviceOptions &device_options)
 Constructs a device. More...
 
 DeviceMaster (const std::string &model_type_name, const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &solver_state, const DeviceOptions &device_options)
 Constructs a device. More...
 
virtual ~DeviceMaster ()
 Destroys the device. More...
 
virtual const std::string & getName () const
 Returns the name of this device. More...
 
virtual const std::string & getDefaultModelName () const
 Returns the default model name to use if the instance being created does not specify one. More...
 
virtual DeviceEntityfindEntity (const std::string &entity_name)
 Returns a pointer to the model or instance entity with the specified name. More...
 
virtual const DeviceEntityfindEntity (const std::string &entity_name) const
 Returns a pointer to the model or instance entity with the specified name. More...
 
virtual bool isLinearDevice () const
 Returns true if this device is a linear device. More...
 
virtual bool isPDEDevice () const
 Returns true if this device is a PDE device. More...
 
virtual void forEachModel (DeviceModelOp &op) const
 Executes operator op, passing its DeviceModel pointer, for each device model. More...
 
virtual void forEachInstance (DeviceInstanceOp &op) const
 Executes operator op, passing its DeviceInstance pointer, for each device instance. More...
 
virtual DeviceModeladdModel (const ModelBlock &MB, const FactoryBlock &factory_block)
 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)
 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 updateSecondaryState (double *staDerivVec, double *stoVec)
 Updates the devices secondary state information. More...
 
- Public Member Functions inherited from Xyce::Device::Device
 Device ()
 
virtual ~Device ()
 

Friends

class Instance
 Don't force a lot of pointless getters. More...
 
class Model
 Don't force a lot of pointless getters. More...
 

Additional Inherited Members

- Public Types inherited from Xyce::Device::DeviceMaster< Traits >
typedef Traits::ModelType ModelType
 Make the model begin defined available. More...
 
typedef Traits::InstanceType InstanceType
 Make the instance being define available. More...
 
- Protected Types inherited from Xyce::Device::DeviceMaster< Traits >
typedef std::vector
< InstanceType * > 
InstanceVector
 
typedef std::map< std::string,
ModelType *, LessNoCase > 
ModelMap
 
typedef std::map< std::string,
DeviceEntity *, LessNoCase > 
EntityMap
 
- Protected Member Functions inherited from Xyce::Device::DeviceMaster< Traits >
const SolverStategetSolverState () const
 Returns the solver state given during device construction. More...
 
const DeviceOptionsgetDeviceOptions () const
 Returns the device options given during device construction. More...
 
InstanceVector::const_iterator getInstanceBegin () const
 Returns an iterator to the beginning of the vector of all instances created for this device. More...
 
InstanceVector::const_iterator getInstanceEnd () const
 Returns an iterator to the ending of the vector of all instances created for this device. More...
 
bool isModelRequired () const
 Returns true if the model name must be specified for each instance. More...
 

Detailed Description

Resistor master.

The "master" class is the one that contains the updateState, loadDAEVectors and loadDAEMatrices methods that are actually called when it is time to compute and load device contributions.

The default implementations of these methods in the DeviceMaster template class simply loops over all instances and calls their updatePrimaryState, loadDAEFVector/loadDAEQVector, and loadDAEdFdx/loadDAEdQdx methods, respectively.

For efficiency, the Resistor class reimplements these methods to do the work directly, instead of calling instance-level functions.

Definition at line 425 of file N_DEV_Resistor.h.

Constructor & Destructor Documentation

Xyce::Device::Resistor::Master::Master ( const Configuration configuration,
const FactoryBlock factory_block,
const SolverState solver_state,
const DeviceOptions device_options 
)
inline

Construct a Resistor Device.

Parameters
configuration
factory_block
solver_state
device_options

Definition at line 447 of file N_DEV_Resistor.h.

Member Function Documentation

bool Xyce::Device::Resistor::Master::loadDAEMatrices ( N_LAS_Matrix &  dFdx,
N_LAS_Matrix &  dQdx 
)
virtual

Load DAE matrices for all resistor instances, regardless of model.

Parameters
dFdxmatrix of derivatives of F vector with respect to solution
dQdxmatrix of derivatives of Q vector with respect to solution
Returns
true on success
Note
Because the resistor device re-implements the base-class Master::loadDAEMatrices, the Instance::loadDAEdFdx method is never called. This method replaces those, and does the same work but inside a loop over all resistor instances.
See Also
Xyce::Device::Resistor::Instance::loadDAEdFdx
Author
Eric Keiter, SNL
Date
11/26/08

Reimplemented from Xyce::Device::DeviceMaster< Traits >.

Definition at line 1159 of file N_DEV_Resistor.C.

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

Load DAE vectors of all resistor instances, regardless of model.

Parameters
solVecsolution vector
fVecf vector
qVecq vector
storeLeadFstore lead current f vector
storeLeadQstore lead current q vector
Returns
true on success
Note
Because the resistor device re-implements the base-class Master::loadDAEVectors, the Instance::loadDAEFVector method is never called. This method replaces those, and does the same work but inside a loop over all resistor instances.
See Also
Xyce::Device::Resistor::Instance::loadDAEFVector
Author
Eric Keiter, SNL
Date
11/26/08

Reimplemented from Xyce::Device::DeviceMaster< Traits >.

Definition at line 1118 of file N_DEV_Resistor.C.

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

Update state for all resistor instances, regardless of model.

Parameters
solVecsolution vector
staVecstate vector
stoVecstore vector
Returns
true on success
Note
Because the resistor device re-implements the base-class Master::updateState, the Instance::updatePrimaryState method is never called, nor is the Instance::updateIntermediateVars method. This method replaces those, and does the same work but inside a loop over all resistor instances.
See Also
Xyce::Device::Resistor::Instance::updatePrimaryState
Author
Eric Keiter, SNL
Date
11/26/08

Reimplemented from Xyce::Device::DeviceMaster< Traits >.

Definition at line 1073 of file N_DEV_Resistor.C.

Friends And Related Function Documentation

friend class Instance
friend

Don't force a lot of pointless getters.

Definition at line 427 of file N_DEV_Resistor.h.

friend class Model
friend

Don't force a lot of pointless getters.

Definition at line 428 of file N_DEV_Resistor.h.


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