OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
SinusoidalTimeDependence.h
Go to the documentation of this file.
1//
2// Class SinusoidalTimeDependence
3// A time dependence class that generates sine waves
4//
5// Copyright (c) 2025, Jon Thompson, STFC Rutherford Appleton Laboratory, Didcot, UK
6//
7// This file is part of OPAL.
8//
9// OPAL is free software: you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation, either version 3 of the License, or
12// (at your option) any later version.
13//
14// You should have received a copy of the GNU General Public License
15// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
16//
17
18#ifndef OPAL_SINUSOIDALTIMEDEPENDENCE_H
19#define OPAL_SINUSOIDALTIMEDEPENDENCE_H
20
21#include <vector>
22#include <cmath>
23
25class Inform;
26
35public:
44 const std::vector<double>& f, const std::vector<double>& p, const std::vector<double>& a,
45 const std::vector<double>& o);
46
49
51 ~SinusoidalTimeDependence() override = default;
52
56 double getValue(double time) override;
57
63
67 Inform& print(Inform& os) const;
68
69private:
70 std::vector<double> f_m;
71 std::vector<double> p_m;
72 std::vector<double> a_m;
73 std::vector<double> o_m;
74};
75
77 return p.print(os);
78}
79
80#endif // OPAL_SINUSOIDALTIMEDEPENDENCE_H
Inform & operator<<(Inform &os, const SinusoidalTimeDependence &p)
std::complex< double > a
SinusoidalTimeDependence(const std::vector< double > &f, const std::vector< double > &p, const std::vector< double > &a, const std::vector< double > &o)
SinusoidalTimeDependence * clone() override
Inform & print(Inform &os) const
~SinusoidalTimeDependence() override=default
SinusoidalTimeDependence()=default
double getValue(double time) override