Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_TIA_MPDEInterface.h
Go to the documentation of this file.
1 
2 //-----------------------------------------------------------------------------
3 // Copyright Notice
4 //
5 // Copyright 2002 Sandia Corporation. Under the terms
6 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
7 // Government retains certain rights in this software.
8 //
9 // Xyce(TM) Parallel Electrical Simulator
10 // Copyright (C) 2002-2014 Sandia Corporation
11 //
12 // This program is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program. If not, see <http://www.gnu.org/licenses/>.
24 //-----------------------------------------------------------------------------
25 
26 //-----------------------------------------------------------------------------
27 // Filename : $RCSfile: N_TIA_MPDEInterface.h,v $
28 //
29 // Purpose : This file defines the time integration interface for MPDE
30 //
31 // Special Notes :
32 //
33 // Creator : Todd S. Coffey, 9214
34 //
35 // Creation Date : 03/24/04
36 //
37 // Revision Information:
38 // ---------------------
39 //
40 // Revision Number: $Revision: 1.23 $
41 //
42 // Revision Date : $Date: 2014/02/24 23:49:26 $
43 //
44 // Current Owner : $Author: tvrusso $
45 //-----------------------------------------------------------------------------
46 
47 #ifndef Xyce_TIME_MPDEINTERFACE_H
48 #define Xyce_TIME_MPDEINTERFACE_H
49 
50 // ---------- Standard Includes ----------
51 
52 #include <list>
53 #include <vector>
54 
55 // ---------- Xyce Includes ----------
56 
57 #include <N_UTL_Xyce.h>
58 #include <N_UTL_Misc.h>
59 
60 #include <N_ANP_fwd.h>
61 
62 #include <N_ANP_AnalysisManager.h>
63 #include <N_TIA_StepErrorControl.h>
64 #include <N_TIA_DataStore.h>
65 #include <N_TIA_TIAParams.h>
67 
68 #include <N_LAS_Vector.h>
69 
70 #include <N_IO_PkgOptionsMgr.h>
71 
72 // ---------- Forward Declarations ----------
73 
74 class N_TIA_TIAParams;
76 class N_TIA_DataStore;
78 class N_TIA_TimeIntInfo;
79 
80 //-----------------------------------------------------------------------------
81 // Class : N_TIA_MPDEInterface
82 // Purpose : This is the interface for the time integrator that is
83 // : provided to the MPDE loader.
84 // Special Notes :
85 // Creator : Todd S. Coffey, 9214
86 // Creation Date : 03/24/04
87 //-----------------------------------------------------------------------------
89 {
90 public:
91 
92  // Default donstructor
94 
95  // Destructor
97 
98  // Execution functions:
99 
100  // Method to register the TIA parameters object.
101  bool registerTIAParams(const N_TIA_TIAParams & tiaParams_tmp);
102 
103  // Method to register the TIA Data Store object.
104  bool registerTIADataStore(N_TIA_DataStore * ds_tmp);
105 
106  // Method to register the TIA Control Alogrithm object.
107  bool registerTIAControl(N_ANP_AnalysisManager * tiaControl_tmp);
108  //
109  // Method to register the TIA StepErrorControl object.
111 
112  // Method to specify transient initial condition
113  bool setInitialCondition(N_LAS_Vector * initialConditionPtr);
114 
115  // Method to specify transient state initial condition
116  bool setStateInitialCondition(N_LAS_Vector *stateInitialConditionPtr);
117 
118  // Method to specify transient store initial condition
119  bool setStoreInitialCondition(N_LAS_Vector *storeInitialConditionPtr);
120 
121  // Method to specify transient Q initial condition
122  bool setQVectorInitialCondition(N_LAS_Vector *qVectorInitialConditionPtr);
123 
124  // Method to run DCOP
125  bool runDCOP();
126 
127  // Method to run transient without DCOP
128  bool runTransient();
129 
130  // Method to run transient with DCOP
131  bool runTransientWithDCOP();
132 
133  // Methods to take single time steps
134  void getTimeIntInfo(N_TIA_TimeIntInfo & tiInfo);
135  bool runStep(const N_TIA_TimeIntInfo & tiInfo, N_TIA_TwoLevelError & tlError);
136  void stepSuccess(int analysis_type);
137 
138  // Method to return output solution (either from DCOP or transient)
139  N_LAS_Vector* getFinalSolution();
140 
141  // Method to return output state vector (either from DCOP or transient)
142  N_LAS_Vector* getStateFinalSolution();
143 
144  // Method to return output store vector (either from DCOP or transient)
145  N_LAS_Vector* getStoreFinalSolution();
146 
147  // Method to return output DAE Q vector
148  N_LAS_Vector* getQVectorFinalSolution();
149 
150  // Method to return output DAE Q vector history
151  N_LAS_Vector* getQVectorHistoryFinalSolution();
152 
153  // Method to re-initialize time integrator
154  bool reInitialize();
155 
156  // Accessor to the N_TIA_TIAParams object.
158 
159  bool setTIAParams(N_TIA_TIAParams& tiaParams);
160 
161 protected:
162 
163 private :
164 
165  // Pointer to DataStore
167 
168  // Pointer to TIAParams
170 
171  // Pointer to the Analysis Manager
173 
174  // Pointer to the TIA StepErrorControl object
176 
177 };
178 
179 //-----------------------------------------------------------------------------
180 // Function : N_TIA_MPDEInterface::getTIAParams
181 // Purpose : Accessor to the N_TIA_TIAParams object.
182 // Special Notes :
183 // Scope : public
184 // Creator : Todd Coffey, SNL
185 // Creation Date : 3/25/04
186 //-----------------------------------------------------------------------------
188 {
189  return (tiaParams_);
190 }
191 
192 #endif // Xyce_TIME_MPDEINTERFACE_H
193