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

Capacitor Master class. More...

#include <N_DEV_Capacitor.h>

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

Public Member Functions

 Master (const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &ss1, const DeviceOptions &do1)
 
virtual bool updateState (double *solVec, double *staVec, double *stoVec)
 Update state for all capacitor instances, regardless of model. More...
 
virtual bool loadDAEVectors (double *solVec, double *fVec, double *qVec, double *storeLeadF, double *storeLeadQ)
 Load DAE vectors of all capacitor instances, regardless of model. More...
 
virtual bool loadDAEMatrices (N_LAS_Matrix &dFdx, N_LAS_Matrix &dQdx)
 Load DAE matrices for all capacitor 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
 
class Model
 

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

Capacitor Master class.

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 Capacitor class reimplements these methods to do the work directly, instead of calling instance-level functions.

Definition at line 332 of file N_DEV_Capacitor.h.

Constructor & Destructor Documentation

Xyce::Device::Capacitor::Master::Master ( const Configuration configuration,
const FactoryBlock factory_block,
const SolverState ss1,
const DeviceOptions do1 
)
inline

Definition at line 338 of file N_DEV_Capacitor.h.

Member Function Documentation

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

Load DAE matrices for all capacitor 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 capacitor 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 capacitor instances.
See Also
Xyce::Device::Capacitor::Instance::loadDAEdFdx
Author
Eric Keiter, SNL
Date
11/26/08

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

Definition at line 2002 of file N_DEV_Capacitor.C.

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

Load DAE vectors of all capacitor 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 capacitor 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 capacitor instances.
See Also
Xyce::Device::Capacitor::Instance::loadDAEFVector
Author
Eric Keiter, SNL
Date
11/26/08

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

Definition at line 1881 of file N_DEV_Capacitor.C.

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

Update state for all capacitor instances, regardless of model.

Parameters
solVecsolution vector
staVecstate vector
stoVecstore vector
Returns
true on success
Note
Because the capacitor 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 capacitor instances.

Because the computation of state variables is so complex in the event that the capacitance is given by an expression that depends on solution variables, this method falls back on calling the instance's updatePrimaryState method instead of reimplementing the computation here.

See Also
Xyce::Device::Capacitor::Instance::updatePrimaryState
Author
Eric Keiter, SNL
Date
11/26/08

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

Definition at line 1821 of file N_DEV_Capacitor.C.

Friends And Related Function Documentation

friend class Instance
friend

Definition at line 334 of file N_DEV_Capacitor.h.

friend class Model
friend

Definition at line 335 of file N_DEV_Capacitor.h.


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