OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
PortSinusGaussian.h
Go to the documentation of this file.
1#pragma once
2#include "Port.h"
3template <class T>
4class PortSinusGaussian : public Port<T>
5{
6 using Port<T>::_index;
7 using Port<T>::EFunc;
8
9 double _frequencyMin =0;
10 double _frequencyMax =0;
11
12 double _frequencyMiddle = 0.;
13 double _exponentCoefficient = 0.;
14 double _timeShift = 0.;
15 const double _fadedAmplitude = 0.00001;
16
17 void CalculateCoefficients();
18 T CalculateCurrentValue(float currentTime) override;
19
20public:
21 PortSinusGaussian(std::string portName, std::pair<Point3D,index_t> location , sourceType fieldType, axis sourceAxis, std::string signalName, double frequencyMin, double frequencyMax)
22 : Port<T>(portName,location, fieldType, sourceAxis, signalName), _frequencyMin(frequencyMin), _frequencyMax(frequencyMax)
23 {
24 assert(_frequencyMin <= _frequencyMax);
25 CalculateCoefficients();
26 };
27};
28
sourceType
Definition SourceTarget.h:4
axis
Definition SourceTarget.h:5
Definition Port.h:11
float EFunc(float exponent)
Definition Port.h:157
index_t _index
Definition Port.h:151
Definition PortSinusGaussian.h:5
PortSinusGaussian(std::string portName, std::pair< Point3D, index_t > location, sourceType fieldType, axis sourceAxis, std::string signalName, double frequencyMin, double frequencyMax)
Definition PortSinusGaussian.h:21
T CalculateCurrentValue(float currentTime) override
Definition PortSinusGaussian.hpp:16