Xyce  6.1
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-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 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.10.2.1 $
41 //
42 // Revision Date : $Date: 2015/04/02 18:20:17 $
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_RCP.hpp"
55 #include <N_IO_InitialConditions.h>
56 
57 #include <N_UTL_fwd.h>
58 
59 class Epetra_MapColoring;
60 
61 //-----------------------------------------------------------------------------
62 // Class : N_NLS::NOX::AugmentLinSysIC_Gmin
63 // Purpose : Handles matrix augmentation to support .IC statements, if
64 // gmin stepping is also being applied.
65 // Creator : Eric R. Keiter, SNL, Electrical and Microsystems modeling.
66 // Creation Date : 04/29/2012
67 //-----------------------------------------------------------------------------
68 namespace Xyce {
69 namespace Nonlinear {
70 namespace N_NLS_NOX {
71 
73 
74  public:
75  enum NodeListType {
78  };
79 
80  public:
81  //! Ctor.
83  ( Xyce::IO::InitialConditionsData::NodeNamePairMap & op_in,
84  const Teuchos::RCP <Epetra_MapColoring>& ICcolor_map,
85  const std::vector<int>& vnodeGIDVec,
86  Xyce::Linear::Vector* cloneVector,
87  double scaledEndValue,
88  double resCond);
89 
90  //! Ctor.
92  ( Xyce::IO::InitialConditionsData::NodeNamePairMap & op_in,
93  const Teuchos::RCP <Epetra_MapColoring>& ICcolor_map,
94  const Teuchos::RCP <Epetra_MapColoring>& GMINcolor_map,
95  Xyce::Linear::Vector* cloneVector,
96  double scaledEndValue,
97  double resCond);
98 
99  //! Dtor.
101 
102  void setProgressVariable(double dummy);
103 
104  void augmentResidual(const Xyce::Linear::Vector * solution,
105  Xyce::Linear::Vector * residual_vector);
106 
107  void augmentJacobian(Xyce::Linear::Matrix * jacobian);
108 
109  private:
110 
111  //! Type of list we are using.
113 
114  //! Conductance.
115  double conductance_;
116 
117  //! low end of the exponential term.
119 
120  //! residual value of the conductance. Should almost always be zero
122 
123  //! List of voltage node GIDs.
124  const std::vector<int> vnodeGIDVec_;
125 
126  //! map of specified variables
127  Xyce::IO::InitialConditionsData::NodeNamePairMap & op_;
128 
129  //! Color 0 are the voltage unknowns.
130  //! For the IC color map, the voltage nodes attached to
131  //! independent voltage sources are not included.
132  Teuchos::RCP<Epetra_MapColoring> ICcolor_map_;
133  Teuchos::RCP<Epetra_MapColoring> GMINcolor_map_;
134 
135  //! Temporary vectors used to store diagonal.
136  Xyce::Linear::Vector* vecptr1_;
137  Xyce::Linear::Vector* vecptr2_;
138 
139 };
140 
141 }}}
142 
143 #endif
144 
Xyce::IO::InitialConditionsData::NodeNamePairMap & op_
map of specified variables
Pure virtual class to augment a linear system.
void augmentResidual(const Xyce::Linear::Vector *solution, Xyce::Linear::Vector *residual_vector)
Augments the Residual.
Xyce::Linear::Vector * vecptr1_
Temporary vectors used to store diagonal.
double residualConductance_
residual value of the conductance. Should almost always be zero
const std::vector< int > vnodeGIDVec_
List of voltage node GIDs.
AugmentLinSysIC_Gmin(Xyce::IO::InitialConditionsData::NodeNamePairMap &op_in, const Teuchos::RCP< Epetra_MapColoring > &ICcolor_map, const std::vector< int > &vnodeGIDVec, Xyce::Linear::Vector *cloneVector, double scaledEndValue, double resCond)
Ctor.
Teuchos::RCP< Epetra_MapColoring > ICcolor_map_
Color 0 are the voltage unknowns.
void augmentJacobian(Xyce::Linear::Matrix *jacobian)
Augments the Jacobian.
void setProgressVariable(double dummy)
Set the progress variable (time step size for pseudo transient).