45 #include <Xyce_config.h>
61 #include <N_ERH_ErrorMgr.h>
63 #include <N_LAS_Vector.h>
64 #include <N_LAS_Matrix.h>
102 :
DeviceInstance(IBref, configuration.getInstanceParameters(), factory_block),
111 ABraEquPosNodeOffset(-1),
112 ABraEquNegNodeOffset(-1),
113 ABraEquContPosNodeOffset(-1),
114 ABraEquContNegNodeOffset(-1),
115 APosEquBraVarOffset(-1),
116 ANegEquBraVarOffset(-1),
118 f_BraEquPosNodePtr(0),
119 f_BraEquNegNodePtr(0),
120 f_BraEquContPosNodePtr(0),
121 f_BraEquContNegNodePtr(0),
122 f_PosEquBraVarPtr(0),
153 UserError0(*
this) <<
"Could not find Gain parameter in instance.";
179 const std::vector<int> & extLIDVecRef )
183 #ifdef Xyce_DEBUG_DEVICE
186 Xyce::dout() << std::endl << section_divider << std::endl;
187 Xyce::dout() <<
" VcvsInstance::registerLIDs" << std::endl;
188 Xyce::dout() <<
" name = " <<
getName() << std::endl;
194 int numInt = intLIDVecRef.size();
195 int numExt = extLIDVecRef.size();
199 msg =
"Instance::registerLIDs:";
200 msg +=
"numInt != numIntVars";
201 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
206 msg =
"Instance::registerLIDs:";
207 msg +=
"numExt != numExtVars";
208 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
224 #ifdef Xyce_DEBUG_DEVICE
227 Xyce::dout() <<
" li_Pos = " <<
li_Pos << std::endl;
228 Xyce::dout() <<
" li_Neg = " <<
li_Neg << std::endl;
229 Xyce::dout() <<
" li_ContPos = " <<
li_ContPos << std::endl;
230 Xyce::dout() <<
" li_ContNeg = " <<
li_ContNeg << std::endl;
236 #ifdef Xyce_DEBUG_DEVICE
238 Xyce::dout() <<
" li_Bra = " <<
li_Bra << std::endl;
241 #ifdef Xyce_DEBUG_DEVICE
243 Xyce::dout() << section_divider << std::endl;
322 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
364 double v_pos = solVec[
li_Pos];
365 double v_neg = solVec[
li_Neg];
369 double i_bra = solVec[
li_Bra];
374 double src =
Gain * ( v_cont_pos - v_cont_neg ) - v_pos + v_neg;
417 varTypeVec.resize(1);
435 :
DeviceModel(MB, configuration.getModelParameters(), factory_block)
449 std::vector<Instance*>::iterator iter;
453 for (iter=first; iter!=last; ++iter)
469 std::vector<Instance*>::const_iterator iter;
475 os <<
" name model name Parameters" << std::endl;
476 for (i=0, iter=first; iter!=last; ++iter, ++i)
478 os <<
" " << i <<
": " << (*iter)->getName() <<
" ";
504 for (std::vector<Instance *>::const_iterator it = instanceContainer.begin(); it != instanceContainer.end(); ++it)
532 bool Master::loadDAEVectors (
double * solVec,
double * fVec,
double *qVec,
double * bVec,
double * storeLeadF,
double * storeLeadQ)
535 #pragma omp parallel for
541 double v_pos = solVec[vi.
li_Pos];
542 double v_neg = solVec[vi.
li_Neg];
546 double i_bra = solVec[vi.
li_Bra];
549 fVec[vi.
li_Neg] += -i_bra;
551 double src = vi.
Gain * ( v_cont_pos - v_cont_neg ) - v_pos + v_neg;
573 #ifndef Xyce_NONPOINTER_MATRIX_LOAD
605 .registerDevice(
"e", 1)
606 .registerModelType(
"e", 1);