46 #ifndef Xyce_N_DEV_Resistor_h
47 #define Xyce_N_DEV_Resistor_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 "Resistor";}
154 virtual void registerLIDs(
const std::vector<int> & intLIDVecRef,
const std::vector<int> & extLIDVecRef) ;
158 virtual void registerJacLIDs(
const std::vector< std::vector<int> > & jacLIDVec) ;
237 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
372 virtual bool updateState(
double * solVec,
double * staVec,
double * stoVec);
373 virtual bool loadDAEVectors (
double * solVec,
double * fVec,
double * qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV);
374 virtual bool loadDAEMatrices(Linear::Matrix & dFdx, Linear::Matrix & dQdx);
383 #endif // Xyce_N_DEV_Resistor_h
static void loadModelParameters(ParametricData< Model > &p)
Loads the parameter definition into the model parameter map.
Instance & operator=(const Instance &)
virtual bool updatePrimaryState()
Update the state variables.
int li_Pos
Index for Positive Node.
int ANegEquNegNodeOffset
Column index into force matrix of Neg/Neg conductance.
virtual void setupPointers()
Setup direct access pointer to solution matrix and vectors.
double sheetRes
Sheet resistance.
int li_branch_data
Index for Lead Current and junction voltage (for power calculations)
InstanceVector instanceContainer
List of owned resistor instances.
double length
Resistor length.
double * f_PosEquPosNodePtr
Pure virtual class to augment a linear system.
static resistorSensitivity resSens
static void initializeJacobianStamp()
Common Jacobian stamp initializer for all Resistor devices.
double * f_NegEquNegNodePtr
Master(const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &solver_state, const DeviceOptions &device_options)
Construct a Resistor Device.
double tempCoeff2
Second order temperature coeff.
virtual void registerBranchDataLIDs(const std::vector< int > &branchLIDVecRef)
Register the local store IDs.
double resistanceMultiplier
resistance multiplier
int APosEquPosNodeOffset
Column index into force matrix of Pos/Pos conductance.
Base class for all parameters.
virtual bool processParams()
Process parameters.
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Update state for all resistor instances, regardless of model.
static void loadInstanceParameters(ParametricData< Instance > &p)
Loads the parameter definition into the instance parameter map.
virtual void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
int getNumNoiseSources() const
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 resistor instances, regardless of model.
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
virtual bool loadDAEFVector()
Load the DAE F vector.
DeviceMaster instantiates a device as described by the device traits T.
double tempCoeff1
First order temperature coeff.
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
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
void addInstance(Instance *instance)
Add an instance to the list of instances associated with this model.
static const char * name()
double temp
Temperature of this instance.
double dtemp
Externally specified device temperature.
int li_store_dev_i
Index for Lead Current.
virtual bool loadDAEQVector()
Load Q vector Since the Resistor does no charge storage, this is a no-op.
static bool isLinearDevice()
virtual void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
Register the Jacobian local IDs.
static const char * deviceTypeName()
bool tempCoeff2Given
Second order temperature coeff was given in netlist.
Resistor device instance class.
Model & operator=(const Model &)
double narrow
Narrowing due to side etching.
double R
Resistance (ohms)
~Instance()
Destroys this instance.
The Device class is an interface for device implementations.
virtual bool processInstanceParams()
Process the instance parameters of instance owned by this model.
void setupNoiseSources(Xyce::Analysis::NoiseData &noiseData)
virtual void registerStateLIDs(const std::vector< int > &staLIDVecRef)
Register the local state IDs.
virtual const std::vector< std::vector< int > > & jacobianStamp() const
Return Jacobian stamp that informs topology of the layout of the resistor jacobian.
virtual std::ostream & printOutInstances(std::ostream &os) const
Print instances associated with this model.
virtual bool loadDAEdFdx()
Load the DAE the derivative of the F vector with respect to the solution vector x, dFdx.
virtual ~resistorSensitivity()
Model & model_
Owning model.
Class Configuration contains device configuration data.
virtual void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
Register local IDs.
virtual bool loadDAEdQdx()
Load derivative of Q vector with respect to solution vector Since the Resistor does no charge storage...
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
Create a new instance of the Resistor device.
double width
Resistor width.
int ANegEquPosNodeOffset
Column index into force matrix of Neg/Pos conductance.
double G
Conductance(1.0/ohms)
virtual bool processParams()
Process model parameters.
static const char * instanceDefaultParameter()
double tempCoeff1
First order temperature coefficient.
double tempCoeff2
Second order temperature coefficient.
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Load DAE matrices for all resistor instances, regardless of model.
double defWidth
Default width.
virtual void registerStoreLIDs(const std::vector< int > &stoLIDVecRef)
Register the local store IDs.
Base sensitivity functor.
ModelBlock represents a .MODEL line from the netlist.
The DeviceTraits template describes the configuration of a device.
static const char * primaryParameter()
Manages parameter binding for class C.
~Model()
Destroy this model.
int li_Neg
Index for Negative Node.
static std::vector< std::vector< int > > jacStamp
All Resistor instances have a common Jacobian Stamp.
InstanceBlock represent a device instance line from the netlist.
void registerDevice()
Define how to use the device in a netlist.
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
Construct a resistor instance.
virtual bool updateTemperature(const double &temp_tmp)
Update the parameters that depend on the temperature of the device.
int APosEquNegNodeOffset
Column index into force matrix of Pos/Neg conductance.
bool isLinearDevice() const
std::vector< Instance * > InstanceVector
double * f_NegEquPosNodePtr
void getNoiseSources(Xyce::Analysis::NoiseData &noiseData)
Model & getModel()
Gets the resistor model that owns this instance.
double tnom
Parameter measurement temperature.
bool tempCoeff1Given
First order temperation value was given in netlist.
double * f_PosEquNegNodePtr
virtual bool updateIntermediateVars()
Update the intermediate variables.
bool dtempGiven
Externally specified device temperature was given in netlist.