Xyce
6.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
N_DEV_SolverState.h
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-2014 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.h,v $
27
//
28
// Purpose : This is a container class for solver information.
29
// It may occasionally contain stuff that isn't strictly
30
// pertaining to the solver state, but that is its primary
31
// intention.
32
//
33
// In general, stuff that goes into this class should
34
// be stuff needed by more than one device instance type.
35
//
36
// Special Notes :
37
//
38
// Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
39
//
40
// Creation Date : 02/28/00
41
//
42
// Revision Information:
43
// ---------------------
44
//
45
// Revision Number: $Revision: 1.72 $
46
//
47
// Revision Date : $Date: 2014/08/07 23:08:52 $
48
//
49
// Current Owner : $Author: dgbaur $
50
//-----------------------------------------------------------------------------
51
52
53
#ifndef Xyce_N_DEV_SolverState_h
54
#define Xyce_N_DEV_SolverState_h
55
56
#include <map>
57
#include <string>
58
#include <vector>
59
60
#include <N_UTL_fwd.h>
61
#include <
N_DEV_fwd.h
>
62
#include <
N_NLS_TwoLevelEnum.h
>
63
#include <
N_NLS_NonLinInfo.h
>
64
#include <
N_TIA_TimeIntInfo.h
>
65
66
namespace
Xyce {
67
namespace
Device {
68
69
struct
Globals
70
{
71
GlobalParameterMap
global_params
;
72
std::vector<Util::Expression>
global_expressions
;
73
std::vector<std::string>
global_exp_names
;
74
};
75
76
//-----------------------------------------------------------------------------
77
// Class : SolverState
78
// Purpose : Container for current solver data.
79
// Special Notes :
80
// Creator : Eric Keiter, SNL, Parallel Computational Sciences
81
// Creation Date : 2/25/02
82
//-----------------------------------------------------------------------------
83
class
SolverState
84
{
85
friend
std::ostream&
operator<<
(std::ostream& os,
const
SolverState
& ss);
86
87
public
:
88
SolverState
();
89
90
void
InitializeHomotopyBlockSize
(
int
numBlocks);
91
92
public
:
93
double
pdt
;
// alpha/dt
94
double
currTimeStep
;
95
double
lastTimeStep
;
96
double
currTime
;
97
double
finalTime
;
98
double
startingTimeStep
;
99
double
bpTol
;
100
double
acceptedTime
;
// for habanero
101
double
currentOrder
,
usedOrder
;
// BNB, integration order for 2-level stamp
102
103
std::vector<double>
timePoints
;
104
105
// MPDE stuff
106
double
currFastTime
;
107
double
finalFastTime
;
108
double
currentHoldTime
;
// this is the time the slow sources should use to evalulate
109
// their value during an MPDE initial conditon (typically zero, but
110
// it can be anything).
111
bool
mpdeOnFlag
;
// This indicates the MPDE phase of the problem (ie not initial condition)
112
bool
blockAnalysisFlag
;
// This indicates an MPDE/HB run. This is true during both IC and MPDE/HB phase.
113
114
// output flag:
115
bool
forceFinalOutput
;
116
117
bool
doubleDCOPEnabled
;
// true if taking 2 DCOP steps for PDE sim.
118
int
doubleDCOPStep
;
// 0 or 1. (first or second "double" DCOP).
119
120
Globals
globals_
;
121
122
Globals
&
getGlobals
()
const
{
123
return
const_cast<
Globals
&
>
(
globals_
);
124
}
125
126
int
timeStepNumber
;
127
128
// The following "ltra*" data structures are used to track time history for
129
// the LTRA device. It requires an independent time history because
130
// it can be compacted if the user specifies that option. With no
131
// compaction ltraTimeStepNumber will be equal to timeStepNumber+1.
132
size_t
ltraTimeIndex
;
133
size_t
ltraTimeHistorySize
;
134
mutable
bool
ltraDoCompact
;
135
std::vector<double>
ltraTimePoints
;
136
137
int
newtonIter
;
138
int
stepLoopIter
;
139
int
continuationStepNumber
;
140
bool
firstContinuationParam
;
141
bool
firstSolveComplete
;
142
143
bool
initTranFlag
;
// true only on very first(t=0) time step.
144
bool
beginIntegrationFlag
;
// true if 1st time step out of breakpoint (incl. t=0)
145
146
bool
dcopFlag
;
// true if we are in a DCOP calculation
147
// (sweep, tranop or OP)
148
bool
inputOPFlag
;
// true if starting from a previous OP calculation
149
150
bool
transientFlag
;
// true if transient analysis(even during tranop)
151
bool
dcsweepFlag
;
// true if DC Sweep or OP calculation.
152
bool
tranopFlag
;
// true if in dcop phase of transient sim.
153
bool
acopFlag
;
// true if in acop phase of ac sim.
154
bool
PDESystemFlag
;
// true if circuit includes a PDE device.
155
156
bool
locaEnabledFlag
;
// true if LOCA is enabled for DCOP.
157
158
bool
initJctFlag
;
// true if on the first newton step of the
159
// first dcop solve of the first .STEP iteration.
160
161
bool
initFixFlag
;
// true if DCOP solve, not first iteration *AND*
162
// any device not converged. Allows "OFF" to be
163
// applied.
164
165
bool
sweepSourceResetFlag
;
166
bool
debugTimeFlag
;
167
168
Nonlinear::TwoLevelNewtonMode
twoLevelNewtonCouplingMode
;
169
170
// pde device BC homotopy/ two-level newton
171
double
pdeAlpha
;
172
bool
PDEcontinuationFlag
;
// if true, continuation is being used.
173
mutable
int
maxPDEContinuationSteps
;
174
int
currPDEContinuationStep
;
// this may become obsolete...
175
int
prevPDEContinuationStep
;
176
177
bool
chargeHomotopy
;
178
double
chargeAlpha
;
179
180
// mosfet homotopy variables:
181
bool
artParameterFlag
;
182
std::vector<double>
gainScale
;
183
double
nltermScale
;
184
185
bool
sizeParameterFlag
;
186
double
sizeScale
;
187
double
previousSizeScale
;
188
189
// BJT homotopy variables
190
bool
bjtArtParameterFlag
;
191
192
// 2-level info:
193
N_TIA_TimeIntInfo
tiInfo
;
194
Nonlinear::NonLinInfo
nlInfo
;
195
196
// analysis options (for now bools that say what type of "." line was present in netlist)
197
bool
ACspecified
;
198
bool
MORspecified
;
199
bool
TRANspecified
;
200
bool
DCspecified
;
201
bool
STEPspecified
;
202
bool
OPspecified
;
203
bool
MPDEspecified
;
204
bool
HBspecified
;
205
};
206
207
}
// namespace Device
208
}
// namespace Xyce
209
210
typedef
Xyce::Device::SolverState
N_DEV_SolverState
;
211
212
#endif
213
src
DeviceModelPKG
Core
include
N_DEV_SolverState.h
Generated on Thu Sep 25 2014 15:20:29 for Xyce by
1.8.3.1