OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MonitorSettings.h
Go to the documentation of this file.
1#pragma once
2/*********************************************************************
3 * @file MonitorSettings.h
4 * @brief
5 *
6 * @author Jan Wagner
7 * @date July 2022
8 *********************************************************************/
9#include <string>
10#include <map>
11
12#include "EntitySolverMonitor.h"
13#include "Ports/SourceTarget.h"
14#include "PhysicalQuantities.h"
15
20
22{
23public:
24 MonitorSettings(std::string monitorName, std::string selectedDomain, std::string monitoredGeometry, std::string observedComponent, std::string monitorQuantity, std::string monitorVolume, int samplingFrequency, PhysicalQuantities observedFrequency, int observedTimeStep)
25 : _monitorName(monitorName), _selectedDomain(selectedDomain), _monitoredGeometry(monitoredGeometry), _observedComponent(observedComponent), _monitorQuantity(monitorQuantity), _monitorVolume(monitorVolume), _samplingFrequency(samplingFrequency), _observedFrequency(observedFrequency), _obsTimeStep(observedTimeStep){};
26 const std::string GetMonitorName(void) const { return _monitorName; }
27 const MonitorDomain GetDomain(void) const { return _supportedDomains.at(_selectedDomain); }
28 const MonitorGeometry GetMonitoredGeometry (void) const { return _supportedDoF.at(_monitoredGeometry); }
29 const MonitorQuantity GetMonitorQuantity(void) const { return _supportedQuantities.at(_monitorQuantity); }
30 const MonitorVolume GetMonitorVolume(void) const { return _supportedVolumes.at(_monitorVolume); }
31 const sourceType GetMonitoredField(void) const { return _supportedTargetFields.at(_observedComponent); }
32 const int GetSamplingFrequency(void) const { return _samplingFrequency; }
33 const double GetObservedFrequency(void) const { return _observedFrequency.GetInternalValue(); }
34 const int GetObservedTimeStep(void) const { return _obsTimeStep; }
35 std::string Print(void);
36
37private:
38 std::string _monitorName;
39 std::string _selectedDomain;
40 std::string _observedComponent;
41 std::string _monitoredGeometry;
42 std::string _monitorVolume;
43 std::string _monitorQuantity;
44 std::string _formerUnit;
45 PhysicalQuantities _observedFrequency;
46 int _samplingFrequency;
47 int _obsTimeStep;
48
49 std::map < std::string, MonitorVolume> _supportedVolumes = { {EntitySolverMonitor::GetPropertyValueVolumeFull(), full}, {EntitySolverMonitor::GetPropertyValueVolumePoint(), point} };
50 std::map < std::string, MonitorQuantity> _supportedQuantities = { {EntitySolverMonitor::GetPropertyValueQuantityVector(), vector},{EntitySolverMonitor::GetPropertyValueQuantityComponentX(), x_component},{EntitySolverMonitor::GetPropertyValueQuantityComponentY(), y_component},{EntitySolverMonitor::GetPropertyValueQuantityComponentZ(), z_component} };
51 std::map<std::string, MonitorDomain> _supportedDomains = { {EntitySolverMonitor::GetPropertyValueDomainFrequency(),frequencyDomain}, {EntitySolverMonitor::GetPropertyValueDomainTime(), timeDomain} };
52 std::map <std::string, MonitorGeometry> _supportedDoF = { {EntitySolverMonitor::GetPropertyValueDoFNode(), nodes}, {EntitySolverMonitor::GetPropertyValueDoFEdge(), edges} };
53 std::map<std::string, sourceType> _supportedTargetFields = { {EntitySolverMonitor::GetPropertyValueFieldCompElectr(), e},{EntitySolverMonitor::GetPropertyValueFieldCompMagnetic(), h} };
54};
MonitorDomain
Definition MonitorSettings.h:16
@ timeDomain
Definition MonitorSettings.h:16
@ frequencyDomain
Definition MonitorSettings.h:16
MonitorVolume
Definition MonitorSettings.h:19
@ full
Definition MonitorSettings.h:19
@ point
Definition MonitorSettings.h:19
MonitorQuantity
Definition MonitorSettings.h:18
@ vector
Definition MonitorSettings.h:18
@ y_component
Definition MonitorSettings.h:18
@ z_component
Definition MonitorSettings.h:18
@ x_component
Definition MonitorSettings.h:18
MonitorGeometry
Definition MonitorSettings.h:17
@ nodes
Definition MonitorSettings.h:17
@ edges
Definition MonitorSettings.h:17
@ volume
Definition MonitorSettings.h:17
@ surface
Definition MonitorSettings.h:17
sourceType
Definition SourceTarget.h:4
@ e
Definition SourceTarget.h:4
@ h
Definition SourceTarget.h:4
Definition MonitorSettings.h:22
const MonitorQuantity GetMonitorQuantity(void) const
Definition MonitorSettings.h:29
const int GetObservedTimeStep(void) const
Definition MonitorSettings.h:34
MonitorSettings(std::string monitorName, std::string selectedDomain, std::string monitoredGeometry, std::string observedComponent, std::string monitorQuantity, std::string monitorVolume, int samplingFrequency, PhysicalQuantities observedFrequency, int observedTimeStep)
Definition MonitorSettings.h:24
const int GetSamplingFrequency(void) const
Definition MonitorSettings.h:32
const MonitorVolume GetMonitorVolume(void) const
Definition MonitorSettings.h:30
const MonitorGeometry GetMonitoredGeometry(void) const
Definition MonitorSettings.h:28
std::string Print(void)
Definition MonitorSettings.cpp:3
const double GetObservedFrequency(void) const
Definition MonitorSettings.h:33
const MonitorDomain GetDomain(void) const
Definition MonitorSettings.h:27
const sourceType GetMonitoredField(void) const
Definition MonitorSettings.h:31
const std::string GetMonitorName(void) const
Definition MonitorSettings.h:26
Definition PhysicalQuantities.h:5
const double GetInternalValue(void) const
Definition PhysicalQuantities.h:23