OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ResultPipelineTimeDomain1Component.h
Go to the documentation of this file.
1#pragma once
2
6#include <vector>
7
8template <class T>
10{
11private:
13 ResultVolumeFilter<T> * _filter;
14 std::vector<T> _result;
15 std::vector<T> _timeSteps;
16
17 T*(DegreesOfFreedom3DLoopCPU<T>::*GetterOfDoF)(index_t index) const;
18public:
19 ResultPipelineTimeDomain1Component(int executionFrequency, int totalTimeSteps, DegreesOfFreedom3DLoopCPU<T> & doF, T*(DegreesOfFreedom3DLoopCPU<T>::*GetterDoF)(index_t index) const, ResultVolumeFilter<T> * filter)
20 : ResultPipeline(executionFrequency, totalTimeSteps), _doF(doF), _filter(filter) , GetterOfDoF(GetterDoF)
21 {
22 _result.reserve(_lastTimeStep + 1);
23 _timeSteps.reserve(_lastTimeStep + 1);
24
25 };
27 {
28 delete _filter;
29 _filter = nullptr;
30 }
31 const std::vector<T> & GetResultVector() const { return _result; };
32 const std::vector<T> & GetTimeSteps() const { return _timeSteps; };
33
34 virtual void Execute(int currentTimestep) override
35 {
36 _timeSteps.push_back(static_cast<T>(currentTimestep));
37 auto temp = (_doF.*GetterOfDoF)(0);
38 const T* result = _filter->FilterVolume(temp);
39 _result.push_back(result[0]);
40 }
41};
int result
Definition dllmain.cpp:82
int64_t index_t
Definition SystemDependentDefines.h:13
Definition DegreesOfFreedom3DLoopCPU.h:8
Definition ResultPipeline.h:11
Definition ResultPipelineTimeDomain1Component.h:10
const std::vector< T > & GetTimeSteps() const
Definition ResultPipelineTimeDomain1Component.h:32
~ResultPipelineTimeDomain1Component()
Definition ResultPipelineTimeDomain1Component.h:26
virtual void Execute(int currentTimestep) override
Definition ResultPipelineTimeDomain1Component.h:34
const std::vector< T > & GetResultVector() const
Definition ResultPipelineTimeDomain1Component.h:31
ResultPipelineTimeDomain1Component(int executionFrequency, int totalTimeSteps, DegreesOfFreedom3DLoopCPU< T > &doF, T *(DegreesOfFreedom3DLoopCPU< T >::*GetterDoF)(index_t index) const, ResultVolumeFilter< T > *filter)
Definition ResultPipelineTimeDomain1Component.h:19