Xyce  6.1
N_ANP_SecondLevelManager.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_SecondLevelManager.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Richard Schiek, SNL, Electrical and Microsystem Modeling
33 //
34 // Creation Date : 01/24/08
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.9 $
40 //
41 // Revision Date : $Date: 2015/06/12 19:59:32 $
42 //
43 // Current Owner : $Author: dgbaur $
44 //-----------------------------------------------------------------------------
45 
46 #ifndef Xyce_N_ANP_SecondLevelManager_h
47 #define Xyce_N_ANP_SecondLevelManager_h
48 
49 #include <N_ANP_AnalysisManager.h>
50 
51 namespace Xyce {
52 namespace Analysis {
53 
55 {
56 public:
58  const IO::CmdParse & command_line,
59  OutputMgrAdapter & output_manager_adapter,
60  Stats::Stat analysis_stat)
61  : AnalysisManager(command_line, output_manager_adapter, analysis_stat),
63  activeOutput_(0)
64  {}
65 
67  {}
68 
69 private:
72 
73 public:
74  // Two-level Newton API functions:
75  // Execute the control loop for the set analysis type,
76  // for a set number of steps.
77  void setExternalSolverState(Loader::CktLoader &loader, bool external_initJctFlag);
79 
80  bool startupSecondLevelSolvers(Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager);
82 
83  void homotopyStepSuccess(const std::vector<std::string> & paramNames, const std::vector<double> & paramVals);
84  void homotopyStepFailure();
85 
86  void stepSecondLevelSuccess(TwoLevelMode analysisUpper);
87  void stepSecondLevelFailure(TwoLevelMode analysisUpper);
89  bool getSecondLevelBreakPoints(Loader::CktLoader &loader, std::vector<Util::BreakPoint> &breakPointTimes) const;
91  const TimeIntg::TIAParams & tia_params,
92  Nonlinear::Manager & nonlinear_manager,
93  bool beginIntegrationFlag,
94  double nextTimeStep,
95  double nextTime,
96  int currentOrder);
97 
98 private:
100  IO::ActiveOutput * activeOutput_;
101 };
102 
103 } // namespace Analysis
104 } // namespace Xyce
105 
106 #endif // Xyce_N_ANP_SecondLevelManager_h
bool getSecondLevelBreakPoints(Loader::CktLoader &loader, std::vector< Util::BreakPoint > &breakPointTimes) const
Pure virtual class to augment a linear system.
void stepSecondLevelFailure(TwoLevelMode analysisUpper)
void setExternalSolverState(Loader::CktLoader &loader, bool external_initJctFlag)
bool runSecondLevelStep(TimeIntg::TwoLevelError &tlError)
SecondLevelManager(const IO::CmdParse &command_line, OutputMgrAdapter &output_manager_adapter, Stats::Stat analysis_stat)
void stepSecondLevelSuccess(TwoLevelMode analysisUpper)
void homotopyStepSuccess(const std::vector< std::string > &paramNames, const std::vector< double > &paramVals)
bool startSecondLevelTimeStep(const TimeIntg::TIAParams &tia_params, Nonlinear::Manager &nonlinear_manager, bool beginIntegrationFlag, double nextTimeStep, double nextTime, int currentOrder)
SecondLevelManager & operator=(const SecondLevelManager &)
bool getSecondLevelInitialQnorm(TimeIntg::TwoLevelError &tle) const
bool startupSecondLevelSolvers(Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager)