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.68.2.1 $
46
//
47
// Revision Date : $Date: 2014/02/26 20:16:30 $
48
//
49
// Current Owner : $Author: tvrusso $
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_NLS_TwoLevelEnum.h
>
62
#include <
N_NLS_NonLinInfo.h
>
63
#include <
N_TIA_TimeIntInfo.h
>
64
65
namespace
Xyce {
66
namespace
Device {
67
68
//-----------------------------------------------------------------------------
69
// Class : SolverState
70
// Purpose : Container for current solver data.
71
// Special Notes :
72
// Creator : Eric Keiter, SNL, Parallel Computational Sciences
73
// Creation Date : 2/25/02
74
//-----------------------------------------------------------------------------
75
class
SolverState
76
{
77
friend
std::ostream&
operator<<
(std::ostream& os,
const
SolverState
& ss);
78
79
public
:
80
SolverState
();
81
82
void
InitializeHomotopyBlockSize
(
int
numBlocks);
83
84
public
:
85
double
pdt
;
// alpha/dt
86
double
currTimeStep
;
87
double
lastTimeStep
;
88
double
currTime
;
89
double
finalTime
;
90
double
startingTimeStep
;
91
double
bpTol
;
92
double
acceptedTime
;
// for habanero
93
double
currentOrder
,
usedOrder
;
// BNB, integration order for 2-level stamp
94
95
std::vector<double>
timePoints
;
96
97
// MPDE stuff
98
double
currFastTime
;
99
double
finalFastTime
;
100
double
currentHoldTime
;
// this is the time the slow sources should use to evalulate
101
// their value during an MPDE initial conditon (typically zero, but
102
// it can be anything).
103
bool
mpdeOnFlag
;
// This indicates the MPDE phase of the problem (ie not initial condition)
104
bool
blockAnalysisFlag
;
// This indicates an MPDE/HB run. This is true during both IC and MPDE/HB phase.
105
106
mutable
std::map<std::string, double>
global_params
;
107
std::vector<Util::Expression>
global_expressions
;
108
std::vector<std::string>
global_exp_names
;
109
110
// output flag:
111
bool
forceFinalOutput
;
112
113
bool
doubleDCOPEnabled
;
// true if taking 2 DCOP steps for PDE sim.
114
int
doubleDCOPStep
;
// 0 or 1. (first or second "double" DCOP).
115
116
int
timeStepNumber
;
117
118
// The following "ltra*" data structures are used to track time history for
119
// the LTRA device. It requires an independent time history because
120
// it can be compacted if the user specifies that option. With no
121
// compaction ltraTimeStepNumber will be equal to timeStepNumber+1.
122
size_t
ltraTimeIndex
;
123
size_t
ltraTimeHistorySize
;
124
mutable
bool
ltraDoCompact
;
125
std::vector<double>
ltraTimePoints
;
126
127
int
newtonIter
;
128
int
stepLoopIter
;
129
int
continuationStepNumber
;
130
bool
firstContinuationParam
;
131
bool
firstSolveComplete
;
132
133
bool
initTranFlag
;
// true only on very first(t=0) time step.
134
bool
beginIntegrationFlag
;
// true if 1st time step out of breakpoint (incl. t=0)
135
136
bool
dcopFlag
;
// true if we are in a DCOP calculation
137
// (sweep, tranop or OP)
138
bool
inputOPFlag
;
// true if starting from a previous OP calculation
139
140
bool
transientFlag
;
// true if transient analysis(even during tranop)
141
bool
dcsweepFlag
;
// true if DC Sweep or OP calculation.
142
bool
tranopFlag
;
// true if in dcop phase of transient sim.
143
bool
acopFlag
;
// true if in acop phase of ac sim.
144
bool
PDESystemFlag
;
// true if circuit includes a PDE device.
145
146
bool
locaEnabledFlag
;
// true if LOCA is enabled for DCOP.
147
148
bool
initJctFlag
;
// true if on the first newton step of the
149
// first dcop solve of the first .STEP iteration.
150
151
bool
initFixFlag
;
// true if DCOP solve, not first iteration *AND*
152
// any device not converged. Allows "OFF" to be
153
// applied.
154
155
bool
sweepSourceResetFlag
;
156
bool
debugTimeFlag
;
157
158
TwoLevelNewtonMode
twoLevelNewtonCouplingMode
;
159
160
// pde device BC homotopy/ two-level newton
161
double
pdeAlpha
;
162
bool
PDEcontinuationFlag
;
// if true, continuation is being used.
163
mutable
int
maxPDEContinuationSteps
;
164
int
currPDEContinuationStep
;
// this may become obsolete...
165
int
prevPDEContinuationStep
;
166
167
bool
chargeHomotopy
;
168
double
chargeAlpha
;
169
170
// mosfet homotopy variables:
171
bool
artParameterFlag
;
172
std::vector<double>
gainScale
;
173
double
nltermScale
;
174
175
bool
sizeParameterFlag
;
176
double
sizeScale
;
177
double
previousSizeScale
;
178
179
// BJT homotopy variables
180
bool
bjtArtParameterFlag
;
181
182
// 2-level info:
183
N_TIA_TimeIntInfo
tiInfo
;
184
N_NLS_NonLinInfo
nlInfo
;
185
186
// analysis options (for now bools that say what type of "." line was present in netlist)
187
bool
ACspecified
;
188
bool
MORspecified
;
189
bool
TRANspecified
;
190
bool
DCspecified
;
191
bool
STEPspecified
;
192
bool
OPspecified
;
193
bool
MPDEspecified
;
194
bool
HBspecified
;
195
};
196
197
}
// namespace Device
198
}
// namespace Xyce
199
200
typedef
Xyce::Device::SolverState
N_DEV_SolverState
;
201
202
#endif
203
src
DeviceModelPKG
Core
include
N_DEV_SolverState.h
Generated on Mon Mar 24 2014 10:54:39 for Xyce by
1.8.3.1