Xyce  6.1
N_DEV_SolverState.C
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2015 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-----------------------------------------------------------------------------
24 
25 //-----------------------------------------------------------------------------
26 // Filename : $RCSfile: N_DEV_SolverState.C,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
33 //
34 // Creation Date : 08/25/03
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.51.2.1 $
40 //
41 // Revision Date : $Date: 2015/04/02 18:20:09 $
42 //
43 // Current Owner : $Author: tvrusso $
44 //-----------------------------------------------------------------------------
45 
46 #include <Xyce_config.h>
47 
48 #include <iostream>
49 
50 #include <N_UTL_Expression.h>
51 #include <N_ERH_fwd.h>
52 #include <N_DEV_SolverState.h>
53 
54 namespace Xyce {
55 namespace Device {
56 
57 //-----------------------------------------------------------------------------
58 // Function : SolverState::SolverState
59 // Purpose : constructor
60 // Special Notes :
61 // Scope : public
62 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
63 // Creation Date : 08/25/03
64 //-----------------------------------------------------------------------------
66  pdt (0.0),
67  currTimeStep (0.0),
68  lastTimeStep (0.0),
69  currTime (0.0),
70  finalTime (0.0),
71  startingTimeStep (0.0),
72  bpTol (0.0),
73  acceptedTime (0.0),
74  currentOrder (0.0),
75  usedOrder (0.0), // BNB, integration order for 2-level stamp
76  currFastTime (0.0),
77  finalFastTime (0.0),
78  currentHoldTime (0.0),
79  mpdeOnFlag (false),
80  blockAnalysisFlag(false),
81  forceFinalOutput (false),
82  doubleDCOPEnabled(false),
83  doubleDCOPStep (0),
84  timeStepNumber (0),
85  ltraTimeIndex (0),
86  ltraTimeHistorySize (0),
87  ltraDoCompact (false),
88  initTranFlag (false),
89  sweepSourceResetFlag(false),
90  beginIntegrationFlag(true),
91  dcopFlag (true),
92  inputOPFlag (false),
93  transientFlag (true),
94  dcsweepFlag (false),
95  tranopFlag (true),
96  acopFlag (false),
97  PDESystemFlag (false),
98  newtonIter (0),
99  locaEnabledFlag (false),
100  continuationStepNumber (0),
101  firstContinuationParam (true),
102  firstSolveComplete (false),
103  initJctFlag (false),
104  initFixFlag (false),
105  debugTimeFlag (false),
106  twoLevelNewtonCouplingMode (Nonlinear::FULL_PROBLEM),
107  PDEcontinuationFlag(false),
108  pdeAlpha (1.0),
109  chargeAlpha (1.0),
110  chargeHomotopy (false),
111  maxPDEContinuationSteps(10),
112  currPDEContinuationStep(0),
113  prevPDEContinuationStep(0),
114  artParameterFlag(false),
115  sizeParameterFlag(false),
116  gainScale (1, 1.0),
117  nltermScale (1.0),
118  sizeScale (1.0),
119  previousSizeScale (1.0),
120  bjtArtParameterFlag(false),
121  ACspecified(false),
122  OPspecified(false),
123  HBspecified(false)
124 {}
125 
126 
127 //-----------------------------------------------------------------------------
128 // Function : SolverState::InitializeHomotopyBlockSize
129 // Purpose : constructor
130 // Special Notes :
131 // Scope : public
132 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
133 // Creation Date : 08/25/03
134 //-----------------------------------------------------------------------------
136 {
137  gainScale.resize(numBlocks, 1.0);
138 }
139 
140 
141 //-----------------------------------------------------------------------------
142 // Function : SolverState::operator<<
143 // Purpose : "<<" operator
144 // Special Notes :
145 // Scope : public
146 // Creator : Eric R. Keiter, SNL, Electrical and Microsystems Modeling
147 // Creation Date : 10/05/2005
148 //-----------------------------------------------------------------------------
149 std::ostream& operator<<(std::ostream & os, const SolverState & ss)
150 {
151 
152  os << section_divider << std::endl;
153  os << " Device Package Solver State:" << std::endl;
154 
155  os << " pdt = " << ss.pdt << std::endl;
156  os << " currTimeStep = " << ss.currTimeStep << std::endl;
157  os << " lastTimeStep = " << ss.lastTimeStep << std::endl;
158  os << " currTime = " << ss.currTime << std::endl;
159  os << " finalTime = " << ss.finalTime << std::endl;
160  os << " startingTimeStep = " << ss.startingTimeStep << std::endl;
161  os << " bpTol = " << ss.bpTol << std::endl;
162 
163  os << " acceptedTime = " << ss.acceptedTime << std::endl;
164  os << " currentOrder = " << ss.currentOrder << std::endl;
165  os << " usedOrder = " << ss.usedOrder << std::endl;
166 
167  os << " mpdeOnFlag = ";
168  if (ss.mpdeOnFlag)
169  {
170  os << "yes" << std::endl;
171  os << " currFastTime = " << ss.currFastTime << std::endl;
172  os << " finalFastTime = " << ss.finalFastTime << std::endl;
173  os << " blockAnalysisFlag = " << ss.blockAnalysisFlag << std::endl;
174  }
175  else
176  {
177  os << "no" << std::endl;
178  }
179 
180  os << " timeStepNumber = " << ss.timeStepNumber << std::endl;
181  os << " ltraTimeIndex = " << ss.ltraTimeIndex << std::endl;
182  os << " ltraTimeStepHistorySize = " << ss.ltraTimeHistorySize << std::endl;
183  os << " ltraDoCompact = " << ss.ltraDoCompact << std::endl;
184  os << " newtonIter = " << ss.newtonIter << std::endl;
185  os << " continuationStepNumber = " << ss.continuationStepNumber << std::endl;
186  os << " firstContinuationParam = ";
187  if (ss.firstContinuationParam) os << "yes" << std::endl;
188  else os << "no" << std::endl;
189 
190  os << " firstSolveComplete = ";
191  if (ss.firstSolveComplete) os << "yes" << std::endl;
192  else os << "no" << std::endl;
193 
194  os << " initTranFlag = ";
195  if (ss.initTranFlag) os << "yes" << std::endl;
196  else os << "no" << std::endl;
197 
198  os << " beginIntegrationFlag = ";
199  if (ss.beginIntegrationFlag) os << "yes" << std::endl;
200  else os << "no" << std::endl;
201 
202  os << " dcopFlag = ";
203  if (ss.dcopFlag) os << "yes" << std::endl;
204  else os << "no" << std::endl;
205 
206  os << " inputOPFlag = ";
207  if (ss.inputOPFlag) os << "yes" << std::endl;
208  else os << "no" << std::endl;
209 
210  os << " transientFlag = ";
211  if (ss.transientFlag) os << "yes" << std::endl;
212  else os << "no" << std::endl;
213 
214  os << " dcsweepFlag = ";
215  if (ss.dcsweepFlag) os << "yes" << std::endl;
216  else os << "no" << std::endl;
217 
218  os << " tranopFlag = ";
219  if (ss.tranopFlag) os << "yes" << std::endl;
220  else os << "no" << std::endl;
221 
222  os << " acopFlag = ";
223  if (ss.acopFlag) os << "yes" << std::endl;
224  else os << "no" << std::endl;
225 
226  os << " PDESystemFlag = ";
227  if (ss.PDESystemFlag) os << "yes" << std::endl;
228  else os << "no" << std::endl;
229 
230  os << " locaEnabledFlag = ";
231  if (ss.locaEnabledFlag) os << "yes" << std::endl;
232  else os << "no" << std::endl;
233 
234  os << " initJctFlag = ";
235  if (ss.initJctFlag) os << "yes" << std::endl;
236  else os << "no" << std::endl;
237 
238  os << " initFixFlag = ";
239  if (ss.initFixFlag) os << "yes" << std::endl;
240  else os << "no" << std::endl;
241 
242  os << " sweepSourceResetFlag = ";
243  if (ss.sweepSourceResetFlag) os << "yes" << std::endl;
244  else os << "no" << std::endl;
245 
246  os << " debugTimeFlag = ";
247  if (ss.debugTimeFlag) os << "yes" << std::endl;
248  else os << "no" << std::endl;
249 
250  os << section_divider << std::endl;
251  os << std::endl;
252 
253  return os;
254 }
255 
256 } // namespace Device
257 } // namespace Xyce
258 
Pure virtual class to augment a linear system.
void initializeHomotopyBlockSize(int numBlocks)
std::vector< double > gainScale
std::ostream & operator<<(std::ostream &os, const Configuration &configuration)
Definition: N_DEV_Dump.C:134