PSCF v1.4.0
fts/ramp/LinearRamp.h
1#ifndef RP_LINEAR_RAMP_H
2#define RP_LINEAR_RAMP_H
3
4#include <util/containers/DArray.h> // member
5#include <iostream>
6
7namespace Pscf {
8namespace Rp {
9
10 using namespace Util;
11
29 template <int D, class T>
30 class LinearRamp : public T::Ramp
31 {
32
33 public:
34
35 // Protected constructor and destructor (see below).
36
42 void readParameters(std::istream& in) override;
43
52 void setup(int nStep) override;
53
59 void setParameters(int iStep) override;
60
64 void output() override;
65
66 protected:
67
73 LinearRamp(typename T::Simulator& simulator);
74
78 ~LinearRamp() = default;
79
80 using RampT = typename T::Ramp;
81 using RampParameterT = typename T::RampParameter;
82
83 private:
84
85 // Number of variable parameters
86 int nParameter_;
87
88 // Array of variable parameters
89 DArray< RampParameterT > parameters_;
90
91 };
92
93}
94}
95#endif
~LinearRamp()=default
Destructor.
void output() override
Output information at the end of a simulation.
void setParameters(int iStep) override
Set new parameters values in associated System and Simulator.
void readParameters(std::istream &in) override
Read parameters from parameter file input stream.
void setup(int nStep) override
Set nStep and complete initialization.
LinearRamp(typename T::Simulator &simulator)
Constructor.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.