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.2.2.1 $
40 //
41 // Revision Date : $Date: 2015/04/02 18:20:06 $
42 //
43 // Current Owner : $Author: tvrusso $
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  IO::RestartMgr & restart_manager,
60  OutputMgrAdapter & output_manager_adapter,
61  Stats::Stat analysis_stat)
62  : AnalysisManager(command_line, restart_manager, output_manager_adapter, analysis_stat)
63  {}
64 
66  {}
67 
68 private:
71 
72 public:
73  // Two-level Newton API functions:
74  // Execute the control loop for the set analysis type,
75  // for a set number of steps.
78 
79  bool startupSecondLevelSolvers(Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager);
81 
82  void homotopyStepSuccess(const std::vector<std::string> & paramNames, const std::vector<double> & paramVals);
83  void homotopyStepFailure();
84 
85  void stepSecondLevelSuccess(TwoLevelMode analysisUpper);
86  void stepSecondLevelFailure(TwoLevelMode analysisUpper);
88  bool getSecondLevelBreakPoints(std::vector<Util::BreakPoint> &breakPointTimes) const;
89  bool startSecondLevelTimeStep(const TimeIntg::TIAParams &tia_params, Nonlinear::Manager &nonlinear_manager, const TimeIntg::TimeIntInfo & tiInfo);
90 
91 private:
93  IO::ActiveOutput * activeOutput_;
94 };
95 
96 } // namespace Analysis
97 } // namespace Xyce
98 
99 #endif // Xyce_N_ANP_SecondLevelManager_h
Pure virtual class to augment a linear system.
void stepSecondLevelFailure(TwoLevelMode analysisUpper)
void stepSecondLevelSuccess(TwoLevelMode analysisUpper)
void homotopyStepSuccess(const std::vector< std::string > &paramNames, const std::vector< double > &paramVals)
bool runSecondLevelStep(const TimeIntg::TimeIntInfo &tiInfo, TimeIntg::TwoLevelError &tlError)
void setExternalSolverState(const Device::SolverState &ss)
bool startSecondLevelTimeStep(const TimeIntg::TIAParams &tia_params, Nonlinear::Manager &nonlinear_manager, const TimeIntg::TimeIntInfo &tiInfo)
SecondLevelManager & operator=(const SecondLevelManager &)
bool getSecondLevelInitialQnorm(TimeIntg::TwoLevelError &tle) const
bool startupSecondLevelSolvers(Linear::System &linear_system, Nonlinear::Manager &nonlinear_manager)
bool getSecondLevelBreakPoints(std::vector< Util::BreakPoint > &breakPointTimes) const
SecondLevelManager(const IO::CmdParse &command_line, IO::RestartMgr &restart_manager, OutputMgrAdapter &output_manager_adapter, Stats::Stat analysis_stat)