51 #include <Xyce_config.h>
69 #include <N_LAS_Vector.h>
70 #include <N_LAS_Matrix.h>
71 #include <N_LAS_System.h>
72 #include <N_LAS_Builder.h>
74 #include <N_UTL_Expression.h>
88 .setDescription(
"Cross sectional area of the device.")
93 .setDescription(
"Acceptor doping level")
98 .setDescription(
"Donor doping level")
103 .setDescription(
"Junction width, if graded junction enabled.")
108 .setDescription(
"Temperature");
112 .setDescription(
"Length scalar; adjust to mitigate convergence problems. "
113 "The model will do all of its scaling automatically, so it is generally not "
114 "necessary to specify it manually.")
119 .setDescription(
"Device length")
124 .setDescription(
"Device width")
129 .setDescription(
"Time interval for tecplot output (if tecplot is enabled).")
133 .setDescription(
"This is a required field for a 2D simulation. If the user"
134 "specifies meshfile=internal.mesh, the model will create a"
135 "Cartesian mesh using the parameters L,W,NX and NY. If the user specifies "
136 "anything else (for example meshfile=diode.msh), the model will attempt to "
137 "read in a mesh file of that name. The format is assumed to be that "
138 "of the SG Framework.");
142 .setDescription(
"Flag for graded junction vs. abrupt junction. – (1/true=graded, 0/false=abrupt)")
146 .setDescription(
"Mobility model.");
149 .setDescription(
"Material of bulk material.");
151 #ifdef Xyce_OXIDE_ENABLED
152 p.
addPar(
"ALLOXIDE",
false, &TwoDPDE::Instance::allOxideFlag)
157 .setDescription(
"If true, displacement current is computed and output");
160 .setDescription(
"Setting for Tecplot output:\n"
161 "0 - no Tecplot files\n"
162 "1 - Tecplot files, each output in a separate file. 2 - Tecplot file, each output"
163 "appended to a single file.\n"
164 "Tecplot files will have the .dat suffix, and the prefix will be the name of the device instance")
168 .setDescription(
"Flag for sgplot output.\n"
169 "0 - no sgplot files.\n"
170 "1 - sgplot files.\n"
171 "sgplot is a plotting program that comes as part of the SG Framework. sgplot "
172 "files will have the *.res suffix, and the prefix will be the name of the "
177 .setDescription(
"Flag for gnuplot output.\n"
178 "0 - no gnuplot files.\n"
179 "1 - gnuplot files.\n"
180 "gnuplot is an open source plotting program that is usually installed on Linux "
181 "systems. gnuplot files will have the *Gnu.dat suffix, and the prefix will be the"
182 "name of the device instance.")
186 .setDescription(
"Flag for volume-averaged text output.\n"
187 "0 - no text files.\n"
189 "txtdataplot files will have the *.txt suffix, and the prefix will be the name of the device instance.")
193 .setDescription(
"Number of mesh points, x-direction.");
196 .setDescription(
"Number of mesh points, y-direction.");
200 .setDescription(
"Flag to enable cylindrical geometry")
205 .setDescription(
"Flag to determine if the results of the nonlinear Poisson "
206 "calculation is included in the output files. Normally, this calculation"
207 " is used to initialize a drift-diffusion calculation and isn't of interest.")
211 .setDescription(
"P-type or N-type - this is only relevant if using the default dopings");
217 .setDescription(
"Maximum voltage change used by two-level Newton algorithm.");
222 .setDescription(
"Flag for using old (inaccurate) intrinsic carrier calculation.");
286 useOldNiGiven(false),
289 usingInternalMesh(false),
291 deviceInitialized(false),
292 meshPerturbed (false),
293 dopingPerturbed (false),
297 deviceLength(1.0e-3),
301 #ifdef Xyce_OXIDE_ENABLED
305 gradedJunctionFlag(false),
306 calledBeforeSIGB(false),
313 displCurrentFlag(false),
314 constBoundaryFlag(false),
315 calcConductanceFlag(false),
319 outputNLPoisson(false),
320 lastOutputTime(-10.0),
327 useMatrixGIDFlag(false),
328 useVectorGIDFlag(false),
330 meshCopyContainerPtr(0),
371 boundaryNeighborSten(),
398 meshNeighborMultiMap(),
405 numInterfaceMeshPoints(0),
409 maxColsPerRow(MAX_COLS_PER_ROW),
413 pdTermsAllocated(false),
441 if (
given(
"PH.TYPE"))
443 if (photoString ==
"UNIFORM")
445 else if (photoString ==
"PULSE")
449 std::string msg =
"::: ph.type not recognized.\n";
450 N_ERH_ErrorMgr::report( N_ERH_ErrorMgr::DEV_FATAL_0,msg);
458 tmpTypeName.toUpper ();
462 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
463 Xyce::dout() <<
"Doing standard initialization of ."<< std::endl;
480 bs1 = setupPhotogen (); bsuccess = bsuccess && bs1;
509 std::map<std::string,DopeInfo *>::iterator iter;
510 std::map<std::string,DopeInfo *>::iterator begin =
dopeInfoMap.begin();
511 std::map<std::string,DopeInfo *>::iterator end =
dopeInfoMap.end ();
513 for(iter=begin;iter!=end;++iter)
515 if (iter->second != 0)
delete iter->second;
522 std::map<std::string, PDE_2DElectrode * >::iterator iterE;
523 std::map<std::string, PDE_2DElectrode * >::iterator beginE =
electrodeMap.begin();
524 std::map<std::string, PDE_2DElectrode * >::iterator endE =
electrodeMap.end ();
526 for(iterE=beginE;iterE!=endE;++iterE)
528 if (iterE->second != 0)
delete iterE->second;
543 if (compositeName ==
"DOPINGPROFILES" || compositeName ==
"REGION")
547 return (static_cast<CompositeParam *> (n));
549 if (compositeName ==
"NODE")
552 ExtendedString dIName = paramName;
555 dINode.
eName = dIName;
556 dINode.
nName = paramName;
565 return (static_cast<CompositeParam *> (n));
568 "Instance::constructComposite: unrecognized composite name: ";
569 msg += compositeName;
570 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
588 bool bsuccess =
true;
591 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
593 Xyce::dout() << section_divider <<
"\n";
594 Xyce::dout() <<
"updateIntermediateVars. name = " <<
getName() << std::endl;
603 bs1 =
calcEfield (); bsuccess = bsuccess && bs1;
613 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
615 Xyce::dout() << section_divider << std::endl;
632 bool bsuccess =
true;
634 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
636 Xyce::dout() << section_divider <<
"\n";
637 Xyce::dout() <<
"calcTerminalCurrents. name = " <<
getName() << std::endl;
641 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin ();
642 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
643 std::vector<DeviceInterfaceNode>::iterator iterDI;
646 for (iterDI=firstDI; iterDI!=lastDI; ++iterDI, ++ind)
654 std::vector<int>::iterator firstI = labelPtr->
mNodeVector.begin();
655 std::vector<int>::iterator lastI = labelPtr->
mNodeVector.end ();
656 std::vector<int>::iterator iterI;
658 iterDI->currentSum = 0.0;
661 for(nodeIndex=0,iterI=firstI;iterI!=lastI;++iterI,++nodeIndex)
667 std::vector<EDGEINFO>::iterator firstEI = nodePtr->
edgeInfoVector.begin();
668 std::vector<EDGEINFO>::iterator lastEI = nodePtr->
edgeInfoVector.end ();
669 std::vector<EDGEINFO>::iterator iterEI;
673 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
675 Xyce::dout() <<
" --------------- " << std::endl;
676 Xyce::dout() <<
"name = " << iterDI->eName;
677 Xyce::dout() <<
" node = " << *iterI << std::endl;
680 for (iterEI=firstEI;iterEI!=lastEI;++iterEI)
682 int iedge = iterEI->iedge;
683 int neighbor = iterEI->inode;
685 double ilen = edgePtr->
ilen;
687 double sign = (*iterI < neighbor) ? 1.0 : -1.0;
689 sum += (sign*
JnVec[iedge] + sign*
JpVec[iedge])*ilen;
694 Xyce::dout() <<
" sum*scalingVars.a0 = "<< sum*
scalingVars.
a0 << std::endl;
695 Xyce::dout() <<
" sum = " << sum << std::endl;
696 Xyce::dout() <<
" --------------- " << std::endl;
701 iterDI->currentSum += sum;
722 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
724 Xyce::dout().setf(std::ios::scientific);
725 Xyce::dout() <<
" " << iterDI->eName;
726 Xyce::dout() <<
" Ickt = " << iterDI->currentSum << std::endl;
731 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
733 Xyce::dout() << section_divider << std::endl;
779 bool bsuccess =
true;
781 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin ();
782 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
783 std::vector<DeviceInterfaceNode>::iterator iterDI;
797 double nodeArea,ilen,elen;
806 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
808 iterDI->dIdVckt = 0.0;
813 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
815 Xyce::dout() << Xyce::subsection_divider << std::endl;
818 if (iterDI->gid ==-1)
continue;
823 std::vector<int>::iterator firstI = labelPtr->
mNodeVector.begin();
824 std::vector<int>::iterator lastI = labelPtr->
mNodeVector.end ();
825 std::vector<int>::iterator iterI;
827 std::vector<EDGEINFO>::iterator firstEI;
828 std::vector<EDGEINFO>::iterator lastEI;
829 std::vector<EDGEINFO>::iterator iterEI;
838 for(nodeIndex=0,iterI=firstI;iterI!=lastI;++iterI,++nodeIndex)
846 for (iterEI=firstEI; iterEI!=lastEI; ++iterEI)
848 iedge = iterEI->iedge;
849 inodeB = iterEI->inode;
851 ilen = edgePtr->
ilen;
858 sign = (*iterI < inodeB) ? 1.0 : -1.0;
871 coef += (sign* dJndV + sign* dJpdV)*ilen;
876 iterDI->dIdVckt += tmpsum;
880 Xyce::dout().setf(std::ios::left);
881 Xyce::dout() << iterDI->eName<<
":";
882 Xyce::dout() <<
" KCL pdTerminalCurrent row = " << iterDI->gid;
883 Xyce::dout() <<
" contrib = " << tmpsum;
884 Xyce::dout() <<
" dIdVckt = " << iterDI->dIdVckt << std::endl;
889 #endif // Xyce_NEW_BC
893 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
895 Xyce::dout() << Xyce::subsection_divider << std::endl;
897 #endif // Xyce_NEW_BC
901 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
906 int size = iterDI->dFdVckt.size();
907 for (itmp=0;itmp<size;++itmp)
909 iterDI->dFdVckt[itmp] = 0.0;
912 int numNeighbor = iterDI->neighborNodes.size();
916 for (iNeighbor=0;iNeighbor<numNeighbor;++iNeighbor)
918 int inode = iterDI->neighborNodes[iNeighbor];
921 nodeArea = nodePtr->
area;
925 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
945 iterDI->dFdVckt[dFdVindex] = coef;
950 if (inode>inodeB) { dJdV =
dJndV1Vec[iedge]; }
953 coef = ((inode<inodeB)?1.0:-1.0) * dJdV * ilen/nodeArea;
956 iterDI->dFdVckt[dFdVindex] = coef;
961 if (inode>inodeB) { dJdV =
dJpdV1Vec[iedge]; }
964 coef = -((inode<inodeB)?1.0:-1.0) * dJdV * ilen/nodeArea;
967 iterDI->dFdVckt[dFdVindex] = coef;
973 Xyce::dout() <<
"-----" << std::endl;
974 Xyce::dout() <<
"neighbor nodes for boundary: " << iterDI->eName << std::endl;
975 Xyce::dout() <<
"-----" << std::endl;
976 for (iNeighbor=0;iNeighbor<numNeighbor;++iNeighbor)
978 int inode = iterDI->neighborNodes[iNeighbor];
979 Xyce::dout() <<
"\t"<<iNeighbor<<
" "<< inode << std::endl;
982 Xyce::dout() <<
"-----" << std::endl;
983 Xyce::dout() <<
"dFdVckt vector for boundary: " << iterDI->eName << std::endl;
984 Xyce::dout() <<
"-----" << std::endl;
988 for (iNeighbor=0;iNeighbor<numNeighbor;++iNeighbor)
990 int inode = iterDI->neighborNodes[iNeighbor];
999 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
1010 dfdV = iterDI->dFdVckt[idf];
1011 Xyce::dout() <<
"\t"<<idf;
1012 Xyce::dout() <<
" \tv_"<<inode<<
"\t"<<Vrow<<
"\t"<<dfdV<< std::endl;
1015 dfdV = iterDI->dFdVckt[idf];
1016 Xyce::dout() <<
"\t"<<idf;
1017 Xyce::dout() <<
" \tn_"<<inode<<
"\t"<<Nrow<<
"\t"<<dfdV<< std::endl;
1020 dfdV = iterDI->dFdVckt[idf];
1021 Xyce::dout() <<
"\t"<<idf;
1022 Xyce::dout() <<
" \tp_"<<inode<<
"\t"<<Prow<<
"\t"<<dfdV<< std::endl;
1026 Xyce::dout() <<
"-----" << std::endl;
1029 #else // old BC not set up yet.
1031 #endif // Xyce_NEW_BC
1037 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
1042 int numdIdX = iterDI->dIdX.size ();
1043 for (
int j=0;j<numdIdX;++j)
1045 iterDI->dIdX[j] = 0.0;
1051 std::vector<int>::iterator firstI = labelPtr->
mNodeVector.begin();
1052 std::vector<int>::iterator lastI = labelPtr->
mNodeVector.end ();
1053 std::vector<int>::iterator iterI;
1055 std::vector<EDGEINFO>::iterator firstEI;
1056 std::vector<EDGEINFO>::iterator lastEI;
1057 std::vector<EDGEINFO>::iterator iterEI;
1065 for(nodeIndex=0,iterI=firstI;iterI!=lastI;++iterI,++nodeIndex)
1075 for (iterEI=firstEI; iterEI!=lastEI; ++iterEI)
1077 iedge = iterEI->iedge;
1078 inodeB = iterEI->inode;
1079 sign = (*iterI < inodeB) ? 1.0 : -1.0;
1081 ilen = edgePtr->
ilen;
1098 Vcoef += (sign* dJndV + sign* dJpdV)*ilen;
1099 Ncoef += (sign* dJndn)*ilen;
1100 Pcoef += (sign* dJpdp)*ilen;
1104 col1 = iterDI->Vcol[iVcol];
1109 int size = iterDI->dIdXcols.size();
1110 for (cnt2=0;cnt2<size;++cnt2)
1112 if (iterDI->dIdXcols[cnt2] == col1)
1113 { bmatch =
true;
break; }
1117 msg =
"pdTerminalCurrents: Could not find a column match in dIdXcols";
1118 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1123 Xyce::dout() << iterDI->eName;
1126 col1 = iterDI->Ncol[iNcol];
1131 int size = iterDI->dIdXcols.size();
1132 for (cnt2=0;cnt2<size;++cnt2)
1134 if (iterDI->dIdXcols[cnt2] == col1)
1135 { bmatch =
true;
break; }
1139 msg =
"pdTerminalCurrents: Could not find a column match in dIdXcols";
1140 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1146 col1 = iterDI->Pcol[iPcol];
1151 int size = iterDI->dIdXcols.size();
1152 for (cnt2=0;cnt2<size;++cnt2)
1154 if (iterDI->dIdXcols[cnt2] == col1)
1155 { bmatch =
true;
break; }
1159 msg =
"pdTerminalCurrents: Could not find a column match in dIdXcols";
1160 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1171 for (iterEI=firstEI; iterEI!=lastEI; ++iterEI,++iVcol,++iNcol,++iPcol)
1173 iedge = iterEI->iedge;
1174 inodeB = iterEI->inode;
1175 sign = (*iterI < inodeB) ? 1.0 : -1.0;
1177 ilen = edgePtr->
ilen;
1194 Vcoef = (sign* dJndV + sign* dJpdV)*ilen;
1195 Ncoef = (sign* dJndn)*ilen;
1196 Pcoef = (sign* dJpdp)*ilen;
1198 col1 = iterDI->Vcol[iVcol];
1203 int size = iterDI->dIdXcols.size();
1204 for (cnt2=0;cnt2<size;++cnt2)
1206 if (iterDI->dIdXcols[cnt2] == col1)
1207 { bmatch =
true;
break; }
1211 msg =
"pdTerminalCurrents: Could not find a column match in dIdXcols";
1212 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1218 col1 = iterDI->Ncol[iNcol];
1223 for (cnt2=0;cnt2<iterDI->dIdXcols.size();++cnt2)
1225 if (iterDI->dIdXcols[cnt2] == col1)
1226 { bmatch =
true;
break; }
1230 msg =
"pdTerminalCurrents: Could not find a column match in dIdXcols";
1231 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1237 col1 = iterDI->Pcol[iPcol];
1242 int size = iterDI->dIdXcols.size();
1243 for (cnt2=0;cnt2<size;++cnt2)
1245 if (iterDI->dIdXcols[cnt2] == col1)
1246 { bmatch =
true;
break; }
1250 msg =
"pdTerminalCurrents: Could not find a column match in dIdXcols";
1251 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1260 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1262 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
1264 int size = iterDI->dIdXcols.size();
1265 int size2= iterDI->dIdX.size ();
1266 Xyce::dout() <<
"dIdX for electrode: " << iterDI->eName << std::endl;
1267 for (
int ididx=0;ididx<size;++ididx)
1269 Xyce::dout() <<
"\t"<< iterDI->dIdXcols[ididx];
1270 Xyce::dout() <<
"\t"<< iterDI->dIdX[ididx] << std::endl;
1273 Xyce::dout() <<
"Done with Instance::pdTerminalCurrents" << std::endl;
1296 bool bsuccess =
true;
1298 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1300 Xyce::dout() << section_divider <<
"\n";
1301 Xyce::dout() <<
"calcTerminalCharges. name = " <<
getName() << std::endl;
1305 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin ();
1306 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
1307 std::vector<DeviceInterfaceNode>::iterator iterDI;
1309 for (iterDI=firstDI; iterDI!=lastDI; ++iterDI)
1317 std::vector<int>::iterator firstI = labelPtr->
mNodeVector.begin();
1318 std::vector<int>::iterator lastI = labelPtr->
mNodeVector.end ();
1319 std::vector<int>::iterator iterI;
1321 iterDI->chargeSum = 0.0;
1324 for(nodeIndex=0,iterI=firstI;iterI!=lastI;++iterI,++nodeIndex)
1330 std::vector<EDGEINFO>::iterator firstEI = nodePtr->
edgeInfoVector.begin();
1331 std::vector<EDGEINFO>::iterator lastEI = nodePtr->
edgeInfoVector.end ();
1332 std::vector<EDGEINFO>::iterator iterEI;
1336 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1338 Xyce::dout() <<
" --------------- " << std::endl;
1339 Xyce::dout() <<
"name = " << iterDI->eName;
1340 Xyce::dout() <<
" node = " << *iterI << std::endl;
1343 for (iterEI=firstEI;iterEI!=lastEI;++iterEI)
1345 int iedge = iterEI->iedge;
1346 int neighbor = iterEI->inode;
1349 double ilen = edgePtr->
ilen;
1351 double sign = (*iterI < neighbor) ? +1.0 : -1.0;
1358 Xyce::dout() <<
"neighbor = "<< neighbor;
1359 Xyce::dout() <<
" Efield = " <<
EfieldVec[iedge];
1360 Xyce::dout() <<
" contrib = " << contrib << std::endl;
1365 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1367 Xyce::dout() <<
" sum*scalingVars.a0 = "<< sum*tmp << std::endl;
1368 Xyce::dout() <<
" sum = " << sum << std::endl;
1369 Xyce::dout() <<
" --------------- " << std::endl;
1374 iterDI->chargeSum += sum;
1378 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1380 Xyce::dout().setf(std::ios::scientific);
1381 Xyce::dout() <<
" " << iterDI->eName;
1382 Xyce::dout() <<
" terminal charge = " << iterDI->chargeSum << std::endl;
1387 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1389 Xyce::dout() << section_divider << std::endl;
1424 bool bsuccess =
true;
1426 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin ();
1427 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
1428 std::vector<DeviceInterfaceNode>::iterator iterDI;
1446 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
1448 iterDI->dQdVckt = 0.0;
1453 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1455 Xyce::dout() << Xyce::subsection_divider << std::endl;
1458 if (iterDI->gid ==-1)
continue;
1463 std::vector<int>::iterator firstI = labelPtr->
mNodeVector.begin();
1464 std::vector<int>::iterator lastI = labelPtr->
mNodeVector.end ();
1465 std::vector<int>::iterator iterI;
1467 std::vector<EDGEINFO>::iterator firstEI;
1468 std::vector<EDGEINFO>::iterator lastEI;
1469 std::vector<EDGEINFO>::iterator iterEI;
1478 for(nodeIndex=0,iterI=firstI;iterI!=lastI;++iterI,++nodeIndex)
1486 for (iterEI=firstEI; iterEI!=lastEI; ++iterEI)
1488 iedge = iterEI->iedge;
1489 inodeB = iterEI->inode;
1492 double elen = edgePtr->
elen;
1493 double ilen = edgePtr->
ilen;
1505 coef += sign* dEdV * ilen;
1510 iterDI->dQdVckt += tmpsum;
1514 Xyce::dout().setf(std::ios::left);
1515 Xyce::dout() << iterDI->eName<<
":";
1516 Xyce::dout() <<
" KCL pdTerminalCharges row = " << iterDI->gid;
1517 Xyce::dout() <<
" contrib = " << tmpsum;
1518 Xyce::dout() <<
" dQdVckt = " << iterDI->dQdVckt << std::endl;
1523 #endif // Xyce_NEW_BC
1528 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1530 Xyce::dout() << Xyce::subsection_divider << std::endl;
1532 #endif // Xyce_NEW_BC
1536 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
1540 int numdQdX = iterDI->dQdX.size ();
1541 for (
int j=0;j<numdQdX;++j)
1543 iterDI->dQdX[j] = 0.0;
1549 std::vector<int>::iterator firstI = labelPtr->
mNodeVector.begin();
1550 std::vector<int>::iterator lastI = labelPtr->
mNodeVector.end ();
1551 std::vector<int>::iterator iterI;
1553 std::vector<EDGEINFO>::iterator firstEI;
1554 std::vector<EDGEINFO>::iterator lastEI;
1555 std::vector<EDGEINFO>::iterator iterEI;
1563 for(nodeIndex=0,iterI=firstI;iterI!=lastI;++iterI,++nodeIndex)
1571 for (iterEI=firstEI; iterEI!=lastEI; ++iterEI)
1573 iedge = iterEI->iedge;
1574 inodeB = iterEI->inode;
1579 double elen = edgePtr->
elen;
1580 double ilen = edgePtr->
ilen;
1583 Vcoef += sign* dEdV * ilen;
1587 col1 = iterDI->Vcol[iVcol];
1592 for (cnt2=0;cnt2<iterDI->dIdXcols.size();++cnt2)
1594 if (iterDI->dIdXcols[cnt2] == col1)
1595 { bmatch =
true;
break; }
1599 msg =
"pdTerminalCharges: Could not find a column match in dIdXcols";
1600 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1609 for (iterEI=firstEI; iterEI!=lastEI; ++iterEI,++iVcol,++iNcol,++iPcol)
1611 iedge = iterEI->iedge;
1612 inodeB = iterEI->inode;
1617 double elen = edgePtr->
elen;
1618 double ilen = edgePtr->
ilen;
1621 Vcoef = sign* dEdV * ilen;
1623 col1 = iterDI->Vcol[iVcol];
1628 for (cnt2=0;cnt2<iterDI->dIdXcols.size();++cnt2)
1630 if (iterDI->dIdXcols[cnt2] == col1)
1631 { bmatch =
true;
break; }
1635 msg =
"pdTerminalCharges: Could not find a column match in dIdXcols";
1636 N_ERH_ErrorMgr::report ( N_ERH_ErrorMgr::DEV_FATAL,msg);
1645 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1647 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
1649 int size = iterDI->dIdXcols.size();
1650 int size2= iterDI->dQdX.size ();
1651 Xyce::dout() <<
"dQdX for electrode: " << iterDI->eName << std::endl;
1652 for (
int ididx=0;ididx<size;++ididx)
1654 Xyce::dout() <<
"\t"<< iterDI->dIdXcols[ididx];
1655 Xyce::dout() <<
"\t"<< iterDI->dQdX[ididx] << std::endl;
1658 Xyce::dout() <<
"Done with Instance::pdTerminalCharges" << std::endl;
1689 bool bsuccess =
true;
1692 Linear::Vector & dfdv = *dfdvPtr;
1699 for (iNeighbor=0;iNeighbor<numNeighbor;++iNeighbor)
1709 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
1721 coef = dINode.
dFdVckt[dFdVindex];
1726 bs1 = dfdv.setElementByGlobalIndex(Vrow, -coef, 0);
1727 bsuccess = bsuccess && bs1;
1738 coef = dINode.
dFdVckt[dFdVindex];
1743 bs1 = dfdv.setElementByGlobalIndex(Nrow, -coef, 0);
1744 bsuccess = bsuccess && bs1;
1755 coef = dINode.
dFdVckt[dFdVindex];
1760 bs1 = dfdv.setElementByGlobalIndex(Prow, -coef, 0);
1761 bsuccess = bsuccess && bs1;
1816 bool bsuccess =
true;
1817 const Linear::Vector & dxdv = *dxdvPtr;
1821 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1823 Xyce::dout() << section_divider <<
"\n";
1824 Xyce::dout() <<
"calcConductances name = " <<
getName() << std::endl;
1825 Xyce::dout() <<
"electrode = " <<
dIVec[iElectrode].eName;
1826 Xyce::dout() <<
" dIdVckt = " <<
dIVec[iElectrode].dIdVckt;
1827 Xyce::dout() << std::endl;
1828 Xyce::dout() << std::endl;
1831 if (!(
dIVec[iElectrode].dxdvAllocated))
1834 dIVec[iElectrode].dxdvAllocated =
true;
1840 *(
dIVec[iElectrode].dxdvPtr) = *(dxdvPtr);
1847 double dIidVj = 0.0;
1848 double dIidVj_chain = 0.0;
1851 double dQidVj = 0.0;
1852 double dQidVj_chain = 0.0;
1868 if (iElectrode != iEqu)
1875 dIidVj =
dIVec[iEqu].dIdVckt;
1876 dQidVj =
dIVec[iEqu].dQdVckt;
1882 int DIDXSize =
dIVec[iEqu].dIdX.size();
1883 for (
int iDIDX=0;iDIDX<DIDXSize;++iDIDX)
1885 int index =
dIVec[iEqu].dIdXcols[iDIDX];
1886 double coefI =
dIVec[iEqu].dIdX[iDIDX];
1887 double coefQ =
dIVec[iEqu].dQdX[iDIDX];
1909 std::ostringstream oss;
1910 oss <<
"dIdX" << std::setw(2) << std::setfill(
'0') << iEqu <<
".txt";
1914 std::ostringstream oss;
1915 oss <<
"dQdX" << std::setw(2) << std::setfill(
'0') << iEqu <<
".txt";
1924 Gij = dIidVj_chain + dIidVj;
1925 condVec[iEqu][iElectrode] = Gij;
1932 Cij = dQidVj_chain + dQidVj;
1933 capVec[iEqu][iElectrode] = Cij;
1935 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1937 char outstring[128];
1938 double Itmp =
dIVec[iEqu].currentSum;
1939 double Vtmp =
dIVec[iEqu].Vckt -
dIVec[iElectrode].Vckt;
1941 double GV = Gij*Vtmp;
1942 for(
int i=0;i<128;++i) outstring[i] = static_cast<char>(0);
1944 "(%2d,%2d): dotPr=%12.4e G=%12.4e",
1945 iEqu,iElectrode,dIidVj_chain,Gij);
1946 Xyce::dout() << std::string(outstring) << std::endl;
1949 "(%2d,%2d): G=%12.4e G*V=%12.4e I=%12.4e V=%12.4e",
1950 iEqu,iElectrode,Gij,GV,Itmp,Vtmp);
1951 Xyce::dout() << std::string(outstring) << std::endl;
1955 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
1957 Xyce::dout() << section_divider << std::endl;
1973 bool bsuccess =
true;
1977 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
1978 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
1979 std::vector<DeviceInterfaceNode>::iterator iterDI = firstDI;
1981 for (; iterDI!=lastDI;++iterDI)
1985 if (iterDI->stateC_owned)
1988 (staVectorPtr)->setElementByGlobalIndex( iterDI->stateC,
1989 iterDI->currentSum, 0);
1994 (*staVectorPtr)[iterDI->li_stateC] = iterDI->currentSum;
2001 #ifdef Xyce_OLD_DISPLACEMENT
2012 (staVectorPtr)->setElementByGlobalIndex(
stateDispl[i], D, 0);
2057 bool bsuccess =
true;
2065 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
2066 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
2067 std::vector<DeviceInterfaceNode>::iterator iterDI = firstDI;
2069 for (; iterDI!=lastDI;++iterDI)
2074 iterDI->currentSum =
2075 (staVectorPtr)->getElementByGlobalIndex( iterDI->stateC, 0);
2079 iterDI->currentSum = (*staVectorPtr)[iterDI->li_stateC];
2087 #ifdef Xyce_OLD_DISPLACEMENT
2127 int inodeA = edgePtr->
inodeA;
2128 int inodeB = edgePtr->
inodeB;
2129 double elen = edgePtr->
elen;
2139 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2140 Xyce::dout() <<
" Maximum displacement current: " << dcmax << std::endl;
2167 bool bsuccess =
true;
2170 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2172 Xyce::dout() <<
"Instance::setInitialGuess\n";
2224 bool bsuccess =
true;
2228 int Vrow, Nrow, Prow;
2233 double ilen, elen, nodeArea;
2239 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2241 Xyce::dout() << section_divider <<
"\n";
2242 Xyce::dout() <<
"Instance::loadVecNLPoisson\n";
2243 Xyce::dout() <<
" name = " <<
getName() <<
"\n";
2245 Xyce::dout() <<
" Vt = " <<
Vt <<
"\n";
2246 Xyce::dout() <<
" Ut = " <<
Ut <<
"\n";
2247 Xyce::dout() <<
" scalingVars.V0 = " <<
scalingVars.
V0 <<
"\n";
2254 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2256 Xyce::dout() <<
"--------" << std::endl;
2257 Xyce::dout() <<
"Mesh Point i = " << i;
2283 #else // "old" boundary condition:
2284 bool doneFlag =
false;
2294 int i1 =
dIVec[DIindex].meshGlobalToLocal[i];
2295 coef = vtmp -
dIVec[DIindex].VbcVec[i1];
2297 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2299 Xyce::dout() <<
"BC load: Vrow = " << Vrow <<
" coef = " << coef << std::endl;
2300 Xyce::dout() <<
" vtmp = " << vtmp << std::endl;
2301 Xyce::dout() <<
" Vckt = " <<
dIVec[DIindex].Vckt << std::endl;
2305 bs1 = vecPtr->sumElementByGlobalIndex(Vrow, -scalar*coef, 0);
2306 bsuccess = bsuccess && bs1;
2307 bs1 = vecPtr->sumElementByGlobalIndex(Nrow, 0.0 , 0);
2308 bsuccess = bsuccess && bs1;
2309 bs1 = vecPtr->sumElementByGlobalIndex(Prow, 0.0 , 0);
2310 bsuccess = bsuccess && bs1;
2314 (*vecPtr)[Vrow] += -scalar*coef;
2315 (*vecPtr)[Nrow] += 0.0;
2316 (*vecPtr)[Prow] += 0.0;
2324 if (doneFlag)
continue;
2325 #endif // Xyce_NEW_BC
2329 nodeArea = nodePtr->
area;
2330 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2332 Xyce::dout() <<
"--------" << std::endl;
2333 Xyce::dout() <<
"Interior: mesh point: " << i <<
" Vrow = " << Vrow;
2334 Xyce::dout() << std::endl;
2338 for (
int iNN=0;iNN<nodePtr->
cnode;++iNN)
2345 double efield_loc = (
VVec[i]-
VVec[inodeB])/elen;
2346 coef += -efield_loc * ilen ;
2349 Xyce::dout() <<
"----" << std::endl;
2350 Xyce::dout() <<
" iedge = " << iedge << std::endl;
2351 Xyce::dout() <<
" Vlocal = " <<
VVec[i] << std::endl;
2352 Xyce::dout() <<
" Vneigh = " <<
VVec[inodeB] << std::endl;
2353 Xyce::dout() <<
" efield = " << efield_loc << std::endl;
2354 Xyce::dout() <<
" elen = " << elen << std::endl;
2355 Xyce::dout() <<
" ilen = " << ilen << std::endl;
2356 Xyce::dout() <<
" inodeB = " << inodeB;
2359 Xyce::dout() << std::endl;
2366 coef2 = -(holeDens-elecDens+
CVec[i]);
2368 #ifdef Xyce_OXIDE_ENABLED
2379 Xyce::dout() <<
"--------" << std::endl;
2380 Xyce::dout() <<
" holeD = " << holeDens << std::endl;
2381 Xyce::dout() <<
" elecD = " << elecDens << std::endl;
2382 Xyce::dout() <<
" dopeD = " <<
CVec[i] << std::endl;
2383 Xyce::dout() <<
" coef2 = " << coef2 << std::endl;
2385 Xyce::dout() <<
" nodeArea = " << nodeArea << std::endl;
2386 Xyce::dout() <<
" coef = " << coef << std::endl;
2387 Xyce::dout() <<
"--------" << std::endl;
2392 bs1 = vecPtr->sumElementByGlobalIndex(Vrow, -scalar*coef, 0);
2393 bsuccess = bsuccess && bs1;
2394 bs1 = vecPtr->sumElementByGlobalIndex(Nrow, 0.0 , 0);
2395 bsuccess = bsuccess && bs1;
2396 bs1 = vecPtr->sumElementByGlobalIndex(Prow, 0.0 , 0);
2397 bsuccess = bsuccess && bs1;
2401 (*vecPtr)[Vrow] += -scalar*coef;
2402 (*vecPtr)[Nrow] += 0.0;
2403 (*vecPtr)[Prow] += 0.0;
2408 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2409 Xyce::dout() << section_divider << std::endl;
2423 (
double scalar,
double dndtScalar, Linear::Vector * vecPtr)
2425 bool bsuccess =
true;
2427 std::string semi(bulkMaterial);
2430 int Vrow, Nrow, Prow;
2432 double ilen, elen, nodeArea;
2433 double holeDens, elecDens;
2440 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2442 Xyce::dout() <<
"\n"<<section_divider << std::endl;
2443 Xyce::dout() <<
"Instance::loadVecDDForm\n";
2444 Xyce::dout() <<
" name = " <<
getName() <<
"\n";
2448 std::vector<DeviceInterfaceNode>::iterator firstDI = dIVec.begin();
2449 std::vector<DeviceInterfaceNode>::iterator lastDI = dIVec.end ();
2450 std::vector<DeviceInterfaceNode>::iterator iterDI = firstDI;
2456 for (;iterDI!=lastDI;++iterDI)
2458 coef = iterDI->currentSum;
2460 if( useVectorGIDFlag )
2462 if (iterDI->gid != -1)
2464 bs1 = vecPtr->sumElementByGlobalIndex(iterDI->gid, -scalar*coef, 0);
2465 bsuccess = bsuccess && bs1;
2470 (*vecPtr)[iterDI->lid] += -scalar*coef;
2473 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2475 Xyce::dout() <<
"KCL for "<< iterDI->eName <<
":\n";
2476 Xyce::dout() <<
" row = " << iterDI->gid <<
"\n";
2477 Xyce::dout() <<
"coef = " << coef <<
"\n";
2484 for (i=0;i<numMeshPoints;++i)
2486 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2488 Xyce::dout() <<
"--------" << std::endl;
2489 Xyce::dout() <<
"Mesh Point i = " << i;
2490 Xyce::dout() <<
" x = " << xVec[i]*scalingVars.x0;
2491 Xyce::dout() <<
" y = " << yVec[i]*scalingVars.x0 << std::endl;
2494 if( useVectorGIDFlag )
2496 Vrow = Vrowarray[i];
2497 Nrow = Nrowarray[i];
2498 Prow = Prowarray[i];
2502 Vrow = li_Vrowarray[i];
2503 Nrow = li_Nrowarray[i];
2504 Prow = li_Prowarray[i];
2507 bool doneFlagV =
false;
2508 bool doneFlagN =
false;
2509 bool doneFlagP =
false;
2515 if (boundarySten[i])
continue;
2517 bool doneFlag =
false;
2524 if (boundarySten[i])
2526 int DIindex = labelDIMap[labelNameVector[i]];
2528 if (dIVec[DIindex].given)
2530 int ilocal = dIVec[DIindex].meshGlobalToLocal[i];
2532 if (dIVec[DIindex].neumannBCFlagV==
false)
2535 if (vOwnVec[i] == 1) vtmp = VVec[i];
2537 coef = vtmp - dIVec[DIindex].VbcVec[ilocal];
2539 if( useVectorGIDFlag )
2541 bs1 = vecPtr->sumElementByGlobalIndex(Vrow, -scalar*coef, 0);
2542 bsuccess = bsuccess && bs1;
2546 (*vecPtr)[Vrow] += -scalar*coef;
2549 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2551 Xyce::dout() <<
"BC load: Vrow = " << Vrow;
2552 Xyce::dout() <<
" coef = " << coef << std::endl;
2553 Xyce::dout() <<
" vtmp = " << vtmp << std::endl;
2554 Xyce::dout() <<
" Vckt = " << dIVec[DIindex].Vckt << std::endl;
2555 Xyce::dout() <<
" Vequ = " << dIVec[DIindex].VequVec[ilocal] << std::endl;
2560 if (dIVec[DIindex].neumannBCFlagN==
false)
2563 if (nnOwnVec[i] == 1) ntmp = nnVec[i];
2564 coef = ntmp - (dIVec[DIindex].nnbcVec[ilocal]);
2566 if( useVectorGIDFlag )
2568 bs1 = vecPtr->sumElementByGlobalIndex(Nrow, -scalar*coef , 0);
2569 bsuccess = bsuccess && bs1;
2573 (*vecPtr)[Nrow] += -scalar*coef;
2576 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2578 Xyce::dout() <<
"BC load: Nrow = ";
2579 Xyce::dout() << Nrow <<
" coef = " << coef << std::endl;
2580 Xyce::dout() <<
" ntmp = " << ntmp << std::endl;
2581 Xyce::dout() <<
" nnbc = " << dIVec[DIindex].nnbcVec[ilocal] << std::endl;
2587 if (dIVec[DIindex].neumannBCFlagP==
false)
2590 if (npOwnVec[i] == 1) ptmp = npVec[i];
2591 coef = ptmp - (dIVec[DIindex].npbcVec[ilocal]);
2593 if( useVectorGIDFlag )
2595 bs1 = vecPtr->sumElementByGlobalIndex(Prow, -scalar*coef , 0);
2596 bsuccess = bsuccess && bs1;
2600 (*vecPtr)[Prow] += -scalar*coef;
2603 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2605 Xyce::dout() <<
"BC load: Prow = ";
2606 Xyce::dout() << Prow <<
" coef = " << coef << std::endl;
2607 Xyce::dout() <<
" ptmp = " << ptmp << std::endl;
2608 Xyce::dout() <<
" npbc = " << dIVec[DIindex].npbcVec[ilocal] << std::endl;
2613 doneFlag = (doneFlagV && doneFlagN && doneFlagP);
2618 if (doneFlag)
continue;
2620 #endif // Xyce_NEW_BC
2624 mNode * nodePtr = meshContainerPtr->getNode(i);
2625 nodeArea = nodePtr->
area;
2626 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2628 Xyce::dout() <<
"--------" << std::endl;
2629 Xyce::dout() <<
"Interior: mesh point: " << i <<
" Vrow = " << Vrow;
2630 Xyce::dout() << std::endl;
2636 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2638 Xyce::dout() <<
"--------" << std::endl;
2639 Xyce::dout() <<
" Poisson equ:";
2643 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
2651 double efield_loc = (VVec[i]-VVec[inodeB])/elen;
2652 coef += -efield_loc * ilen ;
2653 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2655 Xyce::dout() <<
"----" << std::endl;
2656 Xyce::dout() <<
" iedge = " << iedge << std::endl;
2657 Xyce::dout() <<
" Vlocal = " << VVec[i] << std::endl;
2658 Xyce::dout() <<
" Vneigh = " << VVec[inodeB] << std::endl;
2659 Xyce::dout() <<
" efield = " << efield_loc << std::endl;
2660 Xyce::dout() <<
" elen = " << elen << std::endl;
2661 Xyce::dout() <<
" ilen = " << ilen << std::endl;
2662 Xyce::dout() <<
" inodeB = " << inodeB;
2663 Xyce::dout() <<
" x[b] = " << xVec[inodeB]*scalingVars.x0;
2664 Xyce::dout() <<
" y[b] = " << yVec[inodeB]*scalingVars.x0 << std::endl;
2665 Xyce::dout() << std::endl;
2670 holeDens = npVec[i];
2671 elecDens = nnVec[i];
2672 coef2 = -(holeDens-elecDens+CVec[i]);
2674 #ifdef Xyce_OXIDE_ENABLED
2683 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2685 Xyce::dout() <<
"--------" << std::endl;
2686 Xyce::dout() <<
" holeD = " << holeDens << std::endl;
2687 Xyce::dout() <<
" elecD = " << elecDens << std::endl;
2688 Xyce::dout() <<
" dopeD = " << CVec[i] << std::endl;
2689 Xyce::dout() <<
" coef2 = " << coef2 << std::endl;
2691 Xyce::dout() <<
" nodeArea = " << nodeArea << std::endl;
2692 Xyce::dout() <<
" coef = " << coef << std::endl;
2693 Xyce::dout() <<
"--------" << std::endl;
2695 if ( getSolverState().chargeHomotopy )
2697 coef *= getSolverState().chargeAlpha;
2700 if( useVectorGIDFlag )
2702 bs1 = vecPtr->sumElementByGlobalIndex(Vrow, -scalar*coef, 0);
2703 bsuccess = bsuccess && bs1;
2707 (*vecPtr)[Vrow] += -scalar*coef;
2719 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2721 Xyce::dout() <<
"--------" << std::endl;
2722 Xyce::dout() <<
" Electron equ:";
2727 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
2734 coef += ((i<inodeB)?1.0:-1.0) * JnVec[iedge] * ilen ;
2736 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2738 Xyce::dout() <<
"----" << std::endl;
2739 Xyce::dout() <<
" iedge = " << iedge << std::endl;
2740 Xyce::dout() <<
" Jn = " << JnVec[iedge] << std::endl;
2741 Xyce::dout() <<
" nlocal = " << nnVec[i] << std::endl;
2742 Xyce::dout() <<
" nneigh = " << nnVec[inodeB] << std::endl;
2743 Xyce::dout() <<
" elen = " << elen << std::endl;
2744 Xyce::dout() <<
" ilen = " << ilen << std::endl;
2745 Xyce::dout() <<
" inodeB = " << inodeB;
2746 Xyce::dout() <<
" x[b] = " << xVec[inodeB]*scalingVars.x0;
2747 Xyce::dout() <<
" y[b] = " << yVec[inodeB]*scalingVars.x0 << std::endl;
2748 Xyce::dout() << std::endl;
2753 coef += - totSrcVec[i] - dndt;
2755 coef += - RVec[i] - dndt;
2758 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2760 Xyce::dout() <<
"--------" << std::endl;
2761 Xyce::dout().setf(std::ios::left);
2762 Xyce::dout() <<
" row = " << Nrow;
2763 Xyce::dout().setf(std::ios::scientific);
2764 Xyce::dout() <<
" coef=" << coef;
2765 Xyce::dout() <<
" nodeArea ="<<nodeArea;
2766 Xyce::dout() <<
" R[i]="<<RVec[i];
2767 Xyce::dout() <<
" dndt="<<dndt;
2768 Xyce::dout() <<
"\n";
2769 Xyce::dout() <<
"--------" << std::endl;
2772 if( useVectorGIDFlag )
2774 bs1 = vecPtr->setElementByGlobalIndex(Nrow,-scalar*coef,0);
2775 bsuccess = bsuccess && bs1;
2779 (*vecPtr)[Nrow] += -scalar*coef;
2790 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2792 Xyce::dout() <<
"--------" << std::endl;
2793 Xyce::dout() <<
" Hole equ:";
2798 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
2805 coef += ((i<inodeB)?1.0:-1.0) * JpVec[iedge] * ilen ;
2807 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2809 Xyce::dout() <<
"----" << std::endl;
2810 Xyce::dout() <<
" iedge = " << iedge << std::endl;
2811 Xyce::dout() <<
" Jp = " << JpVec[iedge] << std::endl;
2812 Xyce::dout() <<
" plocal = " << npVec[i] << std::endl;
2813 Xyce::dout() <<
" pneigh = " << npVec[inodeB] << std::endl;
2814 Xyce::dout() <<
" elen = " << elen << std::endl;
2815 Xyce::dout() <<
" ilen = " << ilen << std::endl;
2816 Xyce::dout() <<
" inodeB = " << inodeB;
2817 Xyce::dout() <<
" x[b] = " << xVec[inodeB]*scalingVars.x0;
2818 Xyce::dout() <<
" y[b] = " << yVec[inodeB]*scalingVars.x0 << std::endl;
2819 Xyce::dout() << std::endl;
2825 coef += - totSrcVec[i] - dpdt;
2827 coef += - RVec[i] - dpdt;
2830 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2832 Xyce::dout() <<
"--------" << std::endl;
2833 Xyce::dout().setf(std::ios::left);
2834 Xyce::dout() <<
" row = " << Prow;
2835 Xyce::dout().setf(std::ios::scientific);
2836 Xyce::dout() <<
" coef=" << coef;
2837 Xyce::dout() <<
" nodeArea ="<<nodeArea;
2838 Xyce::dout() <<
" RVec[i]="<<RVec[i];
2839 Xyce::dout() <<
" dpdt="<<dpdt;
2840 Xyce::dout() <<
"\n";
2841 Xyce::dout() <<
"--------" << std::endl;
2844 if( useVectorGIDFlag )
2846 bs1 = vecPtr->setElementByGlobalIndex(Prow,-scalar*coef,0);
2847 bsuccess = bsuccess && bs1;
2851 (*vecPtr)[Prow] += -scalar*coef;
2860 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
2861 Xyce::dout() << section_divider << std::endl;
2877 bool bsuccess =
true;
2880 int Vrow, Nrow, Prow;
2882 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2884 Xyce::dout() << section_divider <<
"\n";
2885 Xyce::dout() <<
"Instance::loadJacNonlinPoisson" <<
"\n";
2886 Xyce::dout() <<
" name = " <<
getName() <<
"\n";
2887 Xyce::dout() <<
"\n";
2894 double pre = 1.0/
Ut;
2902 double ilen, elen, nodeArea;
2905 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2907 Xyce::dout() <<
"pre = " << pre <<
"\n";
2908 Xyce::dout() <<
"Vt = " <<
Vt <<
"\n";
2909 Xyce::dout() <<
"eps = " <<
eps <<
"\n";
2910 Xyce::dout() <<
"q = " << q <<
"\n";
2911 Xyce::dout() <<
"Na = " <<
Na <<
"\n";
2912 Xyce::dout() <<
"Nd = " <<
Nd <<
"\n";
2913 Xyce::dout() <<
"NpMax = " <<
NpMax <<
"\n";
2914 Xyce::dout() <<
"NnMax = " <<
NnMax <<
"\n";
2918 int numCol =
cols.size();
2928 for (j=0;j<numCol;++j)
2934 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin ();
2935 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
2936 std::vector<DeviceInterfaceNode>::iterator iterDI;
2943 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
2945 if (iterDI->gid !=-1)
2947 cols[0] = iterDI->gid;
2948 bs1 = matPtr->putRow (iterDI->gid, 1, &
vals[0], &
cols[0]);
2949 bsuccess = bsuccess && bs1;
2958 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
2960 Xyce::dout() <<
"\nmesh point i = " << i << std::endl;
2962 for (j=0;j<numCol;++j)
2975 bool doneFlag =
false;
2992 if (
dIVec[DIindex].gid != -1)
3002 bs1 = matPtr->putRow (Vrow, count, &
vals[0], &
cols[0]);
3003 bsuccess = bsuccess && bs1;
3005 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3007 Xyce::dout() <<
"BC load: Vrow = " << Vrow << std::endl;
3008 for (
int eric=0;eric<count;++eric)
3010 Xyce::dout() <<
" cols["<<eric<<
"] = " <<
cols[eric];
3011 Xyce::dout() <<
" vals["<<eric<<
"] = " <<
vals[eric];
3012 Xyce::dout() << std::endl;
3022 bs1 = matPtr->putRow (Nrow, 1, &
vals[0], &
cols[0]);
3023 bsuccess = bsuccess && bs1;
3025 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3027 Xyce::dout() <<
"BC load: Nrow = " << Nrow;
3028 Xyce::dout() <<
" coef = " <<
vals[0] << std::endl;
3038 bs1 = matPtr->putRow (Prow, 1, &
vals[0], &
cols[0]);
3039 bsuccess = bsuccess && bs1;
3041 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3043 Xyce::dout() <<
"BC load: Prow = " << Vrow;
3044 Xyce::dout() <<
" coef = " <<
vals[0] << std::endl;
3053 if (doneFlag)
continue;
3054 #endif // Xyce_NEW_BC
3059 #ifdef Xyce_OXIDE_ENABLED
3071 nodeArea = nodePtr->
area;
3076 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3087 #ifdef Xyce_OXIDE_ENABLED
3090 coef += pre*holeDens + pre*elecDens;
3093 coef += pre*holeDens + pre*elecDens;
3104 Xyce::dout() <<
" center point: i="<<i;
3105 Xyce::dout() <<
" xVec[i] = " <<
xVec[i];
3106 Xyce::dout() <<
" yVec[i] = " <<
yVec[i];
3107 Xyce::dout() << std::endl;
3109 Xyce::dout() <<
" boundarySten = " <<
boundarySten[i] << std::endl;
3110 Xyce::dout() <<
" Vcolarray[i][0] = ";
3111 Xyce::dout() <<
Vcolarray[i][0] << std::endl;
3116 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3118 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3120 Xyce::dout() <<
"non-center point: i="<<i;
3121 Xyce::dout() <<
" Vcolarray[i]["<<iNN+1<<
"] = ";
3122 Xyce::dout() <<
Vcolarray[i][iNN+1] << std::endl;
3124 if (
Vcolarray[i][iNN+1] == -1)
continue;
3138 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3140 Xyce::dout() <<
"\n";
3141 Xyce::dout().setf(std::ios::left);
3142 Xyce::dout() <<
" POISSON LOAD: row = " << Vrow;
3143 Xyce::dout() <<
" count = " << count <<
"\n";
3144 Xyce::dout().setf(std::ios::scientific);
3145 for (j=0;j<count;++j)
3147 Xyce::dout() <<
" cols["<<j<<
"] = " <<
cols[j];
3148 Xyce::dout() <<
" vals["<<j<<
"] = " <<
vals[j];
3149 Xyce::dout() << std::endl;
3153 if (Vrow != -1 && count > 0)
3155 bs1 = matPtr->putRow (Vrow, count, &
vals[0], &
cols[0]);
3156 bsuccess = bsuccess && bs1;
3160 Report::DevelFatal() <<
"OOOPS!";
3167 bs1 = matPtr->putRow (Nrow, 1, &
vals[0], &
cols[0]);
3168 bsuccess = bsuccess && bs1;
3175 bs1 = matPtr->putRow (Prow, 1, &
vals[0], &
cols[0]);
3176 bsuccess = bsuccess && bs1;
3179 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3181 Xyce::dout() << subsection_divider <<
"\n";
3200 bool doneFlag =
false;
3213 (*matPtr)[Vrow][Voff[0]] = 1.0;
3217 (*matPtr)[Nrow][Noff[0]] = 1.0;
3220 (*matPtr)[Prow][Poff[0]] = 1.0;
3226 if (doneFlag)
continue;
3227 #endif // Xyce_NEW_BC
3232 #ifdef Xyce_OXIDE_ENABLED
3244 nodeArea = nodePtr->
area;
3249 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3260 #ifdef Xyce_OXIDE_ENABLED
3263 coef += pre*holeDens + pre*elecDens;
3266 coef += pre*holeDens + pre*elecDens;
3269 (*matPtr)[Vrow][Voff[0]] += coef;
3273 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3277 if (
Vcolarray[i][iNN+1] == -1)
continue;
3286 (*matPtr)[Vrow][Voff[iNN+1]] += coef;
3290 (*matPtr)[Nrow][Noff[0]] = 1.0;
3293 (*matPtr)[Prow][Poff[0]] = 1.0;
3298 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3300 Xyce::dout() << section_divider << std::endl;
3316 bool bsuccess =
true;
3321 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3323 Xyce::dout() <<
"Starting Instance::loadJacKCLDDFormulation" << std::endl;
3326 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin ();
3327 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
3328 std::vector<DeviceInterfaceNode>::iterator iterDI;
3332 int numCol =
cols.size();
3336 for (j=0;j<numCol;++j)
3342 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
3344 if (iterDI->gid ==-1)
continue;
3347 cols[count] = iterDI->gid;
3355 vals[0] = iterDI->dIdVckt;
3357 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3359 Xyce::dout() <<
"\n";
3360 Xyce::dout().setf(std::ios::left);
3361 Xyce::dout() <<
" KCL new BC LOAD: row = " << iterDI->gid;
3362 Xyce::dout() <<
" count = " << count;
3363 Xyce::dout() <<
" name = " << iterDI->eName <<
"\n";
3365 Xyce::dout().setf(std::ios::scientific);
3366 Xyce::dout() <<
" cols[0] = " <<
cols[0];
3367 Xyce::dout() <<
" vals[0] = " <<
vals[0];
3368 Xyce::dout() << std::endl;
3370 bs1 = matPtr->sumIntoRow (iterDI->gid, count, &
vals[0], &
cols[0]);
3371 bsuccess = bsuccess && bs1;
3372 #endif // Xyce_NEW_BC
3376 count = iterDI->dIdXcols.size();
3378 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3380 Xyce::dout() <<
"\n";
3381 Xyce::dout().setf(std::ios::left);
3382 Xyce::dout() <<
" KCL LOAD: row = " << iterDI->gid;
3383 Xyce::dout() <<
" count = " << count;
3384 Xyce::dout() <<
" name = " << iterDI->eName <<
"\n";
3386 Xyce::dout().setf(std::ios::scientific);
3387 for (j=0;j<count;++j)
3389 Xyce::dout() <<
" cols["<<j<<
"] = " << iterDI->dIdXcols[j];
3390 Xyce::dout() <<
" vals["<<j<<
"] = " << iterDI->dIdX[j];
3391 Xyce::dout() << std::endl;
3395 bs1 = matPtr->sumIntoRow
3396 (iterDI->gid, count, &(iterDI->dIdX[0]), &(iterDI->dIdXcols[0]));
3397 bsuccess = bsuccess && bs1;
3403 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
3407 int offset = iterDI->lidOffset;
3410 coef = iterDI->dIdVckt;
3411 #endif // Xyce_NEW_BC
3413 (*matPtr)[iterDI->lid][offset] += coef;
3417 int size = iterDI->dIdXcols.size();
3418 for (
int i=0;i<size;++i)
3420 coef = iterDI->dIdX[i];
3421 offset = iterDI->dIdXoffset[i];
3422 (*matPtr)[iterDI->lid][offset] += coef;
3423 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3425 Xyce::dout() <<
"dIdX["<<i<<
"] = " << iterDI->dIdX[i];
3426 Xyce::dout() <<
" dIdXcols["<<i<<
"] = " << iterDI->dIdXcols[i];
3427 Xyce::dout() <<
" dIdXoffset["<<i<<
"] = " << iterDI->dIdXoffset[i];
3428 Xyce::dout() << std::endl;
3434 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
3436 Xyce::dout() <<
"Done with Instance::loadJacKCLDDFormulation" << std::endl;
3456 bool bsuccess =
true;
3460 int numCol =
cols.size();
3463 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin ();
3464 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
3465 std::vector<DeviceInterfaceNode>::iterator iterDI;
3470 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
3472 if (iterDI->gid !=-1)
3474 cols[0] = iterDI->gid;
3475 bs1 = matPtr->putRow (iterDI->gid, 1, &
vals[0], &
cols[0]);
3476 bsuccess = bsuccess && bs1;
3482 for(iterDI=firstDI;iterDI!=lastDI;++iterDI)
3484 (*matPtr)[iterDI->lid][iterDI->lidOffset] = 1.0;
3500 (
double dndtScalar, Linear::Matrix * matPtr)
3502 bool bsuccess =
true;
3505 int Vrow, Nrow, Prow;
3507 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3509 Xyce::dout() <<
"\n"<<section_divider <<
"\n";
3510 Xyce::dout() <<
"Instance::loadMatDDForm" <<
"\n";
3511 Xyce::dout() <<
" name = " <<
getName() <<
"\n";
3512 Xyce::dout() <<
"\n";
3524 double ilen, elen, nodeArea;
3527 int numCol = cols.size();
3528 if (vals.size () < cols.size()) numCol = vals.size();
3535 if (!(getSolverState().dcopFlag))
3537 dDNDTdn = getSolverState().pdt*scalingVars.t0*dndtScalar;
3538 dDPDTdp = getSolverState().pdt*scalingVars.t0*dndtScalar;
3547 for (j=0;j<numCol;++j) { cols[j] = -1; vals[j] = 0.0; }
3550 if( useMatrixGIDFlag )
3552 for (i=0;i<numMeshPoints;++i)
3554 Vrow = Vrowarray[i];
3555 Nrow = Nrowarray[i];
3556 Prow = Prowarray[i];
3558 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3560 Xyce::dout() << subsection_divider <<
"\n";
3561 Xyce::dout() <<
"mesh point i = " << i;
3562 Xyce::dout() <<
" Vrow = " << Vrow;
3563 Xyce::dout() <<
" Nrow = " << Nrow;
3564 Xyce::dout() <<
" Prow = " << Prow;
3565 Xyce::dout() <<
"\n";
3568 bool doneFlagV =
false;
3569 bool doneFlagN =
false;
3570 bool doneFlagP =
false;
3571 bool doneFlag =
false;
3573 if (boundarySten[i])
continue;
3578 if (boundarySten[i])
3580 int DIindex = labelDIMap[labelNameVector[i]];
3582 if (dIVec[DIindex].given)
3584 if (dIVec[DIindex].neumannBCFlagV==
false)
3586 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3588 Xyce::dout() <<
"BC load: Vrow = " << Vrow << std::endl;
3597 if (dIVec[DIindex].gid != -1)
3600 vals[1] = -scalingVars.rV0;
3601 cols[1] = dIVec[DIindex].gid;
3607 bs1 = matPtr->putRow (Vrow, count, &vals[0], &cols[0]);
3608 bsuccess = bsuccess && bs1;
3610 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3612 Xyce::dout() <<
"BC load: Vrow = " << Vrow << std::endl;
3613 for (
int eric=0;eric<count;++eric)
3615 Xyce::dout() <<
" cols["<<eric<<
"] = " << cols[eric];
3616 Xyce::dout() <<
" vals["<<eric<<
"] = " << vals[eric];
3617 Xyce::dout() << std::endl;
3625 if (dIVec[DIindex].neumannBCFlagN==
false)
3632 bs1 = matPtr->putRow (Nrow, 1, &vals[0], &cols[0]);
3633 bsuccess = bsuccess && bs1;
3635 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3637 Xyce::dout() <<
"BC load: Nrow = " << Nrow << std::endl;
3638 for (
int eric=0;eric<count;++eric)
3640 Xyce::dout() <<
" cols["<<eric<<
"] = " << cols[eric];
3641 Xyce::dout() <<
" vals["<<eric<<
"] = " << vals[eric];
3642 Xyce::dout() << std::endl;
3649 if (dIVec[DIindex].neumannBCFlagP==
false)
3656 bs1 = matPtr->putRow (Prow, 1, &vals[0], &cols[0]);
3657 bsuccess = bsuccess && bs1;
3659 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3661 Xyce::dout() <<
"BC load: Prow = " << Prow << std::endl;
3662 for (
int eric=0;eric<count;++eric)
3664 Xyce::dout() <<
" cols["<<eric<<
"] = " << cols[eric];
3665 Xyce::dout() <<
" vals["<<eric<<
"] = " << vals[eric];
3666 Xyce::dout() << std::endl;
3673 doneFlag = (doneFlagV && doneFlagN && doneFlagP);
3677 if (doneFlag)
continue;
3679 #endif // Xyce_NEW_BC
3682 std::string semi(bulkMaterial);
3684 mNode * nodePtr = meshContainerPtr->getNode(i);
3685 nodeArea = nodePtr->
area;
3690 for (j=0;j<numCol;++j) { cols[j] = -1; vals[j] = 0.0; }
3696 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3706 if (Vcolarray[i][0] != -1)
3708 cols[count] = Vcolarray[i][0];
3712 else if (DEBUG_DEVICE)
3714 Xyce::dout() <<
" center point: i="<<i;
3715 Xyce::dout() <<
" Vcolarray[i][0] = " << Vcolarray[i][0] << std::endl;
3721 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3723 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3725 Xyce::dout() <<
"non-center point: i="<<i;
3726 Xyce::dout() <<
" Vcolarray[i]["<<iNN+1<<
"] = ";
3727 Xyce::dout() << Vcolarray[i][iNN+1] << std::endl;
3729 int tmpCol = Vcolarray[i][iNN+1];
3731 if (tmpCol == -1)
continue;
3740 coef *= ((boundarySten[inodeB]==1)?(scalingVars.rV0):1.0);
3743 if (boundarySten[inodeB]==1)
3746 for (cnt2=0;cnt2<count;++cnt2)
3748 if (cols[cnt2] == tmpCol)
3749 { bmatch =
true;
break; }
3751 if (!bmatch) { cnt2 = count; ++count;}
3761 #endif // Xyce_NEW_BC
3762 cols[cnt2] = tmpCol;
3767 if (Ncolarray[i][0] != -1)
3769 cols[count] = Ncolarray[i][0];
3775 if (Pcolarray[i][0] != -1)
3777 cols[count] = Pcolarray[i][0];
3782 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3784 Xyce::dout() <<
"\n";
3785 Xyce::dout().setf(std::ios::left);
3786 Xyce::dout() <<
" POISSON LOAD: row = " << Vrow;
3787 Xyce::dout() <<
" count = " << count <<
"\n";
3788 Xyce::dout().setf(std::ios::scientific);
3789 for (j=0;j<count;++j)
3791 Xyce::dout() <<
" cols["<<j<<
"] = " << cols[j];
3792 Xyce::dout() <<
" vals["<<j<<
"] = " << vals[j];
3793 Xyce::dout() << std::endl;
3797 if (Vrow != -1 && count > 0)
3799 bs1 = matPtr->sumIntoRow (Vrow, count, &vals[0], &cols[0]);
3800 bsuccess = bsuccess && bs1;
3804 Report::DevelFatal() <<
"OOOPS 1!";
3813 for (j=0;j<numCol;++j) { cols[j] = -1; vals[j] = 0.0; }
3819 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3829 dJdn = dJndn1Vec[iedge];
3833 dJdn = dJndn2Vec[iedge];
3836 coef += ((i<inodeB)?1.0:-1.0) * dJdn * ilen;
3840 coef += - dRdnVec[i] - dDNDTdn;
3843 cols[count] = Ncolarray[i][0];
3848 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3850 if (Ncolarray[i][iNN+1] == -1)
continue;
3860 dJdn = dJndn1Vec[iedge];
3864 dJdn = dJndn2Vec[iedge];
3867 coef = ((i<inodeB)?1.0:-1.0) * dJdn * ilen/nodeArea;
3870 cols[count] = Ncolarray[i][iNN+1];
3877 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3887 dJdV = dJndV1Vec[iedge];
3891 dJdV = dJndV2Vec[iedge];
3894 coef += ((i<inodeB)?1.0:-1.0) * dJdV * ilen;
3898 if (Vcolarray[i][0] != -1)
3901 cols[count] = Vcolarray[i][0];
3907 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
3909 int tmpCol = Vcolarray[i][iNN+1];
3910 if (tmpCol == -1)
continue;
3921 dJdV = dJndV1Vec[iedge];
3925 dJdV = dJndV2Vec[iedge];
3928 coef = ((i<inodeB)?1.0:-1.0) * dJdV * ilen/nodeArea;
3930 coef *= ((boundarySten[inodeB]==1)?(scalingVars.rV0):1.0);
3933 if (boundarySten[inodeB]==1)
3936 for (cnt2=0;cnt2<count;++cnt2)
3938 if (cols[cnt2] == tmpCol)
3939 { bmatch =
true;
break; }
3941 if (!bmatch) { cnt2 = count; ++count;}
3951 #endif // Xyce_NEW_BC
3953 cols[cnt2] = tmpCol;
3957 if (Pcolarray[i][0] != -1)
3959 vals[count] = -dRdpVec[i];
3960 cols[count] = Pcolarray[i][0];
3964 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
3966 Xyce::dout() <<
"\n";
3967 Xyce::dout().setf(std::ios::left);
3968 Xyce::dout() <<
"ELECTRON LOAD: row = " << Nrow;
3969 Xyce::dout() <<
" count = " << count<<
"\n";
3970 Xyce::dout().setf(std::ios::scientific);
3971 for (j=0;j<count;++j)
3973 Xyce::dout() <<
" cols["<<j<<
"] = " << cols[j];
3974 Xyce::dout() <<
" vals["<<j<<
"] = " << vals[j];
3975 Xyce::dout() << std::endl;
3979 if (Nrow != -1 && count > 0)
3981 bs1 = matPtr->sumIntoRow (Nrow,count,&vals[0],&cols[0]);
3982 bsuccess = bsuccess && bs1;
3986 Report::DevelFatal() <<
"OOOPS 2!";
3996 for (j=0;j<numCol;++j) { cols[j] = -1; vals[j] = 0.0; }
4002 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4012 dJdp = dJpdn1Vec[iedge];
4016 dJdp = dJpdn2Vec[iedge];
4019 coef += - ((i<inodeB)?1.0:-1.0) * dJdp * ilen;
4023 coef += - dRdpVec[i] - dDPDTdp;
4026 cols[count] = Pcolarray[i][0];
4031 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4033 if (Pcolarray[i][iNN+1] == -1)
continue;
4043 dJdp = dJpdn1Vec[iedge];
4047 dJdp = dJpdn2Vec[iedge];
4050 coef =-((i<inodeB)?1.0:-1.0) * dJdp * ilen/nodeArea;
4053 cols[count] = Pcolarray[i][iNN+1];
4059 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4069 dJdV = dJpdV1Vec[iedge];
4073 dJdV = dJpdV2Vec[iedge];
4076 coef += -((i<inodeB)?1.0:-1.0) * dJdV * ilen;
4080 if (Vcolarray[i][0] != -1)
4083 cols[count] = Vcolarray[i][0];
4089 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4091 int tmpCol = Vcolarray[i][iNN+1];
4092 if (tmpCol == -1)
continue;
4103 dJdV = dJpdV1Vec[iedge];
4107 dJdV = dJpdV2Vec[iedge];
4110 coef =-((i<inodeB)?1.0:-1.0) * dJdV * ilen/nodeArea;
4112 coef *= ((boundarySten[inodeB]==1)?(scalingVars.rV0):1.0);
4115 if (boundarySten[inodeB]==1)
4118 for (cnt2=0;cnt2<count;++cnt2)
4120 if (cols[cnt2] == tmpCol)
4121 { bmatch =
true;
break; }
4123 if (!bmatch) { cnt2 = count; ++count;}
4133 #endif // Xyce_NEW_BC
4135 cols[cnt2] = tmpCol;
4139 if (Ncolarray[i][0] != -1)
4141 vals[count] = -dRdnVec[i];
4142 cols[count] = Ncolarray[i][0];
4146 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4148 Xyce::dout() <<
"\n";
4149 Xyce::dout().setf(std::ios::left);
4150 Xyce::dout() <<
" HOLE LOAD: row = " << Prow;
4151 Xyce::dout() <<
" count = " << count<<
"\n";
4152 Xyce::dout().setf(std::ios::scientific);
4153 for (j=0;j<count;++j)
4155 Xyce::dout() <<
" cols["<<j<<
"] = " << cols[j];
4156 Xyce::dout() <<
" vals["<<j<<
"] = " << vals[j];
4157 Xyce::dout() << std::endl;
4161 if (Prow != -1 && count > 0)
4163 bs1 = matPtr->sumIntoRow (Prow,count,&vals[0],&cols[0]);
4164 bsuccess = bsuccess && bs1;
4168 Report::DevelFatal() <<
"OOOPS 3!";
4175 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4177 Xyce::dout() << subsection_divider <<
"\n";
4183 for (i=0;i<numMeshPoints;++i)
4187 Vrow = li_Vrowarray[i];
4188 Nrow = li_Nrowarray[i];
4189 Prow = li_Prowarray[i];
4191 std::vector<int> & Voff = li_VoffsetArray[i];
4192 std::vector<int> & Noff = li_NoffsetArray[i];
4193 std::vector<int> & Poff = li_PoffsetArray[i];
4195 bool doneFlagV =
false;
4196 bool doneFlagN =
false;
4197 bool doneFlagP =
false;
4198 bool doneFlag =
false;
4200 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4202 Xyce::dout() <<
"mesh point i = " << i << std::endl;
4206 if (boundarySten[i])
continue;
4211 if (boundarySten[i])
4213 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4215 Xyce::dout() <<
" Doing BC load" << std::endl;
4217 int DIindex = labelDIMap[labelNameVector[i]];
4219 if (dIVec[DIindex].given)
4221 if (dIVec[DIindex].neumannBCFlagV==
false)
4226 (*matPtr)[Vrow][Voff[0]] = 1.0;
4227 (*matPtr)[Vrow][Voff[1]] = -scalingVars.rV0;
4232 if (dIVec[DIindex].neumannBCFlagN==
false)
4236 (*matPtr)[Nrow][Noff[0]] = 1.0;
4241 if (dIVec[DIindex].neumannBCFlagP==
false)
4245 (*matPtr)[Prow][Poff[0]] = 1.0;
4250 doneFlag = (doneFlagV && doneFlagN && doneFlagP);
4254 if (doneFlag)
continue;
4256 #endif // Xyce_NEW_BC
4261 mNode * nodePtr = meshContainerPtr->getNode(i);
4262 nodeArea = nodePtr->
area;
4268 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4270 Xyce::dout() <<
" Doing Poisson load" << std::endl;
4272 std::string semi(bulkMaterial);
4275 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4285 (*matPtr)[Vrow][Voff[0]] += coef;
4288 coef = 0.0; iNN=0; ioffset=1;
4289 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4291 if (Vcolarray[i][iNN+1] == -1)
continue;
4299 #ifdef Xyce_NEW_BC // again CHECK the offset value.
4300 coef *= ((boundarySten[inodeB]==1)?(scalingVars.rV0):1.0);
4301 #endif // Xyce_NEW_BC
4302 (*matPtr)[Vrow][Voff[ioffset]] += coef;
4307 (*matPtr)[Vrow][Voff[ioffset]] += 1.0;
4311 (*matPtr)[Vrow][Voff[ioffset]] += -1.0;
4318 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4320 Xyce::dout() <<
" Doing electron load" << std::endl;
4325 coef = 0.0; ioffset=0;
4327 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4337 dJdn = dJndn1Vec[iedge];
4341 dJdn = dJndn2Vec[iedge];
4344 coef += ((i<inodeB)?1.0:-1.0) * dJdn * ilen;
4348 coef += - dRdnVec[i] - dDNDTdn;
4350 (*matPtr)[Nrow][Noff[0]] += coef;
4353 coef = 0.0; ioffset=1;
4354 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4356 if (Ncolarray[i][iNN+1] == -1)
continue;
4366 dJdn = dJndn1Vec[iedge];
4370 dJdn = dJndn2Vec[iedge];
4373 coef = ((i<inodeB)?1.0:-1.0) * dJdn * ilen/nodeArea;
4375 (*matPtr)[Nrow][Noff[ioffset]] += coef;
4381 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4391 dJdV = dJndV1Vec[iedge];
4395 dJdV = dJndV2Vec[iedge];
4398 coef += ((i<inodeB)?1.0:-1.0) * dJdV * ilen;
4402 (*matPtr)[Nrow][Noff[ioffset]] += coef;
4407 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4409 if (Vcolarray[i][iNN+1] == -1)
continue;
4420 dJdV = dJndV1Vec[iedge];
4424 dJdV = dJndV2Vec[iedge];
4427 coef = ((i<inodeB)?1.0:-1.0) * dJdV * ilen/nodeArea;
4429 coef *= ((boundarySten[inodeB]==1)?(scalingVars.rV0):1.0);
4430 #endif // Xyce_NEW_BC
4431 (*matPtr)[Nrow][Noff[ioffset]] += coef;
4436 (*matPtr)[Nrow][Noff[ioffset]] += -dRdpVec[i];
4444 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4446 Xyce::dout() <<
" Doing hole load" << std::endl;
4450 coef = 0.0; ioffset=0;
4452 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4462 dJdp = dJpdn1Vec[iedge];
4466 dJdp = dJpdn2Vec[iedge];
4469 coef += - ((i<inodeB)?1.0:-1.0) * dJdp * ilen;
4473 coef += - dRdpVec[i] - dDPDTdp;
4475 (*matPtr)[Prow][Poff[0]] += coef;
4478 coef = 0.0; ioffset=1;
4479 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4481 if (Pcolarray[i][iNN+1] == -1)
continue;
4491 dJdp = dJpdn1Vec[iedge];
4495 dJdp = dJpdn2Vec[iedge];
4498 coef =-((i<inodeB)?1.0:-1.0) * dJdp * ilen/nodeArea;
4500 (*matPtr)[Prow][Poff[ioffset]] += coef;
4506 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4516 dJdV = dJpdV1Vec[iedge];
4520 dJdV = dJpdV2Vec[iedge];
4523 coef += -((i<inodeB)?1.0:-1.0) * dJdV * ilen;
4527 (*matPtr)[Prow][Poff[ioffset]] += coef;
4532 for (iNN=0;iNN<nodePtr->
cnode;++iNN)
4534 if (Vcolarray[i][iNN+1] == -1)
continue;
4545 dJdV = dJpdV1Vec[iedge];
4549 dJdV = dJpdV2Vec[iedge];
4552 coef =-((i<inodeB)?1.0:-1.0) * dJdV * ilen/nodeArea;
4553 #ifdef Xyce_NEW_BC // CHECK!
4554 coef *= ((boundarySten[inodeB]==1)?(scalingVars.rV0):1.0);
4555 #endif // Xyce_NEW_BC
4556 (*matPtr)[Prow][Poff[ioffset]] += coef;
4561 (*matPtr)[Prow][Poff[ioffset]] += -dRdnVec[i];
4570 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) && getSolverState().debugTimeFlag)
4572 Xyce::dout() << section_divider <<
"\n";
4589 bool bsuccess =
true;
4592 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
4594 Xyce::dout() << section_divider <<
"\n";
4595 Xyce::dout() <<
"Instance::calcLifetimes" <<
"\n";
4604 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
4608 Xyce::dout() <<
" tnVec["<<i<<
"] = " <<
tnVec[i];
4609 Xyce::dout() <<
" tpVec["<<i<<
"] = " <<
tpVec[i];
4610 Xyce::dout() <<
"\n";
4614 if (isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
4616 Xyce::dout() << section_divider <<
"\n";
4638 bool bsuccess =
true;
4641 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
4643 Xyce::dout() << section_divider <<
"\n";
4644 Xyce::dout() <<
"Instance::calcMobilities" <<
"\n";
4655 ci.
N = fabs(
CVec[i]);
4658 if (ci.
N == 0.0) ci.
N = 1.0;
4676 Xyce::dout() <<
"Nodal Mobilities:" << std::endl;
4679 Xyce::dout() <<
" unVec["<<i<<
"] = " <<
unVec[i];
4680 Xyce::dout() <<
" upVec["<<i<<
"] = " <<
upVec[i];
4681 Xyce::dout() <<
"\n";
4683 Xyce::dout() << std::endl;
4690 int inodeA = edgePtr->
inodeA;
4691 int inodeB = edgePtr->
inodeB;
4702 ci.
N = (fabs(
CVec[inodeA])+fabs(
CVec[inodeB]))*0.5;
4705 if (ci.
N == 0.0) ci.
N = 1.0;
4708 ci.
n = pow((fabs(
nnVec[inodeA])*fabs(
nnVec[inodeB])),0.5)*
4711 ci.
p = pow((fabs(
npVec[inodeA])*fabs(
npVec[inodeB])),0.5)*
4714 if (DEBUG_DEVICE && ci.
n != 0.0 && !(ci.
n > 0.0) && !(ci.
n < 0.0))
4716 Report::DevelFatal() <<
"ci.n is nan" << std::endl
4717 <<
"nnVec[A] = " <<
nnVec[inodeA] <<
"\n"
4718 <<
"nnVec[B] = " <<
nnVec[inodeB];
4734 Xyce::dout() <<
"Edge Mobilities" << std::endl;
4737 Xyce::dout() <<
" unE_Vec["<<i<<
"] = " <<
unE_Vec[i];
4738 Xyce::dout() <<
" upE_Vec["<<i<<
"] = " <<
upE_Vec[i];
4739 Xyce::dout() <<
"\n";
4743 if (isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
4745 Xyce::dout() << section_divider << std::endl;
4778 bool bsuccess =
true;
4816 bool bsuccess =
true;
4821 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
4823 Xyce::dout() << section_divider <<
"\n";
4824 Xyce::dout() <<
"Instance::calcVoltDepDensities\n";
4833 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
4835 Xyce::dout() << section_divider <<
"\n";
4852 bool bsuccess =
true;
4857 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
4859 Xyce::dout() << section_divider <<
"\n";
4860 Xyce::dout() <<
"Instance::calcDopingProfile\n";
4869 #ifdef Xyce_OXIDE_ENABLED
4870 if (allOxideFlag)
return bsuccess;
4885 double NaTmp = 1.0e+99;
4886 double NdTmp =-1.0e+99;
4890 if(NaTmp >
CVec[i]) NaTmp =
CVec[i];
4891 if(NdTmp <
CVec[i]) NdTmp =
CVec[i];
4910 XL = midpoint -
WJ/2.0;
4911 XR = midpoint +
WJ/2.0;
4920 XL = midpoint -
WJ/2.0;
4921 XR = midpoint +
WJ/2.0;
4926 Xyce::dout() <<
"deviceWidth = " <<
deviceWidth << std::endl;
4927 Xyce::dout() <<
"midpoint = " << midpoint << std::endl;
4928 Xyce::dout() <<
"XL = " <<
XL << std::endl;
4929 Xyce::dout() <<
"XR = " <<
XR << std::endl;
4930 Xyce::dout() <<
"WJ = " <<
WJ << std::endl;
4935 double yloc =
yVec[i];
4981 double Re = 0.5 * We;
4982 double Rb = 0.5 * Wad;
4992 Ae = log(Ne/Nb)/(Re*Re);
4993 Ab = log(Nb/Nc)/(Rb*Rb);
5012 Ae = log(Ne/Nb)/(Re*Re);
5013 Ab = log(Nb/Nc)/(Rb*Rb);
5035 double NaTmp = 1.0e+99;
5036 double NdTmp =-1.0e+99;
5040 if(NaTmp >
CVec[i]) NaTmp =
CVec[i];
5041 if(NdTmp <
CVec[i]) NdTmp =
CVec[i];
5079 double WDIFF = (WDEV-WOX)/2;
5081 double DT = 1.0e-11;
5110 double NaTmp = 1.0e+99;
5111 double NdTmp =-1.0e+99;
5115 if(NaTmp >
CVec[i]) NaTmp =
CVec[i];
5116 if(NdTmp <
CVec[i]) NdTmp =
CVec[i];
5132 std::map<std::string, DopeInfo *>::iterator iter;
5133 std::map<std::string, DopeInfo *>::iterator start =
dopeInfoMap.begin();
5134 std::map<std::string, DopeInfo *>::iterator end =
dopeInfoMap.end();
5136 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5138 Xyce::dout() <<
"dope info map:" << std::endl;
5140 for ( iter = start; iter != end; ++iter )
5144 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5164 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5166 Xyce::dout().width(20);
5167 Xyce::dout().precision(12);
5168 Xyce::dout().setf(std::ios::scientific);
5169 Xyce::dout() << std::endl;
5170 Xyce::dout() <<
"Na = " <<
Na << std::endl;
5171 Xyce::dout() <<
"Nd = " <<
Nd << std::endl<< std::endl;
5175 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5179 Xyce::dout() <<
xVec[inode];
5180 Xyce::dout() <<
" " <<
yVec[inode];
5181 Xyce::dout() <<
" CVec["<<inode<<
"] = " <<
CVec[inode] << std::endl;
5185 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5187 Xyce::dout() << section_divider << std::endl;
5225 bool bsuccess =
true;
5266 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5268 Xyce::dout() << std::endl
5303 bool bsuccess =
true;
5322 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
5323 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
5324 std::vector<DeviceInterfaceNode>::iterator iterDI = firstDI;
5326 for (;iterDI!=lastDI;++iterDI)
5328 for (i=0;i<iterDI->numBoundaryPoints;++i)
5339 int size = iterDI->areaVector.size();
5340 for (i = 0; i < size; ++i)
5361 #endif // Xyce_NEW_BC
5366 (solVectorPtr)->setElementByGlobalIndex(
Vrowarray[i],
VVec[i], 0);
5368 (solVectorPtr)->setElementByGlobalIndex(
Nrowarray[i],
nnVec[i], 0);
5370 (solVectorPtr)->setElementByGlobalIndex(
Prowarray[i],
npVec[i], 0);
5407 bool bsuccess =
true;
5426 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
5427 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
5428 std::vector<DeviceInterfaceNode>::iterator iterDI = firstDI;
5430 for (;iterDI!=lastDI;++iterDI)
5432 for (i=0;i<iterDI->numBoundaryPoints;++i)
5443 int size = iterDI->areaVector.size();
5444 for (i = 0; i < size; ++i)
5465 #endif // Xyce_NEW_BC
5470 (solVectorPtr)->setElementByGlobalIndex(
Vrowarray[i],
VVec[i], 0);
5472 (solVectorPtr)->setElementByGlobalIndex(
Nrowarray[i],
nnVec[i], 0);
5474 (solVectorPtr)->setElementByGlobalIndex(
Prowarray[i],
npVec[i], 0);
5513 bool bsuccess =
true;
5523 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
5524 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
5525 std::vector<DeviceInterfaceNode>::iterator iterDI = firstDI;
5527 for (;iterDI!=lastDI;++iterDI)
5529 for (i=0;i<iterDI->numBoundaryPoints;++i)
5578 bool bsuccess =
true;
5612 bool bsuccess =
true;
5616 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5618 Xyce::dout() << section_divider << std::endl;
5619 Xyce::dout() <<
"Instance::calcInitialGuess"<< std::endl;
5620 Xyce::dout() <<
" name = " <<
getName() << std::endl;
5629 double Cisq(0.0), Nisq(0.0);
5638 tmp = (fabs(Ci)+sqrt(Cisq+4*Nisq))/2.0;
5639 nnVec[i] = ((Ci>=0)?(tmp):(0.0)) + ((Ci<0)?(Nisq/tmp):(0.0));
5642 tmp = (fabs(Ci)+sqrt(Cisq+4*Nisq))/2.0;
5643 npVec[i] = ((Ci<=0)?(tmp):(0.0)) + ((Ci>0)?(Nisq/tmp):(0.0));
5645 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5647 Xyce::dout() <<
"nnVec[" << i <<
"] = " <<
nnVec[i];
5648 Xyce::dout() <<
" npVec[" << i <<
"] = " <<
npVec[i];
5649 Xyce::dout() << std::endl;
5666 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5668 Xyce::dout() <<
"VVec[" << i <<
"] = " <<
VVec[i] << std::endl;
5674 double VminTmp = +1.0e+99;
5675 double VmaxTmp = -1.0e+99;
5677 double VminBC = +1.0e+99;
5678 double VmaxBC = -1.0e+99;
5680 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
5681 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
5682 std::vector<DeviceInterfaceNode>::iterator iterDI;
5684 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
5687 std::vector<int>::iterator iterNode = labelPtr->
mNodeVector.begin();
5688 std::vector<int>::iterator lastNode = labelPtr->
mNodeVector.end ();
5690 for ( ;iterNode!=lastNode;++iterNode)
5692 if (VminTmp >
VVec[*iterNode]) VminTmp =
VVec[*iterNode];
5693 if (VmaxTmp <
VVec[*iterNode]) VmaxTmp =
VVec[*iterNode];
5695 int ilocal = iterDI->meshGlobalToLocal[*iterNode];
5696 if (VminBC > iterDI->VequVec[ilocal]) VminBC = iterDI->VequVec[ilocal];
5697 if (VmaxBC < iterDI->VequVec[ilocal]) VmaxBC = iterDI->VequVec[ilocal];
5701 double Voffset = -VminTmp;
5702 double VtotDiff = VmaxTmp-VminTmp;
5703 double VBCDiff = VmaxBC-VminBC;
5704 double Vscale = (VtotDiff!=0.0)?(VBCDiff/VtotDiff):1.0;
5706 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5708 Xyce::dout() <<
"Voffset = " << Voffset << std::endl;
5709 Xyce::dout() <<
"VtotDiff = " << VtotDiff << std::endl;
5710 Xyce::dout() <<
"VBCDiff = " << VBCDiff << std::endl;
5711 Xyce::dout() <<
"Vscale = " << Vscale << std::endl;
5728 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5730 Xyce::dout() <<
"VVec[" << i <<
"] = " <<
VVec[i] << std::endl;
5735 #endif // Xyce_NEW_BC
5742 (solVectorPtr)->setElementByGlobalIndex(
Vrowarray[i],
VVec[i], 0);
5744 (solVectorPtr)->setElementByGlobalIndex(
Nrowarray[i],
nnVec[i], 0);
5746 (solVectorPtr)->setElementByGlobalIndex(
Prowarray[i],
npVec[i], 0);
5767 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5769 Xyce::dout() << std::endl;
5770 Xyce::dout().setf(std::ios::scientific);
5771 Xyce::dout() <<
"Vmax = " <<
VmaxExp << std::endl;
5772 Xyce::dout() <<
"Vmin = " <<
VminExp << std::endl;
5773 Xyce::dout() << std::endl;
5776 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5778 Xyce::dout() << section_divider << std::endl;
5797 bool bsuccess =
true;
5800 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5802 Xyce::dout() << section_divider << std::endl;
5803 Xyce::dout() <<
"Instance::calcVequBCs"<< std::endl;
5804 Xyce::dout() <<
" name = " <<
getName() << std::endl;
5805 Xyce::dout() <<
" Na = "<<
Na << std::endl;
5806 Xyce::dout() <<
" Nd = "<<
Nd << std::endl;
5809 double VminBC =+1.0e+99;
5810 double VmaxBC =-1.0e+99;
5812 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
5813 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
5814 std::vector<DeviceInterfaceNode>::iterator iterDI;
5816 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
5818 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5820 Xyce::dout() <<
"DI name = " << iterDI->eName << std::endl;
5821 Xyce::dout() <<
"material = " << iterDI->material << std::endl;
5822 if (iterDI->materialGiven)
5824 Xyce::dout() <<
"material was given" << std::endl;
5828 Xyce::dout() <<
"material was NOT given" << std::endl;
5831 if (iterDI->oxideBndryFlag)
5833 Xyce::dout() <<
"This is a boundary WITH an oxide." << std::endl;
5837 Xyce::dout() <<
"This is a boundary WITHOUT an oxide." << std::endl;
5840 Xyce::dout().setf(std::ios::scientific);
5843 std::string insul =
"sio2";
5846 std::vector<int>::iterator iterNode = labelPtr->
mNodeVector.begin();
5847 std::vector<int>::iterator lastNode = labelPtr->
mNodeVector.end ();
5849 for (i=0;i<iterDI->numBoundaryPoints;++i,++iterNode)
5851 double Ci =
CVec[*iterNode];
5852 double ns =
nnVec[*iterNode];
5853 double Cisq = Ci*Ci;
5854 double Nisq =
Ni*
Ni;
5855 double tmp, nnTmp, npTmp;
5858 tmp = (fabs(Ci)+sqrt(Cisq+4*Nisq))/2.0;
5859 nnTmp = ((Ci>=0)?(tmp):(0.0)) + ((Ci<0)?(Nisq/tmp):(0.0));
5862 tmp = (fabs(Ci)+sqrt(Cisq+4*Nisq))/2.0;
5863 npTmp = ((Ci<=0)?(tmp):(0.0)) + ((Ci>0)?(Nisq/tmp):(0.0));
5865 ExtendedString mater = iterDI->material;
5868 if (mater==
"neutral")
5873 iterDI->VequVec[i] = +
Vt * log(nnTmp/Ni);
5878 iterDI->VequVec[i] = -
Vt * log(npTmp/Ni);
5889 + 2.0 *
Vt * log(nnTmp/Ni);
5896 - 2.0 *
Vt * log(npTmp/Ni);
5904 if (iterDI->oxideBndryFlag)
5906 iterDI->VequVec[i] += - iterDI->oxcharge *
charge *iterDI->oxthick/
5910 iterDI->VbcVec [i] = 0.0;
5912 if (VminBC > iterDI->VequVec[i]) VminBC = iterDI->VequVec[i];
5913 if (VmaxBC < iterDI->VequVec[i]) VmaxBC = iterDI->VequVec[i];
5915 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5917 Xyce::dout() <<
"Vequ["<<i<<
"]=" << iterDI->VequVec[i];
5918 Xyce::dout() << std::endl;
5923 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5925 Xyce::dout() <<
"After offset:" << std::endl;
5929 double Voffset = -VminBC;
5931 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
5933 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5935 Xyce::dout() <<
"DI name = " << iterDI->eName << std::endl;
5936 Xyce::dout().setf(std::ios::scientific);
5939 for (i=0;i<iterDI->numBoundaryPoints;++i)
5941 iterDI->VequVec[i] += Voffset;
5942 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5944 Xyce::dout() <<
"VequVec["<<i<<
"] = " << iterDI->VequVec[i] << std::endl;
5949 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5951 Xyce::dout() << section_divider << std::endl;
5972 bool bsuccess =
true;
5973 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
5974 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
5975 std::vector<DeviceInterfaceNode>::iterator iterDI;
5977 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5979 Xyce::dout() << section_divider<< std::endl;
5980 Xyce::dout() << std::endl <<
"In Instance::calcDensityBCs" << std::endl;
5989 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
5991 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
5993 Xyce::dout() << iterDI->eName<<
":" << std::endl;
5998 for (
int i=0;i<iterDI->numBoundaryPoints;++i)
6007 iterDI->nnbcVec[i] =
6010 iterDI->npbcVec[i] =
6011 0.5*(sqrt(
CVec[nIndex]*
CVec[nIndex]+4*Ni*Ni)-
CVec[nIndex]);
6013 if (NnMax < iterDI->nnbcVec[i])
NnMax = iterDI->nnbcVec[i];
6014 if (NpMax < iterDI->npbcVec[i])
NpMax = iterDI->npbcVec[i];
6016 if (
NnMin > iterDI->nnbcVec[i])
NnMin = iterDI->nnbcVec[i];
6017 if (
NpMin > iterDI->npbcVec[i])
NpMin = iterDI->npbcVec[i];
6019 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
6021 Xyce::dout() <<
"\tCVec["<<nIndex<<
"] = " <<
CVec[nIndex]<< std::endl;
6022 Xyce::dout() <<
"\tnnbc["<<i<<
"] = " << iterDI->nnbcVec[i] << std::endl;
6023 Xyce::dout() <<
"\tnpbc["<<i<<
"] = " << iterDI->npbcVec[i] << std::endl;
6030 std::vector<int>::iterator iterNode = labelPtr->
mNodeVector.begin();
6031 std::vector<int>::iterator lastNode = labelPtr->
mNodeVector.end ();
6033 for ( ;iterNode!=lastNode;++iterNode)
6035 int i1 = iterDI->meshGlobalToLocal[*iterNode];
6044 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
6046 Xyce::dout() << std::endl;
6047 Xyce::dout() <<
"NnMax = " <<
NnMax << std::endl;
6048 Xyce::dout() <<
"NpMax = " <<
NpMax << std::endl;
6049 Xyce::dout() <<
"NnMin = " <<
NnMin << std::endl;
6050 Xyce::dout() <<
"NpMin = " <<
NpMin << std::endl;
6051 Xyce::dout() << section_divider<< std::endl;
6074 bool bsuccess =
true;
6076 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
6077 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
6078 std::vector<DeviceInterfaceNode>::iterator iterDI;
6080 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
6082 Xyce::dout() << std::endl << section_divider << std::endl;
6083 Xyce::dout() << std::endl <<
"In Instance::calcBoundaryConditions" << std::endl;
6086 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
6090 for (i=0;i<iterDI->numBoundaryPoints;++i)
6092 iterDI->VbcVec[i] = iterDI->Vckt_ramp + iterDI->VequVec[i];
6097 for (i=0;i<iterDI->numBoundaryPoints;++i)
6099 iterDI->VbcVec[i] = iterDI->Vckt + iterDI->VequVec[i];
6107 std::vector<int>::iterator iterNode = labelPtr->
mNodeVector.begin();
6108 std::vector<int>::iterator lastNode = labelPtr->
mNodeVector.end ();
6110 for ( ;iterNode!=lastNode;++iterNode)
6112 int i1 = iterDI->meshGlobalToLocal[*iterNode];
6113 VVec[*iterNode] = iterDI->VbcVec [i1];
6114 nnVec[*iterNode] = iterDI->nnbcVec[i1];
6115 npVec[*iterNode] = iterDI->npbcVec[i1];
6117 #endif // Xyce_NEW_BC
6119 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
6121 Xyce::dout() << iterDI->eName <<
":" << std::endl;
6122 for (i=0;i<iterDI->numBoundaryPoints;++i)
6124 Xyce::dout()<<
"Vbc["<<i<<
"] = "<<iterDI->VbcVec[i]<<
", "<<iterDI->VbcVec[i]*
scalingVars.
V0;
6125 Xyce::dout() <<
" nnbc["<<i<<
"] = "<< iterDI->nnbcVec[i];
6127 Xyce::dout() <<
" npbc["<<i<<
"] = "<< iterDI->npbcVec[i];
6129 Xyce::dout() << std::endl;
6134 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6136 Xyce::dout() << section_divider << std::endl;
6162 bool bsuccess =
true;
6164 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
6166 Xyce::dout() << std::endl << section_divider << std::endl;
6167 Xyce::dout() << std::endl <<
"In Instance::obtainNodeVoltages" << std::endl;
6172 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
6173 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
6174 std::vector<DeviceInterfaceNode>::iterator iterDI;
6176 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
6181 if (iterDI->gid != -1)
6182 iterDI->Vckt = (solVectorPtr)->getElementByGlobalIndex(iterDI->gid, 0);
6188 iterDI->Vckt = (*solVectorPtr)[iterDI->lid];
6195 Xyce::dout() << iterDI->eName <<
" Vckt = " << iterDI->Vckt;
6196 Xyce::dout() <<
" Vckt*scalingVars.V0 = " << (iterDI->Vckt *
scalingVars.
V0) << std::endl;
6202 Xyce::dout() << section_divider << std::endl;
6223 bool bsuccess =
true;
6225 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
6226 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
6227 std::vector<DeviceInterfaceNode>::iterator iterDI;
6229 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6231 Xyce::dout() << std::endl << section_divider << std::endl;
6232 Xyce::dout() <<
"device: " <<
getName() << std::endl;
6235 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
6239 double v1_orig = v1;
6240 double delV1 = v1 - v1_old;
6242 if ( delV1 > 1.25 ) v1 = v1_old + 1.25;
6243 if ( delV1 < -0.75 ) v1 = v1_old - 0.75;
6245 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6247 Xyce::dout() <<
"electrode = " << iterDI->eName << std::endl;
6248 Xyce::dout() <<
"v1 = " << v1 << std::endl;
6249 Xyce::dout() <<
"v1_old = " << v1_old << std::endl;
6250 Xyce::dout() <<
"v1_orig = " << v1_orig << std::endl;
6251 Xyce::dout() <<
"v1/scalingVars.V0 = " << v1/
scalingVars.
V0 << std::endl;
6252 Xyce::dout() <<
"v1_old/scalingVars.V0 = " << v1_old/
scalingVars.
V0 << std::endl;
6253 Xyce::dout() <<
"v1_orig/scalingVars.V0 = " << v1_orig/
scalingVars.
V0 << std::endl;
6254 Xyce::dout() << std::endl;
6261 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6263 Xyce::dout() << section_divider << std::endl;
6280 bool bsuccess =
true;
6285 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6287 Xyce::dout() << section_divider <<
"\n";
6288 Xyce::dout() <<
"Instance::obtainSolution\n";
6289 Xyce::dout() <<
"solVectorPtr = " << solVectorPtr << std::endl;
6293 bsuccess = bsuccess && bs1;
6302 #endif // Xyce_NEW_BC
6310 VVec[i] = (solVectorPtr)->getElementByGlobalIndex(
Vrowarray[i], 0);
6323 Xyce::dout() <<
"VVec["<<i<<
"]=\t";
6324 Xyce::dout().width(20);
6325 Xyce::dout().precision(12);
6326 Xyce::dout().setf(std::ios::scientific);
6327 Xyce::dout() <<
VVec[i];
6329 Xyce::dout() <<
"\n";
6340 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6342 Xyce::dout() <<
" About to get the density.\n";
6343 if (
getSolverState().dcopFlag) Xyce::dout() <<
"DCOP load" << std::endl;
6344 else Xyce::dout() <<
"Transient load" << std::endl;
6356 #endif // Xyce_NEW_BC
6379 Xyce::dout()<<
" Obtaining densities from solution vector (not voltage dep.)\n";
6386 #endif // Xyce_NEW_BC
6393 nnVec[i] = (solVectorPtr)->getElementByGlobalIndex(
Nrowarray[i], 0);
6400 #ifdef Xyce_PDE_DENSITY_CONSTRAINT
6409 (solVectorPtr)->setElementByGlobalIndex(
Nrowarray[i], 0.0, 0);
6423 npVec[i] = (solVectorPtr)->getElementByGlobalIndex(
Prowarray[i], 0);
6431 #ifdef Xyce_PDE_DENSITY_CONSTRAINT
6439 (solVectorPtr)->setElementByGlobalIndex(
Prowarray[i], 0.0, 0);
6454 Xyce::dout() <<
"nnVec["<<i<<
"]=\t";
6455 Xyce::dout().width(14);
6456 Xyce::dout().precision(6);
6457 Xyce::dout().setf(std::ios::scientific);
6458 Xyce::dout() <<
nnVec[i];
6461 Xyce::dout() <<
" npVec["<<i<<
"]=\t";
6462 Xyce::dout().width(14);
6463 Xyce::dout().precision(6);
6464 Xyce::dout().setf(std::ios::scientific);
6465 Xyce::dout() <<
npVec[i];
6468 Xyce::dout() << std::endl;
6483 bsuccess = bsuccess && bs1;
6490 bsuccess = bsuccess && bs1;
6494 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6496 Xyce::dout() << section_divider << std::endl;
6512 bool bsuccess =
true;
6517 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6519 Xyce::dout() << section_divider <<
"\n";
6520 Xyce::dout() <<
"Instance::calcRecombination\n";
6521 Xyce::dout() <<
"\n";
6526 double n =
nnVec[i];
6527 double p =
npVec[i];
6528 double tn =
tnVec[i];
6529 double tp =
tpVec[i];
6535 RVec[i] = (Rsrh + Raug);
6539 Xyce::dout().precision(4);
6540 Xyce::dout() <<
" nnVec="<<n<<
" npVec="<<p;
6541 Xyce::dout() <<
" tnVec="<<tn<<
" tpVec="<<tp;
6542 Xyce::dout() <<
" Rsrh="<<Rsrh;
6543 Xyce::dout() <<
" Raug="<<Raug;
6544 Xyce::dout() <<
" RVec["<<i<<
"]="<<
RVec[i];
6545 Xyce::dout() <<
"\n";
6548 if (isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6550 Xyce::dout().precision(4);
6551 Xyce::dout() <<
" RVec["<<i<<
"]="<<
RVec[i];
6552 Xyce::dout() << std::endl;
6556 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6558 Xyce::dout() << section_divider << std::endl;
6579 bool bsuccess =
true;
6582 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6584 Xyce::dout() << section_divider <<
"\n";
6585 Xyce::dout() <<
"Instance::sumSources\n";
6586 Xyce::dout() <<
"\n";
6594 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6596 Xyce::dout() <<
"RVec["<<i<<
"] = " <<
RVec[i];
6597 Xyce::dout() <<
" SVec["<<i<<
"] = " << SVec[i];
6598 Xyce::dout() <<
" totSrcVec["<<i<<
"] = " <<
totSrcVec[i] <<
"\n";
6602 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6604 Xyce::dout() << section_divider << std::endl;
6621 bool bsuccess =
true;
6630 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6632 Xyce::dout() << section_divider <<
"\n";
6633 Xyce::dout() <<
"Instance::pdRecombination\n";
6634 Xyce::dout() <<
"\n";
6639 double n =
nnVec[i];
6640 double p =
npVec[i];
6641 double tn =
tnVec[i];
6642 double tp =
tpVec[i];
6650 dRdnVec[i] = (dRsrhdn + dRaugdn);
6651 dRdpVec[i] = (dRsrhdp + dRaugdp);
6655 Xyce::dout() <<
" dRdnVec["<<i<<
"] = " <<
dRdnVec[i];
6656 Xyce::dout() <<
" dRdpVec["<<i<<
"] = " <<
dRdpVec[i];
6657 Xyce::dout() <<
"\n";
6661 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6663 Xyce::dout() << section_divider << std::endl;
6679 bool bsuccess =
true;
6687 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6689 Xyce::dout() << section_divider <<
"\n";
6690 Xyce::dout() <<
"Instance::calcElectronCurrent\n";
6691 Xyce::dout() <<
"\n";
6698 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6700 Xyce::dout() <<
"\n";
6701 Xyce::dout() <<
"i="<<i<<
"\n";
6706 int inodeA = edgePtr->
inodeA;
6707 int inodeB = edgePtr->
inodeB;
6708 double elen = edgePtr->
elen;
6713 if (jnMax < fabs(
JnVec[i]) )
6716 jnMax = fabs(
JnVec[i]);
6719 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6726 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6728 double jScale = 1.0;
6729 double xScale = 1.0;
6732 Xyce::dout().setf(std::ios::scientific);
6733 Xyce::dout() <<
" Max Electron current = " << jnMax;
6734 Xyce::dout() <<
" jScale = " << jScale;
6735 Xyce::dout() <<
"\n";
6738 int inodeA = edgePtr->
inodeA;
6739 int inodeB = edgePtr->
inodeB;
6741 Xyce::dout() <<
" max locations A: (x,y) = (" <<
xVec[inodeA]*xScale<<
", ";
6742 Xyce::dout() <<
yVec[inodeA]*xScale<<
")\n";
6743 Xyce::dout() <<
" max locations B: (x,y) = (" <<
xVec[inodeB]*xScale<<
", ";
6744 Xyce::dout() <<
yVec[inodeB]*xScale<<
")\n";
6745 Xyce::dout() <<
" nodes: inodeA = "<<inodeA<<
" inodeB = " << inodeB<< std::endl;
6747 Xyce::dout() <<
" VVec["<<inodeA<<
"] = " <<
VVec[inodeA];
6748 Xyce::dout() <<
" VVec["<<inodeB<<
"] = " << VVec[inodeB] << std::endl;
6750 Xyce::dout() <<
" nnVec["<<inodeA<<
"] = " <<
nnVec[inodeA];
6751 Xyce::dout() <<
" nnVec["<<inodeB<<
"] = " << nnVec[inodeB] << std::endl;
6753 Xyce::dout() <<
" elen = " << edgePtr->
elen << std::endl;
6754 Xyce::dout() << section_divider << std::endl;
6771 bool bsuccess =
true;
6776 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6778 Xyce::dout() << section_divider <<
"\n";
6779 Xyce::dout() <<
"Instance::pdElectronCurrent\n";
6780 Xyce::dout() <<
"\n";
6786 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6788 Xyce::dout() << subsection_divider <<
"\n";
6789 Xyce::dout() <<
"i="<<i;
6793 int inodeA = edgePtr->
inodeA;
6794 int inodeB = edgePtr->
inodeB;
6795 double elen = edgePtr->
elen;
6809 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6811 Xyce::dout() <<
" dJndn1="<<
dJndn1Vec[i];
6812 Xyce::dout() <<
" dJndn2="<<
dJndn2Vec[i];
6813 Xyce::dout() <<
" dJndV1="<<
dJndV1Vec[i];
6814 Xyce::dout() <<
" dJndV2="<<
dJndV2Vec[i];
6815 Xyce::dout() <<
"\n";
6819 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6821 Xyce::dout() << section_divider << std::endl;
6837 bool bsuccess =
true;
6844 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6846 Xyce::dout() << section_divider <<
"\n";
6847 Xyce::dout() <<
"Instance::calcHoleCurrent\n";
6848 Xyce::dout() <<
"\n";
6854 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6856 Xyce::dout() <<
"\n";
6857 Xyce::dout() <<
"i="<<i<<
"\n";
6862 int inodeA = edgePtr->
inodeA;
6863 int inodeB = edgePtr->
inodeB;
6864 double elen = edgePtr->
elen;
6869 if (jpMax < fabs(
JpVec[i]) )
6872 jpMax = fabs(
JpVec[i]);
6875 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6882 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6884 double jScale = 1.0;
6885 double xScale = 1.0;
6888 Xyce::dout().setf(std::ios::scientific);
6889 Xyce::dout() <<
" Max Hole current = " << jpMax;
6890 Xyce::dout() <<
" jScale = " << jScale;
6891 Xyce::dout() <<
"\n";
6894 int inodeA = edgePtr->
inodeA;
6895 int inodeB = edgePtr->
inodeB;
6897 Xyce::dout() <<
" max locations A: (x,y) = (" <<
xVec[inodeA]*xScale<<
", ";
6898 Xyce::dout() <<
yVec[inodeA]*xScale<<
")\n";
6899 Xyce::dout() <<
" max locations B: (x,y) = (" <<
xVec[inodeB]*xScale<<
", ";
6900 Xyce::dout() <<
yVec[inodeB]*xScale<<
")\n";
6901 Xyce::dout() <<
" nodes: inodeA = "<<inodeA<<
" inodeB = " << inodeB<< std::endl;
6903 Xyce::dout() <<
" VVec["<<inodeA<<
"] = " <<
VVec[inodeA];
6904 Xyce::dout() <<
" VVec["<<inodeB<<
"] = " << VVec[inodeB] << std::endl;
6906 Xyce::dout() <<
" npVec["<<inodeA<<
"] = " <<
npVec[inodeA];
6907 Xyce::dout() <<
" npVec["<<inodeB<<
"] = " << npVec[inodeB] << std::endl;
6909 Xyce::dout() <<
" elen = " << edgePtr->
elen << std::endl;
6910 Xyce::dout() << section_divider << std::endl;
6927 bool bsuccess =
true;
6932 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6934 Xyce::dout() << section_divider <<
"\n";
6935 Xyce::dout() <<
"Instance::pdHoleCurrent\n";
6936 Xyce::dout() <<
"\n";
6943 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6945 Xyce::dout() << subsection_divider <<
"\n";
6946 Xyce::dout() <<
"i="<<i;
6947 Xyce::dout() <<
"\n";
6951 int inodeA = edgePtr->
inodeA;
6952 int inodeB = edgePtr->
inodeB;
6953 double elen = edgePtr->
elen;
6967 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6969 Xyce::dout() <<
" dJpdn1="<<
dJpdn1Vec[i];
6970 Xyce::dout() <<
" dJpdn2="<<
dJpdn2Vec[i];
6971 Xyce::dout() <<
" dJpdV1="<<
dJpdV1Vec[i];
6972 Xyce::dout() <<
" dJpdV2="<<
dJpdV2Vec[i];
6973 Xyce::dout() <<
"\n" <<
"\n";
6978 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
6980 Xyce::dout() << section_divider << std::endl;
7003 bool bsuccess =
true;
7008 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
7010 Xyce::dout() << section_divider <<
"\n";
7011 Xyce::dout() <<
"Instance::calcEfield\n";
7012 Xyce::dout() <<
"\n";
7022 int inodeA = edgePtr->
inodeA;
7023 int inodeB = edgePtr->
inodeB;
7024 double elen = edgePtr->
elen;
7030 Xyce::dout() <<
" VV[A] = " <<
VVec[inodeA];
7031 Xyce::dout() <<
" VV[B] = " <<
VVec[inodeB];
7032 Xyce::dout() <<
" elen = " << elen;
7034 Xyce::dout() <<
" EfieldVec["<<i<<
"] = " <<
EfieldVec[i];
7035 Xyce::dout() <<
" E*scalingVars.E0 = " << EfieldVec[i]*
scalingVars.
E0;
7036 Xyce::dout() <<
"\n";
7040 Xyce::dout() <<
" edge = " << i;
7041 Xyce::dout() <<
" elen = " << elen;
7042 Report::DevelFatal() <<
"elen less than zero";
7046 if (absEfield >
Emax)
7055 else { eScale = 1.0; }
7059 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
7063 else { xScale = 1.0; }
7065 Xyce::dout().setf(std::ios::scientific);
7066 Xyce::dout() <<
" Max Efield = " <<
Emax;
7067 Xyce::dout() <<
" eScale = " << eScale;
7068 Xyce::dout() <<
"\n";
7071 int inodeA = edgePtr->
inodeA;
7072 int inodeB = edgePtr->
inodeB;
7074 Xyce::dout() <<
" max locations A: (x,y) = (" <<
xVec[inodeA]*xScale<<
", ";
7075 Xyce::dout() <<
yVec[inodeA]*xScale<<
")\n";
7076 Xyce::dout() <<
" max locations B: (x,y) = (" <<
xVec[inodeB]*xScale<<
", ";
7077 Xyce::dout() <<
yVec[inodeB]*xScale<<
")\n";
7078 Xyce::dout() <<
" nodes: inodeA = "<<inodeA<<
" inodeB = " << inodeB<< std::endl;
7079 Xyce::dout() <<
" VVec["<<inodeA<<
"] = " <<
VVec[inodeA];
7080 Xyce::dout() <<
" VVec["<<inodeB<<
"] = " << VVec[inodeB] << std::endl;
7081 Xyce::dout() <<
" elen = " << edgePtr->
elen << std::endl;
7082 Xyce::dout() << section_divider << std::endl;
7106 bool bnoChange =
true;
7108 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
7110 Xyce::dout() << section_divider <<
"\n";
7111 Xyce::dout() <<
"Instance::enableContinuation. " <<
outputName;
7112 Xyce::dout() << std::endl;
7117 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
7118 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
7119 std::vector<DeviceInterfaceNode>::iterator iterDI;
7129 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
7131 iterDI->Vckt_old = iterDI->Vckt;
7137 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
7139 iterDI->Vckt_final = iterDI->Vckt;
7140 iterDI->Vckt_orig = iterDI->Vckt;
7149 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
7151 double dV,tmp1V, tmp2V;
7152 tmp1V = iterDI->Vckt_final;
7153 tmp2V = iterDI->Vckt_old;
7156 iterDI->Vckt_delta = dV;
7158 iterDI->Vckt_deltaC = dV/
static_cast<double>(max_PDE_continuation_steps);
7164 if (fabs(iterDI->Vckt_deltaC) > maxDelta)
7166 int tmp_steps =
static_cast<int>(fabs(dV)/maxDelta) + 1;
7167 max_PDE_continuation_steps = tmp_steps;
7169 iterDI->Vckt_deltaC = dV/
static_cast<double>(max_PDE_continuation_steps);
7172 if (fabs(dV) > 1.0e-3) bnoChange =
false;
7176 Xyce::dout() << std::endl;
7178 Xyce::dout().width(10);
7179 Xyce::dout() << iterDI->eName;
7180 Xyce::dout().width(10); Xyce::dout().precision(2);
7181 Xyce::dout() <<
": dV = " << dV;
7182 Xyce::dout() <<
" Vckt_final = " << iterDI->Vckt_final;
7183 Xyce::dout() <<
" Vckt_old = " << iterDI->Vckt_old << std::endl;
7184 Xyce::dout() <<
" delta = " << iterDI->Vckt_delta;
7185 Xyce::dout() <<
" deltaC = " << iterDI->Vckt_deltaC;
7186 Xyce::dout() <<
" steps = " << max_PDE_continuation_steps;
7187 Xyce::dout() << std::endl;
7190 iterDI->Vckt_ramp = iterDI->Vckt_old;
7191 iterDI->Vckt_ramp_old = iterDI->Vckt_old;
7194 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
7196 if (bnoChange) Xyce::dout() <<
"bnoChange is TRUE" << std::endl;
7197 else Xyce::dout() <<
"bnoChange is FALSE" << std::endl;
7202 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS) &&
getSolverState().debugTimeFlag)
7204 Xyce::dout() << section_divider << std::endl;
7209 return (!bnoChange);
7226 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
7227 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
7228 std::vector<DeviceInterfaceNode>::iterator iterDI;
7230 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
7232 iterDI->Vckt_old = iterDI->Vckt_final;
7252 Xyce::dout() << section_divider << std::endl;
7253 Xyce::dout() <<
"Instance::setPDEContinuationAlpha" << std::endl;
7258 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
7259 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
7260 std::vector<DeviceInterfaceNode>::iterator iterDI;
7262 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
7264 iterDI->Vckt_ramp = iterDI->Vckt_old + (iterDI->Vckt_delta)*alpha;
7267 if ((iterDI->Vckt_delta > 0 && iterDI->Vckt_ramp > iterDI->Vckt_final) ||
7268 (iterDI->Vckt_delta <= 0 && iterDI->Vckt_ramp <= iterDI->Vckt_final) )
7270 iterDI->Vckt_ramp = iterDI->Vckt_final;
7272 #ifdef Xyce_NEW_PDE_CONTINUATION
7274 iterDI->Vckt_old = iterDI->Vckt_final;
7278 if (DEBUG_DEVICE && isActive(Diag::DEVICE_PARAMETERS))
7281 Xyce::dout().width(10);
7282 Xyce::dout() <<iterDI->eName;
7283 Xyce::dout() <<
"\tVckt_ramp = " << iterDI->Vckt_ramp;
7284 Xyce::dout() <<
"\tVckt_old = " << iterDI->Vckt_old;
7285 Xyce::dout() <<
"\talpha = " << alpha;
7286 Xyce::dout() << std::endl;
7303 Xyce::dout() << section_divider << std::endl;
7304 Xyce::dout() <<
"Instance::setPDEContinuationBeta" << std::endl;
7308 std::vector<DeviceInterfaceNode>::iterator firstDI =
dIVec.begin();
7309 std::vector<DeviceInterfaceNode>::iterator lastDI =
dIVec.end ();
7310 std::vector<DeviceInterfaceNode>::iterator iterDI;
7312 for (iterDI=firstDI;iterDI!=lastDI;++iterDI)
7314 iterDI->Vckt_ramp = iterDI->Vckt*beta;
7317 Xyce::dout() <<
" " << iterDI->eName <<
" Vckt_ramp = " << iterDI->Vckt_ramp << std::endl;
7333 .registerDevice(
"pde", 2)
7334 .registerModelType(
"pde", 2)
7335 .registerModelType(
"zod", 2);
const InstanceName & getName() const
bool calcBoundaryConditions()
std::vector< double > RVec
std::vector< double > displPotential
double Jn(double n1, double n2, double E, double u, double h)
std::vector< int > neighborNodes
std::vector< int > li_stateDispl
bool updateDependentParameters()
double getNi_old(const std::string &material, double temp)
std::vector< int > stateDispl_owned
double dJndV2(double n1, double n2, double E, double u, double h)
const SolverState & solverState_
static double ngdep(double x, double y, double W, double ax, double ay)
std::vector< int > nnOwnVec
Descriptor & addPar(const char *parName, T default_value, T U::*varPtr)
Adds the parameter description to the parameter map.
Linear::System * lasSysPtr
static ParametricData< DopeInfo > & getParametricData()
bool scaleDopeVariables()
void setPDEContinuationAlpha(double alpha)
std::vector< double > CVec
bool enablePDEContinuation(int &max_PDE_continuation_steps)
Linear::Vector * nextSolVectorPtr
std::vector< int > devConMap
std::vector< double > & vals
std::vector< std::vector< int > > li_VoffsetArray
std::vector< int > li_Vrowarray
bool given(const std::string ¶meter_name) const
static double nsdep(double x, double W, double Dt)
Pure virtual class to augment a linear system.
std::vector< int > Vrowarray
std::vector< double > CdonorVec
double Jp(double p1, double p2, double E, double u, double h)
bool calcConductance(int iElectrode, const Linear::Vector *dxdvPtr)
bool loadMatKCLDDForm(Linear::Matrix *matPtr)
bool updateSecondaryState()
std::vector< double > upE_Vec
std::vector< double > dJndn1Vec
std::vector< int > npOwnVec
std::vector< double > totSrcVec
bool labelEdgeType(std::string &labelName)
double pdRaugN(const std::string &material, double ni, double n, double p)
std::vector< int > Nrowarray
std::vector< double > EfieldVec
double calcLt(bool holeFlag, double conc)
std::vector< int > boundarySten
std::vector< double > dJpdn2Vec
Linear::Vector * tmpdQdXPtr
static ParametricData< PDE_2DElectrode > & getParametricData()
std::map< std::string, int > labelDIMap
bool checkForElectrodeOverlap()
double calcRaug(const std::string &material, double ni, double n, double p)
Linear::Vector * tmpdIdXPtr
double getRelPerm(const std::string &material)
double workfunc(std::string &metal)
double bandgap(const std::string &material, double temp)
bool scaleMesh(double xScale)
bool loadDFDV(int ielectrode, Linear::Vector *dfdvPtr)
PDE_2DMesh * meshCopyContainerPtr
std::vector< std::vector< int > > li_PoffsetArray
std::vector< double > dJpdn1Vec
const std::string & getName(const C *c)
Returns the name of the specified object.
CompositeParam * constructComposite(const std::string &compositeName, const std::string ¶mName)
double dJpdV2(double p1, double p2, double E, double u, double h)
std::vector< std::string > labelNameVector
void setParams(const std::vector< Param > ¶ms)
std::vector< std::vector< int > > Vcolarray
std::vector< double > xVec
The FactoryBlock contains parameters needed by the device, instance and model creation functions...
const DeviceOptions & getDeviceOptions() const
std::vector< int > li_Nrowarray
std::vector< double > dJndV1Vec
Instance(const Configuration &configuration, const InstanceBlock &IB, Model &model, const FactoryBlock &factory_block)
void addComposite(const char *comp_name, const ParametricData< U > &composite_pars, std::map< std::string, U * > V::*composite_map)
Adds a composite parameter to the parameter map.
std::vector< double > dJpdV2Vec
bool applyVoltageLimiting()
std::vector< double > nnVec
void setPDEContinuationBeta(double beta)
const DeviceOptions & deviceOptions_
std::vector< std::vector< double > > condVec
std::vector< double > tnVec
bool loadVecNLPoisson(double scalar, Linear::Vector *vecPtr)
std::vector< double > VVec
bool updateTemperature(const double &temp_tmp)
bool updatePrimaryState()
Linear::Vector * nextStaVectorPtr
bool pdTerminalCurrents()
static Config< T > & addConfiguration()
Adds the device to the Xyce device configuration.
static Device * factory(const Configuration &configuration, const FactoryBlock &factory_block)
std::vector< double > displCurrent
bool calcTerminalCharges()
void setupInfo2d(std::vector< double > &CVec, std::vector< double > &CdonorVec, std::vector< double > &CacceptorVec, std::vector< double > &xVec, std::vector< double > &yVec, DeviceSupport &devSup)
std::vector< double > unVec
double getVoltDepElecDens(double Vmax, double V, double Nd)
double dJndn2(double n1, double n2, double E, double u, double h)
double calcRsrh(const std::string &material, double ni, double n, double p, double tn, double tp)
The Device class is an interface for device implementations.
bool unScaleDopeVariables()
double dJpdn2(double p1, double p2, double E, double u, double h)
bool obtainNodeVoltages()
std::vector< double > dJndn2Vec
std::vector< double > CacceptorVec
bool disablePDEContinuation()
std::vector< double > dRdnVec
std::map< std::string, PDE_2DElectrode * > electrodeMap
std::vector< int > stateDispl
std::vector< DeviceInterfaceNode > dIVec
bool updateIntermediateVars()
Class Configuration contains device configuration data.
double pdRsrhN(const std::string &material, double ni, double n, double p, double tn, double tp)
double pdRaugP(const std::string &material, double ni, double n, double p)
static void loadInstanceParameters(ParametricData< Instance > &instance_parameters)
std::vector< double > dJndV2Vec
bool loadVecDDForm(double scalar, double dndtScalar, Linear::Vector *vecPtr)
std::vector< double > JpVec
std::vector< double > dFdVckt
const SolverState & getSolverState() const
std::map< std::string, DopeInfo * > dopeInfoMap
double affin(const std::string &material)
double dJpdV1(double p1, double p2, double E, double u, double h)
std::vector< double > yVec
std::vector< double > npVec
double dJndV1(double n1, double n2, double E, double u, double h)
bool loadMatNLPoisson(Linear::Matrix *matPtr)
PDE_2DMesh * meshContainerPtr
std::vector< int > mNodeVector
std::vector< double > unE_Vec
bool loadMatCktTrivial(Linear::Matrix *matPtr)
ScalarT calcMob(MobInfo< ScalarT > &min)
std::vector< int > li_Prowarray
std::vector< int > vOwnVec
double dJpdn1(double p1, double p2, double E, double u, double h)
static const int MAX_COLS_PER_ROW
std::vector< double > upVec
bool outputTecplotVectors()
double getVoltDepHoleDens(double Vmin, double V, double Na)
const ExternData & extData
bool calcElectronCurrent()
bool setupMiscConstants()
double getNi(const std::string &material, double temp)
Manages parameter binding for class C.
std::vector< int > Prowarray
bool setupBoundaryStencil()
bool loadMatDDForm(double dndtScalar, Linear::Matrix *matPtr)
InstanceBlock represent a device instance line from the netlist.
std::vector< Param > params
std::vector< double > dRdpVec
std::vector< int > & cols
double pdRsrhP(const std::string &material, double ni, double n, double p, double tn, double tp)
std::vector< std::vector< double > > capVec
bool calcTerminalCurrents()
std::vector< std::vector< int > > li_NoffsetArray
std::vector< double > SVec
CompositeParam is the base class for classes that wish to only manage the processing of parameter dat...
Linear::Vector * nextStaDerivVectorPtr
bool getDopingVector(std::vector< double > &cvec_tmp)
std::vector< double > JnVec
std::vector< double > tpVec
double dJndn1(double n1, double n2, double E, double u, double h)
bool calcVoltDepDensities()
bool enableContinuationCalled
std::vector< EDGEINFO > edgeInfoVector
std::vector< double > dJpdV1Vec