Xyce
6.1
|
Capacitor Master class. More...
#include <N_DEV_Capacitor.h>
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 *bVec, double *storeLeadF, double *storeLeadQ, double *leadF, double *leadQ, double *junctionV) |
Load DAE vectors of all capacitor instances, regardless of model. More... | |
virtual bool | loadDAEMatrices (Linear::Matrix &dFdx, Linear::Matrix &dQdx) |
Load DAE matrices for all capacitor instances, regardless of model. More... | |
![]() | |
DeviceMaster (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 DeviceModel * | findModel (const ModelName &model_name) |
Returns a pointer to the model or model model with the specified name. More... | |
virtual const DeviceModel * | findModel (const ModelName &model_name) const |
Returns a pointer to the model or model model with the specified name. More... | |
virtual DeviceEntity * | findInstance (const InstanceName &instance_name) |
Returns a pointer to the model or instance entity with the specified name. More... | |
virtual const DeviceEntity * | findInstance (const InstanceName &instance_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 ModelType * | addModel (const ModelBlock &MB, const FactoryBlock &factory_block) |
Creates a device model and adds it to the device's list of models. More... | |
virtual InstanceType * | addInstance (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... | |
virtual bool | isConverged () const |
Checks that the device is converged. More... | |
![]() | |
Device () | |
virtual | ~Device () |
Friends | |
class | Instance |
class | Model |
Additional Inherited Members | |
![]() | |
typedef Traits::ModelType | ModelType |
Make the model begin defined available. More... | |
typedef Traits::InstanceType | InstanceType |
Make the instance being define available. More... | |
![]() | |
typedef std::vector< InstanceType * > | InstanceVector |
typedef unordered_map< std::string, ModelType *, HashNoCase, EqualNoCase > | ModelMap |
typedef unordered_map< std::string, InstanceType *, HashNoCase, EqualNoCase > | InstanceMap |
![]() | |
const SolverState & | getSolverState () const |
Returns the solver state given during device construction. More... | |
const DeviceOptions & | getDeviceOptions () 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... | |
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 351 of file N_DEV_Capacitor.h.
|
inline |
Definition at line 357 of file N_DEV_Capacitor.h.
|
virtual |
Load DAE matrices for all capacitor instances, regardless of model.
dFdx | matrix of derivatives of F vector with respect to solution |
dQdx | matrix of derivatives of Q vector with respect to solution |
Reimplemented from Xyce::Device::DeviceMaster< Traits >.
Definition at line 1993 of file N_DEV_Capacitor.C.
|
virtual |
Load DAE vectors of all capacitor instances, regardless of model.
solVec | solution vector |
fVec | f vector |
qVec | q vector |
storeLeadF | store lead current f vector |
storeLeadQ | store lead current q vector |
Reimplemented from Xyce::Device::DeviceMaster< Traits >.
Definition at line 1890 of file N_DEV_Capacitor.C.
|
virtual |
Update state for all capacitor instances, regardless of model.
solVec | solution vector |
staVec | state vector |
stoVec | store vector |
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.
Reimplemented from Xyce::Device::DeviceMaster< Traits >.
Definition at line 1830 of file N_DEV_Capacitor.C.
|
friend |
Definition at line 353 of file N_DEV_Capacitor.h.
|
friend |
Definition at line 354 of file N_DEV_Capacitor.h.