5 #ifndef OPENPSTD_KERNELINTERFACE_H 6 #define OPENPSTD_KERNELINTERFACE_H 9 #include "GeneralTypes.h" 30 PSTD_DOMAIN_SIDE_TOP = 1,
31 PSTD_DOMAIN_SIDE_BOTTOM = 2,
32 PSTD_DOMAIN_SIDE_LEFT = 4,
33 PSTD_DOMAIN_SIDE_RIGHT = 8,
34 PSTD_DOMAIN_SIDE_ALL = 8 + 4 + 2 + 1,
35 PSTD_DOMAIN_SIDE_NONE = 0
71 bool spectral_interpolation;
81 Eigen::ArrayXf window;
83 float GetGridSpacing();
85 void SetGridSpacing(
float value);
87 float GetPatchError();
89 void SetPatchError(
float value);
93 float GetRenderTime();
95 void SetRenderTime(
float value);
99 void SetPMLCells(
int value);
101 float GetAttenuationOfPMLCells();
103 void SetAttenuationOfPMLCells(
float value);
105 float GetDensityOfAir();
107 void SetDensityOfAir(
float value);
109 float GetMaxFrequency();
111 void SetMaxFrequency(
float value);
113 float GetSoundSpeed();
115 void SetSoundSpeed(
float value);
119 void SetFactRK(
float value);
123 void SetSaveNth(
int value);
125 float GetBandWidth();
127 void SetBandWidth(
float value);
129 bool GetSpectralInterpolation();
131 void SetSpectralInterpolation(
bool value);
133 float GetWaveLength();
135 void SetWaveLength(
float value);
141 void SetGPUAccel(
bool value);
143 bool GetMultiThread();
145 void SetMultiThread(
bool value);
147 std::vector<float> GetRKCoefficients();
149 void SetRKCoefficients(std::vector<float> coef);
194 std::vector<QVector3D> Speakers;
195 std::vector<QVector3D> Receivers;
196 std::vector<DomainConf> Domains;
203 static std::shared_ptr<PSTDConfiguration> CreateDefaultConf();
220 virtual void Callback(
CALLBACKSTATUS status, std::string message,
int frame) = 0;
228 virtual void WriteFrame(
int frame,
int domain, PSTD_FRAME_PTR data) = 0;
236 virtual void WriteSample(
int startSample,
int receiver, std::vector<float> data) = 0;
270 virtual void initialize_kernel(std::shared_ptr<PSTDConfiguration> config) = 0;
287 const char *what()
const noexcept
override;
293 #endif //OPENPSTD_KERNELINTERFACE_H This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
The kernel API.
Definition: KernelInterface.h:265
A collection of parameters and settings for the simulation.
Definition: KernelInterface.h:44
bool LR
Locally reacting flag.
Definition: KernelInterface.h:160
PSTD_DOMAIN_SIDE
Enums for the domain boundary representation in the interface.
Definition: KernelInterface.h:29
Interface representation of the domain.
Definition: KernelInterface.h:166
Interface values for boundaries of domains.
Definition: KernelInterface.h:155
Representation of the scene configuration.
Definition: KernelInterface.h:190
Callback interface for communication with the CLI or the GUI.
Definition: KernelInterface.h:212
const std::vector< float > rk_coefficients
Coefficients for a six stage RK time integration.
Definition: kernel_functions.h:102
CALLBACKSTATUS
The status of the kernel when the callback is called.
Definition: KernelInterface.h:20
float Absorption
Wall absorption coefficient.
Definition: KernelInterface.h:158