Xyce  6.1
N_DEV_NumericalJacobian.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_NumericalJacobian.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Eric Keiter
33 //
34 // Creation Date : 4/30/02
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.30.2.1 $
40 //
41 // Revision Date : $Date: 2015/04/02 18:20:09 $
42 //
43 // Current Owner : $Author: tvrusso $
44 //-------------------------------------------------------------------------
45 
46 #ifndef N_DEV_NUMERICAL_JACOBIAN_H
47 #define N_DEV_NUMERICAL_JACOBIAN_H
48 
49 // ---------- Standard Includes ----------
50 #include <list>
51 #include <vector>
52 #include <iosfwd>
53 
54 // ---------- Xyce Includes ----------
55 #include <N_DEV_fwd.h>
56 
57 // ---------- Forward Declarations ----------
58 class index_pair;
59 
60 namespace Xyce {
61 namespace Device {
62 
63 class colData;
64 class valData;
65 
66 //-----------------------------------------------------------------------------
67 // Class : NumericalJacobian
68 // Purpose :
69 // Special Notes :
70 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
71 // Creation Date : 4/30/02
72 //-----------------------------------------------------------------------------
74 {
75 public:
77  MatrixLoadData & mlData1,
78  const SolverState &ss1,
79  const ExternData &ed1,
80  const DeviceOptions & do1);
81 
82  NumericalJacobian (const NumericalJacobian & right);
83 
85 
86  bool testDAEMatrices(DeviceInstance & instance, const std::vector<const std::string *> & nameVec);
87 
88  void loadLocalDAEVectors (DeviceInstance & instance);
89 
90  void printJacobian_(
91  std::ostream & os,
92  const DeviceInstance & instance,
93  const std::vector<const std::string *> & nameVec,
94  bool failed);
95 
96  void testDebugHead
97  ( DeviceInstance & instance,
98  const std::vector<const std::string *> & nameVec,
99  int i, double dX);
100 
101  void testDebugOut
102  ( DeviceInstance & instance,
103  const std::vector<const std::string *> & nameVec,
104  int i,int j);
105 
106  void testDebugTail
107  ( DeviceInstance & instance, const std::vector<const std::string *> & nameVec);
108 
109  void mergeTest(DeviceInstance & instance);
110 
111 public:
113 
114  std::vector<int> & cols;
115  std::vector<double> & vals;
116  std::vector<double> & Qvals;
117 
118  std::vector<valData> & val_local;
119  std::vector<valData> & Qval_local;
120  std::vector<colData> & col_local;
121  std::vector<int> & row_local;
122  std::vector<int> & internalFlag;
123 
127 
128  int maxCols;
129 };
130 
131 } // namespace Device
132 } // namespace Xyce
133 
134 #endif
Pure virtual class to augment a linear system.
void testDebugOut(DeviceInstance &instance, const std::vector< const std::string * > &nameVec, int i, int j)
void mergeTest(DeviceInstance &instance)
void printJacobian_(std::ostream &os, const DeviceInstance &instance, const std::vector< const std::string * > &nameVec, bool failed)
NumericalJacobian(MatrixLoadData &mlData1, const SolverState &ss1, const ExternData &ed1, const DeviceOptions &do1)
bool testDAEMatrices(DeviceInstance &instance, const std::vector< const std::string * > &nameVec)
void testDebugHead(DeviceInstance &instance, const std::vector< const std::string * > &nameVec, int i, double dX)
void testDebugTail(DeviceInstance &instance, const std::vector< const std::string * > &nameVec)
void loadLocalDAEVectors(DeviceInstance &instance)