Xyce  6.1
N_ANP_MPDE.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_ANP_MPDE.h,v $
27 //
28 // Purpose : MPDE analysis class
29 //
30 // Special Notes : Specify any "hidden" or subtle details of the class here.
31 // Portability details, error handling information, etc.
32 //
33 // Creator : Todd Coffey, 1414, Ting Mei 1437
34 //
35 // Creation Date : 07/23/08
36 //
37 // Revision Information:
38 // ---------------------
39 //
40 // Revision Number: $Revision: 1.44 $
41 // Revision Date : $Date: 2015/10/27 19:24:39 $
42 // Current Owner : $Author: tvrusso $
43 //-----------------------------------------------------------------------------
44 
45 #ifndef Xyce_N_ANP_MPDE_h
46 #define Xyce_N_ANP_MPDE_h
47 
48 #include <N_ANP_fwd.h>
49 #include <N_TOP_fwd.h>
50 
51 #include <N_ANP_AnalysisBase.h>
52 #include <N_ANP_RegisterAnalysis.h>
53 #include <N_ANP_StepEvent.h>
54 #include <N_UTL_Listener.h>
55 #include <N_UTL_OptionBlock.h>
56 
57 class N_MPDE_Manager;
58 
59 namespace Xyce {
60 namespace Analysis {
61 
62 typedef Util::ListenerAutoSubscribe<StepEvent> StepEventListener;
63 
64 //-------------------------------------------------------------------------
65 // Class : MPDE
66 // Purpose : MPDE analysis class
67 // Special Notes :
68 // Creator : Richard Schiek, SNL, Electrical and Microsystem Modeling
69 // Creation Date : 01/24/08
70 //-------------------------------------------------------------------------
71 class MPDE : public AnalysisBase,
72  public StepEventListener
73 {
74 public:
75  MPDE(
76  AnalysisManager & analysis_manager,
77  Linear::System & linear_system,
78  Nonlinear::Manager & nonlinear_manager,
79  Loader::Loader & loader,
80  Device::DeviceMgr & device_manager,
81  Linear::Builder & builder,
82  Topo::Topology & topology,
83  IO::InitialConditionsManager & initial_conditions_manager,
84  IO::RestartMgr & restart_manager);
85 
86  virtual ~MPDE();
87 
88 
89  void notify(const StepEvent &event);
90 
91  const TimeIntg::TIAParams &getTIAParams() const; // override
92  TimeIntg::TIAParams &getTIAParams(); // override
93 
94  bool getDCOPFlag() const;
95 
96 protected:
97  bool doRun();
98  bool doInit();
99  bool doLoopProcess();
100  bool processSuccessfulDCOP();
101  bool processFailedDCOP();
103  bool doProcessFailedStep();
104  bool doFinish();
105  bool doHandlePredictor();
106 
107 public:
108  bool finalVerboseOutput();
109 
110  N_MPDE_Manager &getMPDEManager()
111  {
112  return *mpdeManager_;
113  }
114 
115 private:
118  Linear::System & linearSystem_;
120  Topo::Topology & topology_;
121  N_MPDE_Manager * mpdeManager_;
122 };
123 
124 bool registerMPDEFactory(FactoryBlock &factory_block);
125 
126 } // namespace Analysis
127 } // namespace Xyce
128 
129 #endif // Xyce_N_ANP_MPDE_h
130 
Loader::Loader & loader_
Definition: N_ANP_MPDE.h:117
bool doProcessSuccessfulStep()
Definition: N_ANP_MPDE.C:200
Pure virtual class to augment a linear system.
N_MPDE_Manager & getMPDEManager()
Definition: N_ANP_MPDE.h:110
Util::ListenerAutoSubscribe< StepEvent > StepEventListener
void notify(const StepEvent &event)
Definition: N_ANP_MPDE.C:89
Nonlinear::Manager & nonlinearManager_
Definition: N_ANP_MPDE.h:119
Linear::System & linearSystem_
Definition: N_ANP_MPDE.h:118
Topo::Topology & topology_
Definition: N_ANP_MPDE.h:120
The FactoryBlock contains parameters needed by the analysis creation functions.
bool registerMPDEFactory(FactoryBlock &factory_block)
Definition: N_ANP_MPDE.C:612
MPDE(AnalysisManager &analysis_manager, Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager, Loader::Loader &loader, Device::DeviceMgr &device_manager, Linear::Builder &builder, Topo::Topology &topology, IO::InitialConditionsManager &initial_conditions_manager, IO::RestartMgr &restart_manager)
Definition: N_ANP_MPDE.C:69
const TimeIntg::TIAParams & getTIAParams() const
Definition: N_ANP_MPDE.C:111
bool processSuccessfulDCOP()
Definition: N_ANP_MPDE.C:187
AnalysisManager & analysisManager_
Definition: N_ANP_MPDE.h:116
N_MPDE_Manager * mpdeManager_
Definition: N_ANP_MPDE.h:121
bool doProcessFailedStep()
Definition: N_ANP_MPDE.C:213
bool getDCOPFlag() const
Definition: N_ANP_MPDE.C:130