46 #ifndef Xyce_N_DEV_Capacitor_h
47 #define Xyce_N_DEV_Capacitor_h
73 const std::string &name,
74 std::vector<double> & dfdp,
75 std::vector<double> & dqdp,
76 std::vector<double> & dbdp,
77 std::vector<int> & Findices,
78 std::vector<int> & Qindices,
79 std::vector<int> & Bindices
87 static const char *
name() {
return "Capacitor";}
134 void registerLIDs(
const std::vector<int> & intLIDVecRef,
const std::vector<int> & extLIDVecRef );
140 const std::vector< std::vector<int> > &
jacobianStamp()
const;
141 void registerJacLIDs(
const std::vector< std::vector<int> > & jacLIDVec );
161 void varTypes( std::vector<char> & varTypeVec );
242 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
363 virtual bool updateState (
double * solVec,
double * staVec,
double * stoVec);
366 virtual bool loadDAEVectors (
double * solVec,
double * fVec,
double * qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV);
367 virtual bool loadDAEMatrices (Linear::Matrix & dFdx, Linear::Matrix & dQdx);
376 #endif // Xyce_N_DEV_Capacitor_h
void addInstance(Instance *instance)
bool loadDAEdQdx()
Load the DAE the derivative of the Q vector with respect to the solution vector x, dFdx.
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Update state for all capacitor instances, regardless of model.
bool processParams()
Process model parameters.
double * fBraEquNegNodePtr
static const char * name()
Pure virtual class to augment a linear system.
bool loadDAEQVector()
Load the DAE Q vector.
std::vector< Instance * > instanceContainer
double * fBraEquPosNodePtr
bool processInstanceParams()
Process the instance parameters of instance owned by this model.
double baseCap
the baseline capacitance before aging
void registerDevice()
Define how to use the device in a netlist.
Model & operator=(const Model &)
Base class for all parameters.
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.
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
Construct a Capacitor model from a "model block" that was created by the netlist parser.
void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)
Register the local store IDs.
Instance & operator=(const Instance &)
double capacitanceMultiplier
bool updatePrimaryState()
Update the state variables.
double * fNegEquBraNodePtr
std::vector< int > ANegEquDepVarOffsets
double * qPosEquPosNodePtr
DeviceMaster instantiates a device as described by the device traits T.
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
Create a new instance of the Capacitor device.
Util::Expression * expPtr
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
bool updateIntermediateVars()
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
Register the local state IDs.
virtual void operator()(const ParameterBase &entity, const std::string &name, std::vector< double > &dfdp, std::vector< double > &dqdp, std::vector< double > &dbdp, std::vector< int > &Findices, std::vector< int > &Qindices, std::vector< int > &Bindices) const
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
Loads the parameter definition into the instance parameter map.
bool loadDAEdFdx()
Load the DAE the derivative of the F vector with respect to the solution vector x, dFdx.
virtual ~capSensitivity()
static void loadModelParameters(ParametricData< Model > &model_parameters)
Loads the parameter definition into the model parameter map.
double * fBraEquBraNodePtr
std::vector< int > li_dCdXState
Master(const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &ss1, const DeviceOptions &do1)
std::vector< int > li_dQdXState
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
static capSensitivity capSens
double * qNegEquNegNodePtr
double * fPosEquBraNodePtr
The Device class is an interface for device implementations.
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
double q0
charge in the capacitor
int li_Bra
for the "voltage source" when IC is specified
Class Configuration contains device configuration data.
std::vector< int > APosEquDepVarOffsets
bool processParams()
Process parameters.
std::vector< double > expVarDerivs
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
Register the Jacobian local IDs.
std::vector< double * > qPosEquDepVarsPtrs
const std::vector< std::vector< int > > & jacobianStamp() const
Return Jacobian stamp that informs topology of the layout of the resistor jacobian.
static const char * instanceDefaultParameter()
static const char * deviceTypeName()
bool updateTemperature(const double &temp_tmp)
Update the parameters that depend on the temperature of the device.
virtual std::ostream & printOutInstances(std::ostream &os) const
std::vector< std::vector< int > > jacStamp_IC
std::vector< std::vector< int > > jacStamp
static bool isLinearDevice()
std::vector< double * > qNegEquDepVarsPtrs
double * qPosEquNegNodePtr
std::vector< Instance * > InstanceVector
Base sensitivity functor.
void setupPointers()
Setup direct access pointer to solution matrix and vectors.
ModelBlock represents a .MODEL line from the netlist.
The DeviceTraits template describes the configuration of a device.
Manages parameter binding for class C.
InstanceBlock represent a device instance line from the netlist.
bool loadDAEFVector()
Load the DAE F vector.
double ageCoef
degradation coeficient.
static const char * primaryParameter()
void registerBranchDataLIDs(const std::vector< int > &branchLIDVecRef)
Register the local store IDs.
int li_branch_data
Index for lead current and junction voltage (for power calculations)
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
Register local IDs.
double * qNegEquPosNodePtr
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Load DAE matrices for all capacitor instances, regardless of model.
void varTypes(std::vector< char > &varTypeVec)