Xyce  6.1
N_DEV_MatrixLoadData.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-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_MatrixLoadData.h,v $
27 //
28 // Purpose :
29 //
30 //
31 // Special Notes :
32 //
33 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
34 //
35 // Creation Date : 04/30/02
36 //
37 // Revision Information:
38 // ---------------------
39 //
40 // Revision Number: $Revision: 1.20.2.1 $
41 //
42 // Revision Date : $Date: 2015/04/02 18:20:09 $
43 //
44 // Current Owner : $Author: tvrusso $
45 //-----------------------------------------------------------------------------
46 
47 
48 #ifndef Xyce_N_DEV_MatrixLoadData_h
49 #define Xyce_N_DEV_MatrixLoadData_h
50 
51 #include <vector>
52 
53 namespace Xyce {
54 namespace Device {
55 
56 class colData;
57 class valData;
58 
59 //-----------------------------------------------------------------------------
60 // Class : MatrixLoadData
61 // Purpose :
62 // Special Notes :
63 // Creator : Eric Keiter, SNL, Parallel Computational Sciences
64 // Creation Date : 4/30/02
65 //-----------------------------------------------------------------------------
67 {
68 public:
69  MatrixLoadData ();
70 
71  MatrixLoadData (const MatrixLoadData & right);
72 
73  ~MatrixLoadData ();
74 
75  bool initializeAll (int isizeTmp = 100);
76 
77  void resizeTestJacSolData(int size);
78  void resizeTestJacQData(int size);
79  void resizeTestJacStateData(int size);
80 
81 public:
82  int isize;
84 
85  // temporary jacobian load structures:
86  std::vector<int> cols;
87  std::vector<double> vals;
88  std::vector<double> Qvals;
89 
90  // temporary numerical jacobian load structures:
91  std::vector<valData> val_local;
92  std::vector<valData> Qval_local;
93  std::vector<colData> col_local;
94  std::vector<int> row_local;
95  std::vector<int> internalFlag;
96 
97  // Structures used by the "testJacobian" function.
98  std::vector<std::vector<double> > numJac;
99  std::vector< std::vector<double> > saveJac;
100  std::vector< std::vector<double> > devJac;
101  std::vector< std::vector<double> > diffJac;
102  std::vector< std::vector<double> > relJac;
103 
104  std::vector<std::vector<double> > numJacQ;
105  std::vector< std::vector<double> > saveJacQ;
106  std::vector< std::vector<double> > devJacQ;
107  std::vector< std::vector<double> > diffJacQ;
108  std::vector< std::vector<double> > relJacQ;
109 
110  std::vector<std::vector<int> > status;
111  std::vector<std::vector<int> > stencil;
112  std::vector<std::vector<int> > statusQ;
113 
114  std::vector<double> saveRHS;
115  std::vector<double> pertRHS;
116  std::vector<double> origRHS;
117  std::vector<double> saveQ;
118  std::vector<double> pertQ;
119  std::vector<double> origQ;
120 
121  std::vector<double> saveSoln;
122  std::vector<double> pertSoln;
123  std::vector<double> saveCurrSoln;
124 
125  std::vector<double> saveLastState;
126  std::vector<double> saveCurrState;
127  std::vector<double> saveNextState;
128  std::vector<double> saveStateDerivs;
129 };
130 
131 //-----------------------------------------------------------------------------
132 // Class : colData
133 // Purpose : This class contains a vector of column indices.
134 // Special Notes :
135 // Creator : Eric Keiter
136 // Creation Date : 04/23/02
137 //-----------------------------------------------------------------------------
138 class colData
139 {
140 public:
141  colData (int isizeTmp = 100):
142  isize(isizeTmp), col()
143  { col.reserve(isizeTmp); }
144 
145 public:
146  int isize;
147  std::vector<int> col;
148 };
149 
150 //-----------------------------------------------------------------------------
151 // Class : valData
152 // Purpose : This class contains a vector of value indices.
153 // Special Notes :
154 // Creator : Eric Keiter
155 // Creation Date : 04/30/02
156 //-----------------------------------------------------------------------------
157 class valData
158 {
159 private:
160 protected:
161 public:
162  valData (int isizeTmp = 100):
163  isize(isizeTmp), val() { val.reserve(isizeTmp); }
164 
165 private:
166 protected:
167 public:
168  int isize;
169  std::vector<double> val;
170 };
171 
172 } // namespace Device
173 } // namespace Xyce
174 
175 #endif
176 
std::vector< double > saveStateDerivs
std::vector< double > val
std::vector< valData > Qval_local
Pure virtual class to augment a linear system.
std::vector< double > saveLastState
std::vector< std::vector< double > > numJac
std::vector< std::vector< double > > devJac
std::vector< std::vector< int > > statusQ
std::vector< std::vector< double > > diffJacQ
std::vector< std::vector< int > > status
std::vector< colData > col_local
std::vector< std::vector< double > > relJacQ
std::vector< std::vector< double > > saveJac
std::vector< double > saveCurrSoln
std::vector< double > saveCurrState
std::vector< std::vector< double > > saveJacQ
bool initializeAll(int isizeTmp=100)
std::vector< std::vector< double > > devJacQ
std::vector< std::vector< int > > stencil
std::vector< std::vector< double > > relJac
std::vector< std::vector< double > > numJacQ
std::vector< double > saveNextState
std::vector< valData > val_local
std::vector< std::vector< double > > diffJac