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_DeviceInterfaceNode.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_DeviceInterfaceNode.h,v $
27
//
28
// Purpose :
29
//
30
// Special Notes :
31
//
32
// Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
33
//
34
// Creation Date : 07/08/03
35
//
36
// Revision Information:
37
// ---------------------
38
//
39
// Revision Number: $Revision: 1.15.2.1 $
40
//
41
// Revision Date : $Date: 2014/02/26 20:16:31 $
42
//
43
// Current Owner : $Author: tvrusso $
44
//-----------------------------------------------------------------------------
45
46
#ifndef Xyce_N_DEV_DEVICE_INTERFACE_NODE_h
47
#define Xyce_N_DEV_DEVICE_INTERFACE_NODE_h
48
49
namespace
Xyce {
50
namespace
Device {
51
52
//-----------------------------------------------------------------------------
53
// Class : DeviceInterfaceNode
54
// Purpose : This class contains information about a single circuit node
55
// which is connected to a single device electrode.
56
// Special Notes :
57
// Creator : Eric Keiter
58
// Creation Date : 04/23/02
59
//-----------------------------------------------------------------------------
60
class
DeviceInterfaceNode
61
{
62
private
:
63
protected
:
64
public
:
65
DeviceInterfaceNode
() :
66
eName
(
""
),
nName
(
""
),
index
(-1),
gid
(-1),
given
(false),
67
firstMeshNodeIndex
(-1),
68
stateC
(-1),
stateC_owned
(true),
currentSum
(0.0),
area
(0.0),
69
chargeSum
(0.0),
70
Vckt
(0.0),
Vckt_ramp
(0.0),
Vckt_ramp_old
(0.0),
71
Vckt_old
(0.0),
Vckt_final
(0.0),
Vckt_deltaC
(0.0),
Vckt_delta
(0.0),
72
Vckt_orig
(0.0),
73
dIdVckt
(0.0),
74
dQdVckt
(0.0),
75
neumannBCFlagV
(false),
76
neumannBCFlagN
(false),
77
neumannBCFlagP
(false),
78
numBoundaryPoints
(0),
79
dxdvPtr
(NULL),
80
dxdvAllocated
(false),
81
numCrossTerms
(0),
82
material
(
"neutral"
),
83
materialGiven
(false),
84
oxideBndryFlag
(false),
85
oxthick
(0.0),
86
oxcharge
(0.0)
87
{
88
Vcol
.reserve(20);
89
Ncol
.reserve(20);
90
Pcol
.reserve(20);
91
areaVector
.reserve(20);
92
};
93
94
private
:
95
protected
:
96
public
:
97
std::string
eName
;
// device electrode name. Should be in all upper case.
98
std::string
nName
;
// circuit node name.
99
100
int
index
;
// index w.r.t. the order it was listed in the netlist.
101
102
int
labelIndex
;
// index into the label array.
103
104
int
gid
;
// global ID of the circuit node. This is the global
105
// solution vector index. (used like a Vrowarray entry)
106
107
int
lid
;
// local ID of the circuit node.
108
int
lidOffset
;
// diagonal col in the ckt node matrix row. DMA only.
109
110
std::vector<int>
crossOffsets
;
// columns for the other ckt nodes.
111
112
bool
given
;
// did the user specify this node or not. If not, the
113
// device electrode with be (probably) connected to gnd.
114
115
116
int
firstMeshNodeIndex
;
117
// the mesh index for a single point on the
118
// mesh that is part of this electrode.
119
120
// The "gid" Vcol, Ncol, and Pcol are only really used during the setup
121
// phase, when setting up (row, col) pairs.
122
// As such, they might not be needed.
123
std::vector<int>
Vcol
;
// column array
124
std::vector<int>
Ncol
;
// column array
125
std::vector<int>
Pcol
;
// column array
126
127
// geometrical stuff:
128
double
area
;
// total area for the edge.
129
std::vector<double>
areaVector
;
// area for each edge node
130
131
// state variable stuff:
132
double
currentSum
;
// sum of currents, to be stored as a state variable.
133
int
stateC
;
// state variable index, current.
134
bool
stateC_owned
;
135
136
// capacitance related stuff
137
double
chargeSum
;
// total charge on the electrode.
138
139
//local id's (offsets)
140
int
li_stateC
;
141
142
// number of mesh points for this boundary.
143
int
numBoundaryPoints
;
144
145
// from the circuit node:
146
double
Vckt
;
147
148
// Vckt, before voltage limiting.
149
double
Vckt_orig
;
150
151
// derivative information needed for the 2-level Newton.
152
double
dIdVckt
;
// derivative of currentSum w.r.t. Vckt.
153
double
dQdVckt
;
// derivative of chargeSum w.r.t. Vckt.
154
155
std::vector<double>
dFdVckt
;
// deriv. of residual w.r.t. Vckt.
156
std::vector<int>
neighborNodes
;
// nodes neighboring this boundary.
157
158
std::vector<double>
dQdX
;
// deriv. of chargeSum w.r.t. PDE solution vars.
159
std::vector<double>
dIdX
;
// deriv. of currentSum w.r.t. PDE solution vars.
160
std::vector<int>
dIdXcols
;
// nodes neighboring this boundary.
161
162
std::vector<int>
dIdXoffset
;
// If running with DMA, use this instead of
163
// dIdXcols.
164
165
int
numCrossTerms
;
166
167
// equilibrium voltage at this electrode (if the applied voltage is
168
// zero, there is still an internal voltage drop).
169
std::vector<double>
VequVec
;
170
171
// boundary conditions to be imposed on V,n and p.
172
std::vector<double>
VbcVec
;
173
std::vector<double>
nnbcVec
;
174
std::vector<double>
npbcVec
;
175
176
// dxdv vector:
177
N_LAS_Vector *
dxdvPtr
;
178
bool
dxdvAllocated
;
179
180
// this map is between mesh node ID's and the indices of VbcVec
181
std::map<int,int>
meshGlobalToLocal
;
182
183
// These BC variables are only used for Continuation NL solves.
184
// first 3 are w.r.t change in Vckt between ckt iterations. Big change
185
double
Vckt_old
;
// ckt value from the previous Newton solve.
186
double
Vckt_final
;
// eventual ckt voltage value for the current solve.
187
double
Vckt_delta
;
// total change in the Vckt. (Vckt_final-Vckt_old)
188
189
// next 3, w.r.t change between continuation solves. small change
190
double
Vckt_deltaC
;
// incremental, intermediate change in the Vckt.
191
double
Vckt_ramp
;
// current intermediate value of Vckt used during
192
// continuation.
193
double
Vckt_ramp_old
;
// old intermediate value of Vckt used during
194
// continuation.
195
196
// neumann BC flag;
197
bool
neumannBCFlagV
;
198
bool
neumannBCFlagN
;
199
bool
neumannBCFlagP
;
200
201
// material information:
202
std::string
material
;
203
bool
materialGiven
;
204
bool
oxideBndryFlag
;
205
double
oxthick
;
206
double
oxcharge
;
207
};
208
209
210
}
// namespace Device
211
}
// namespace Xyce
212
213
typedef
Xyce::Device::DeviceInterfaceNode
N_DEV_DeviceInterfaceNode
;
214
215
#endif // Xyce_N_DEV_DEVICE_INTERFACE_NODE_h
216
217
src
DeviceModelPKG
TCADModels
include
N_DEV_DeviceInterfaceNode.h
Generated on Mon Mar 24 2014 10:54:34 for Xyce by
1.8.3.1