PSCF v1.2
rpg/fts/ramp/LinearRamp.h
1#ifndef RPG_LINEAR_RAMP_H
2#define RPG_LINEAR_RAMP_H
3
4#include <rpg/fts/ramp/Ramp.h> // base class
5#include <rpg/fts/ramp/RampParameter.h> // member (templ parameter)
6#include <util/containers/DArray.h> // member (template)
7
8namespace Pscf {
9namespace Rpg {
10
11 using namespace Util;
12
13 template <int D> class Simulator;
14
20 template <int D>
21 class LinearRamp : public Ramp<D>
22 {
23
24 public:
25
30
34 virtual ~LinearRamp();
35
41 virtual void readParameters(std::istream& in);
42
51 virtual void setup(int nStep);
52
58 virtual void setParameters(int iStep);
59
64 virtual void output();
65
66 protected:
67
68 using Ramp<D>::nStep_;
69 using Ramp<D>::simulator;
70
71 private:
72
73 // Number of variable parameters
74 int nParameter_;
75
76 // Array of variable parameters
77 DArray< RampParameter<D> > parameters_;
78
79 };
80
81
82 #ifndef RPG_LINEAR_RAMP_TPP
83 // Suppress implicit instantiation
84 extern template class LinearRamp<1>;
85 extern template class LinearRamp<2>;
86 extern template class LinearRamp<3>;
87 #endif
88
89}
90}
91#endif
Linear ramp - parameters vary linearly with step index.
LinearRamp(Simulator< D > &simulator)
Constructor.
virtual void setParameters(int iStep)
Set new parameters values in associated System and Simulator.
virtual ~LinearRamp()
Destructor.
virtual void output()
Output initial and final parameter values of linear ramp at the end of the simulation.
virtual void setup(int nStep)
Set nStep and complete initialization.
virtual void readParameters(std::istream &in)
Read parameters from parameter file input stream.
Class that varies parameters during a simulation (abstract).
Simulator< D > const & simulator() const
Get parent Simulator<D> by const reference.
int nStep_
Number of steps planned for this simulation (set in setup).
Field theoretic simulator (base class).
Definition rpg/System.h:41
Dynamically allocatable contiguous array template.
PSCF package top-level namespace.
Definition param_pc.dox:1
Utility classes for scientific computation.