46 #ifndef Xyce_N_DEV_LTRA_h
47 #define Xyce_N_DEV_LTRA_h
50 #include <N_UTL_fwd.h>
58 #define LTRA_MOD_LTRA 0
63 #define LTRA_MOD_LEN 5
69 #define LTRA_MOD_RELTOL 11
70 #define LTRA_MOD_ABSTOL 12
71 #define LTRA_POS_NODE1 13
72 #define LTRA_NEG_NODE1 14
73 #define LTRA_POS_NODE2 15
74 #define LTRA_NEG_NODE2 16
75 #define LTRA_INPUT1 17
76 #define LTRA_INPUT2 18
78 #define LTRA_BR_EQ1 20
79 #define LTRA_BR_EQ2 21
80 #define LTRA_MOD_NL 22
81 #define LTRA_MOD_FREQ 23
83 #define LTRA_MOD_FULLCONTROL 26
84 #define LTRA_MOD_HALFCONTROL 27
85 #define LTRA_MOD_NOCONTROL 28
86 #define LTRA_MOD_PRINT 29
87 #define LTRA_MOD_NOPRINT 30
89 #define LTRA_MOD_STEPLIMIT 32
90 #define LTRA_MOD_NOSTEPLIMIT 33
91 #define LTRA_MOD_LININTERP 34
92 #define LTRA_MOD_QUADINTERP 35
93 #define LTRA_MOD_MIXEDINTERP 36
94 #define LTRA_MOD_RLC 37
95 #define LTRA_MOD_RC 38
96 #define LTRA_MOD_RG 39
97 #define LTRA_MOD_LC 40
98 #define LTRA_MOD_RL 41
99 #define LTRA_MOD_STLINEREL 42
100 #define LTRA_MOD_STLINEABS 43
101 #define LTRA_MOD_CHOPREL 44
102 #define LTRA_MOD_CHOPABS 45
103 #define LTRA_MOD_TRUNCNR 46
104 #define LTRA_MOD_TRUNCDONTCUT 47
115 static const char *
name() {
return "Lossy Transmission Line";}
153 void registerLIDs(
const std::vector<int> & intLIDVecRef,
154 const std::vector<int> & extLIDVecRef );
159 const std::vector< std::vector<int> > &
jacobianStamp()
const;
160 void registerJacLIDs(
const std::vector< std::vector<int> > & jacLIDVec );
215 std::vector<double>
v1;
216 std::vector<double>
v2;
218 std::vector<double>
i1;
219 std::vector<double>
i2;
344 int quadInterp_ (
double t,
double t1,
double t2,
double t3,
double& c1,
double& c2,
double& c3);
345 int linInterp_ (
double t,
double t1,
double t2,
double& c1,
double& c2);
346 double intlinfunc_ (
double lolimit,
double hilimit,
347 double lovalue,
double hivalue,
348 double t1,
double t2);
350 double otherlolimit,
double lovalue,
351 double hivalue,
double t1,
double t2);
353 double secondlolimit,
double thirdlolimit,
354 double lovalue,
double hivalue,
355 double t1,
double t2);
358 double& lf2,
double& lf3);
377 double & h1dashfirstcoeff,
378 double & h2firstcoeff,
379 double & h3dashfirstcoeff,
380 std::vector<double> & h1dashcoeffs,
381 std::vector<double> & h2coeffs,
382 std::vector<double> & h3dashcoeffs,
383 size_t listsize,
double cbyr,
double rclsqr,
double curtime,
384 const std::vector<double> & timelist,
int timeindex,
double reltol);
387 double & h1dashfirstcoeff,
double & h2firstcoeff,
double & h3dashfirstcoeff,
388 std::vector<double> & h1dashcoeffs, std::vector<double> & h2coeffs, std::vector<double> & h3dashcoeffs,
389 size_t listsize,
double T,
double alpha,
double beta,
double curtime,
390 const std::vector<double> & timelist,
int timeindex,
double reltol,
int *auxindexptr);
393 double x2,
double y2,
394 double x3,
double y3,
402 double SECONDDERIV_(
int i,
double a,
double b,
double c);
536 virtual bool updateState (
double * solVec,
double * staVec,
double * stoVec);
539 virtual bool loadDAEVectors (
double * solVec,
double * fVec,
double * qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ,
double * leadF,
double * leadQ,
double * junctionV);
540 virtual bool loadDAEMatrices (Linear::Matrix & dFdx, Linear::Matrix & dQdx);
bool modelCalculations_(int &isaved, double &qf1, double &qf2, double &qf3, double &lf2, double &lf3)
double rlcH3dashFunc_(double time, double T, double alpha, double beta)
virtual std::ostream & printOutInstances(std::ostream &os) const
double thriceintlinfunc_(double lolimit, double hilimit, double secondlolimit, double thirdlolimit, double lovalue, double hivalue, double t1, double t2)
bool updateIntermediateVars()
static void loadModelParameters(ParametricData< Model > &model_parameters)
void rlcCoeffsSetup_(double &h1dashfirstcoeff, double &h2firstcoeff, double &h3dashfirstcoeff, std::vector< double > &h1dashcoeffs, std::vector< double > &h2coeffs, std::vector< double > &h3dashcoeffs, size_t listsize, double T, double alpha, double beta, double curtime, const std::vector< double > &timelist, int timeindex, double reltol, int *auxindexptr)
bool getInstanceBreakPoints(std::vector< Util::BreakPoint > &breakPointTimes)
bool updateSecondaryState()
double rcH2TwiceIntFunc_(double time, double rclsqr)
static std::vector< std::vector< int > > jacStamp
int AIbr1EquNeg2NodeOffset
bool setInternalState(const DeviceState &state)
const std::vector< std::vector< int > > & jacobianStamp() const
int ANeg1EquNeg1NodeOffset
DeviceState * getInternalState()
Pure virtual class to augment a linear system.
int AIbr2EquNeg2NodeOffset
int AIbr1EquPos1NodeOffset
static const char * deviceTypeName()
int ANeg1EquIbr1NodeOffset
void registerLIDs(const std::vector< int > &intLIDVecRef, const std::vector< int > &extLIDVecRef)
void registerStateLIDs(const std::vector< int > &staLIDVecRef)
static const char * name()
int AIbr2EquIbr2NodeOffset
std::vector< double > h1dashCoeffs
int APos1EquPos1NodeOffset
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
Model & operator=(const Model &)
double rcH3dashTwiceIntFunc_(double time, double cbyr, double rclsqr)
bool straightLineCheck_(double x1, double y1, double x2, double y2, double x3, double y3, double reltol, double abstol)
Instance & operator=(const Instance &)
bool updatePrimaryState()
double rlcH3dashIntFunc_(double time, double T, double beta)
int AIbr2EquIbr1NodeOffset
DeviceMaster instantiates a device as described by the device traits T.
double rcH1dashTwiceIntFunc_(double time, double cbyr)
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
double twiceintlinfunc_(double lolimit, double hilimit, double otherlolimit, double lovalue, double hivalue, double t1, double t2)
virtual bool loadDAEMatrices(Linear::Matrix &dFdx, Linear::Matrix &dQdx)
Populates the device's Jacobian object with these pointers.
static bool modelRequired()
int AIbr1EquIbr1NodeOffset
int ANeg2EquIbr2NodeOffset
Master(const Configuration &configuration, const FactoryBlock &factory_block, const SolverState &ss1, const DeviceOptions &do1)
Instance(const Configuration &configuration, const InstanceBlock &instance_block, Model &model, const FactoryBlock &factory_block)
The Device class is an interface for device implementations.
double bessI1xOverX_(double x)
void registerJacLIDs(const std::vector< std::vector< int > > &jacLIDVec)
double lteCalculate_(Instance &instance, double curtime)
Class Configuration contains device configuration data.
std::vector< Instance * > InstanceVector
void loadNodeSymbols(Util::SymbolTable &symbol_table) const
Populates and returns the store name map.
int AIbr2EquPos2NodeOffset
int quadInterp_(double t, double t1, double t2, double t3, double &c1, double &c2, double &c3)
virtual bool updateSecondaryState(double *staDeriv, double *stoVec)
Updates the devices secondary state information.
int AIbr1EquPos2NodeOffset
int AIbr1EquNeg1NodeOffset
bool processInstanceParams()
processInstanceParams
int AIbr2EquPos1NodeOffset
void rcCoeffsSetup_(double &h1dashfirstcoeff, double &h2firstcoeff, double &h3dashfirstcoeff, std::vector< double > &h1dashcoeffs, std::vector< double > &h2coeffs, std::vector< double > &h3dashcoeffs, size_t listsize, double cbyr, double rclsqr, double curtime, const std::vector< double > &timelist, int timeindex, double reltol)
virtual void forEachInstance(DeviceInstanceOp &op) const
Apply a device instance "op" to all instances associated with this model.
double rlcH1dashTwiceIntFunc_(double time, double beta)
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
int APos2EquPos2NodeOffset
double SECONDDERIV_(int i, double a, double b, double c)
virtual bool loadDAEVectors(double *solVec, double *fVec, double *qVec, double *bVec, double *storeLeadF, double *storeLeadQ, double *leadF, double *leadQ, double *junctionV)
Populates the device's ExternData object with these pointers.
std::vector< double > h2Coeffs
double intlinfunc_(double lolimit, double hilimit, double lovalue, double hivalue, double t1, double t2)
int AIbr2EquNeg1NodeOffset
std::vector< double > h3dashCoeffs
ModelBlock represents a .MODEL line from the netlist.
bool lteTimeStepControlGiven
The DeviceTraits template describes the configuration of a device.
double rlcH2Func_(double time, double T, double alpha, double beta)
Manages parameter binding for class C.
InstanceBlock represent a device instance line from the netlist.
std::vector< Instance * > instanceContainer
bool processParams()
processParams
void calculateMaxTimeStep_(void)
int APos2EquIbr2NodeOffset
int linInterp_(double t, double t1, double t2, double &c1, double &c2)
double rlcH1dashFunc_(double time, double T, double alpha, double beta)
int APos1EquIbr1NodeOffset
virtual bool updateState(double *solVec, double *staVec, double *stoVec)
Updates the devices state information.
int ANeg2EquNeg2NodeOffset
void addInstance(Instance *instance)
static bool isLinearDevice()
double getMaxTimeStepSize()
int AIbr1EquIbr2NodeOffset