Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_NLS_NOX_AugmentLinSys_IC_Gmin.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 PARTIC_GminULAR 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_NLS_NOX_AugmentLinSys_IC_Gmin.h,v $
27 //
28 // Purpose : Concrete class for augmenting the Jacobian for
29 // .IC simulations (initial condition) with gmin stepping.
30 //
31 // Special Notes :
32 //
33 // Creator : Eric R. Keiter
34 //
35 // Creation Date : 04/29/12
36 //
37 // Revision Information:
38 // ---------------------
39 //
40 // Revision Number: $Revision: 1.6 $
41 //
42 // Revision Date : $Date: 2014/02/24 23:49:24 $
43 //
44 // Current Owner : $Author: tvrusso $
45 //-------------------------------------------------------------------------
46 
47 #ifndef Xyce_N_NLS_NOX_AugmentLinSys_IC_Gmin_h
48 #define Xyce_N_NLS_NOX_AugmentLinSys_IC_Gmin_h
49 
50 #include <vector>
51 #include <set>
52 
53 #include "Teuchos_RefCountPtr.hpp"
55 
56 #include <N_UTL_fwd.h>
57 
58 class Epetra_MapColoring;
59 
60 //-----------------------------------------------------------------------------
61 // Class : N_NLS::NOX::AugmentLinSysIC_Gmin
62 // Purpose : Handles matrix augmentation to support .IC statements, if
63 // gmin stepping is also being applied.
64 // Creator : Eric R. Keiter, SNL, Electrical and Microsystems modeling.
65 // Creation Date : 04/29/2012
66 //-----------------------------------------------------------------------------
67 namespace N_NLS_NOX {
68 
70 
71  public:
72  enum NodeListType {
75  };
76 
77  public:
78  //! Ctor.
80  ( Xyce::NodeNamePairMap & op_in,
81  const Teuchos::RefCountPtr <Epetra_MapColoring>& ICcolor_map,
82  const std::vector<int>& vnodeGIDVec,
83  N_LAS_Vector* cloneVector,
84  double scaledEndValue,
85  double resCond);
86 
87  //! Ctor.
89  ( Xyce::NodeNamePairMap & op_in,
90  const Teuchos::RefCountPtr <Epetra_MapColoring>& ICcolor_map,
91  const Teuchos::RefCountPtr <Epetra_MapColoring>& GMINcolor_map,
92  N_LAS_Vector* cloneVector,
93  double scaledEndValue,
94  double resCond);
95 
96  //! Dtor.
98 
99  void setProgressVariable(double dummy);
100 
101  void augmentResidual(const N_LAS_Vector * solution,
102  N_LAS_Vector * residual_vector);
103 
104  void augmentJacobian(N_LAS_Matrix * jacobian);
105 
106  private:
107 
108  //! Type of list we are using.
110 
111  //! Conductance.
112  double conductance_;
113 
114  //! low end of the exponential term.
116 
117  //! residual value of the conductance. Should almost always be zero
119 
120  //! List of voltage node GIDs.
121  const std::vector<int> vnodeGIDVec_;
122 
123  //! map of specified variables
124  Xyce::NodeNamePairMap & op_;
125 
126  //! Color 0 are the voltage unknowns.
127  //! For the IC color map, the voltage nodes attached to
128  //! independent voltage sources are not included.
129  Teuchos::RefCountPtr<Epetra_MapColoring> ICcolor_map_;
130  Teuchos::RefCountPtr<Epetra_MapColoring> GMINcolor_map_;
131 
132  //! Temporary vectors used to store diagonal.
133  N_LAS_Vector* vecptr1_;
134  N_LAS_Vector* vecptr2_;
135 
136 };
137 
138 }
139 
140 #endif
141