47 #include <Xyce_config.h>
51 #include <N_UTL_Misc.h>
52 #ifdef Xyce_DEBUG_DEVICE
75 #include <N_LAS_Vector.h>
76 #include <N_LAS_Matrix.h>
77 #include <N_LAS_System.h>
78 #include <N_LAS_Builder.h>
81 #define NUM_MESH_POINTS 11
84 #define MAX_COLS_PER_ROW 10
100 bool bsuccess =
true;
103 #ifdef Xyce_DEBUG_DEVICE
107 if (
getSolverState().dcopFlag) Xyce::dout() <<
" DCOP load" << std::endl;
108 else Xyce::dout() <<
" Transient load" << std::endl;
132 std::string msg =
"Instance::loadDAEFVector."
133 "Invalid coupling Mode";
134 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
138 return (bsuccess && bs1);
198 for (iBC=0;iBC<
bcVec.size();++iBC, ++iRow)
200 coef =
bcVec[iBC].currentSum;
202 if (iBC==1) coef *= -1.0;
204 double voltLimFac = 0.0;
210 if (
bcVec[iCol].gid == -1)
continue;
212 double vdiff =
bcVec[iCol].Vckt_final -
bcVec[iCol].Vckt_orig;
216 voltLimFac += vdiff *
condVec[iRow][iCol];
220 fVec[
bcVec[iBC].lid] += -coef + voltLimFac;
224 for (
int i=0;i<
NX;++i)
244 bool bsuccess =
true;
270 std::string msg =
"Instance::loadDAEQVector."
271 "Invalid coupling Mode";
272 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
276 return (bsuccess && bs1);
349 Report::DevelFatal().in(
"Instance::loadDAEdFdx") <<
"Invalid coupling Mode" <<
numElectrodes;
395 bool bsuccess =
true;
419 bs1 = mat.putLocalRow(iRow,1, valsLID, colsLID);
420 bsuccess = bsuccess && bs1;
427 bs1 = mat.putLocalRow(iRow,1, valsLID, colsLID);
428 bsuccess = bsuccess && bs1;
435 bs1 = mat.putLocalRow(iRow,1, valsLID, colsLID);
436 bsuccess = bsuccess && bs1;
444 int iRowLID =
bcVec[iRow].gid;
446 if (iRowLID == -1)
continue;
452 if (
bcVec[iCol].gid == -1)
continue;
454 colsLID[count] =
bcVec[iCol].gid;
455 valsLID[count] =
condVec[iRow][iCol];
459 bs1 = mat.sumIntoLocalRow (iRowLID, count, valsLID, colsLID);
460 bsuccess = bsuccess && bs1;
463 #ifdef Xyce_DEBUG_DEVICE
467 char tmpString[128];
for (
int i=0;i<128;++i) tmpString[i] = 0;
469 Xyce::dout() << std::endl;
470 sprintf(tmpString,
"ConArray:\t "); Xyce::dout() << std::string(tmpString);
473 sprintf(tmpString,
"\t%14s",
bcVec[iE2].eName.c_str()); Xyce::dout() << std::string(tmpString);
475 Xyce::dout() << std::endl;
479 sprintf(tmpString,
"ConArray:\t%14s",
bcVec[iE1].eName.c_str()); Xyce::dout() << std::string(tmpString);
482 sprintf(tmpString,
"\t%14.4e",
condVec[iE1][iE2]); Xyce::dout() << std::string(tmpString);
484 Xyce::dout() << std::endl;
486 Xyce::dout() << std::endl;
523 Report::DevelFatal().in(
"Instance::loadDAEdQdx") <<
"Invalid coupling Mode " <<
numElectrodes;
540 bool bsuccess =
true;
546 for (
int i=1;i<
NX-1;++i)
576 bool bsuccess =
true;