Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_ANP_SweepParam.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-2014 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_SweepParam.h,v $
27 //
28 // Purpose :
29 //
30 // Special Notes :
31 //
32 // Creator : Eric Keiter
33 //
34 // Creation Date : 9/4/04
35 //
36 // Revision Information:
37 // ---------------------
38 //
39 // Revision Number: $Revision: 1.11.2.1 $
40 //
41 // Revision Date : $Date: 2014/08/25 20:12:48 $
42 //
43 // Current Owner : $Author: dgbaur $
44 //-----------------------------------------------------------------------------
45 
46 #ifndef Xyce_N_ANP_SweepParam_h
47 #define Xyce_N_ANP_SweepParam_h
48 
49 #include <iosfwd>
50 #include <string>
51 #include <vector>
52 
53 namespace Xyce {
54 namespace Analysis {
55 
56 //-----------------------------------------------------------------------------
57 // Class : SweepParam
58 //
59 // Purpose : This class contains basic parameter data for parameter
60 // sweeps, for a single parameter. If there are multiple
61 // parameters in the sweep, each one gets a class like
62 // this.
63 //
64 // Special Notes : "Step" here refers to steps in a parameter sweep loop,
65 // not time steps or DC sweep steps.
66 //
67 //
68 // Creator : Eric Keiter, SNL
69 // Creation Date : 10/31/03
70 //-----------------------------------------------------------------------------
72 {
73 public:
74  // Default constructor.
75  SweepParam () :
76  name(""),
77  type("LIN"),
78  startVal(0.0),
79  stopVal(0.0),
80  stepVal(0.0),
81  stepMult(0.0),
82  currentVal(0.0),
83  numSteps(0),
84  count(-1),
85  maxStep(0),
86  interval(1),
87  outerStepNumber(0),
88  sweepResetFlag_(false),
90  {};
91 
92  // Destructor
93  ~SweepParam () {};
94 
95  bool updateCurrentVal (int stepNumber);
97 
98  std::string name;
99  std::string type;
100 
101  double startVal;
102  double stopVal;
103  double stepVal;
104  double stepMult;
105 
106  double currentVal;
107 
108  int numSteps;
109 
110  int count;
111  int maxStep;
112  int interval;
113 
115 
116  std::vector<double> valList;
117 
118  private:
121 
122 };
123 
124 typedef std::vector<SweepParam> SweepVector;
125 
126 //-----------------------------------------------------------------------------
127 // Function : SweepParam::operator<<
128 // Purpose : "<<" operator
129 // Special Notes :
130 // Scope : public
131 // Creator : Eric R. Keiter, SNL, Parallel Computational Sciences
132 // Creation Date : 7/02/03
133 //-----------------------------------------------------------------------------
134 std::ostream & operator<<(std::ostream & os, const SweepParam & sp);
135 
136 } // namespace Analysis
137 } // namespace Xyce
138 
140 
141 #endif // Xyce_N_ANP_SweepParam_h