From ad02096df5b4664b3c9a2264f00d9fc21f550078 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Sat, 19 Dec 2015 15:03:02 +0100 Subject: [PATCH] openEMS: simple interface to create a Gaussian pulse excitation Signed-off-by: Thorsten Liebig --- openems.cpp | 6 ++++++ openems.h | 1 + 2 files changed, 7 insertions(+) diff --git a/openems.cpp b/openems.cpp index d9260bd..6be20e4 100644 --- a/openems.cpp +++ b/openems.cpp @@ -752,6 +752,12 @@ bool openEMS::ParseFDTDSetup(std::string file) this->SetTimeStepFactor(dhelp); } +void openEMS::SetGaussExcite(double f0, double fc) +{ + this->InitExcitation(); + m_Exc->SetupGaussianPulse(f0, fc); +} + Excitation* openEMS::InitExcitation() { delete m_Exc; diff --git a/openems.h b/openems.h index b994e5e..d0721d3 100644 --- a/openems.h +++ b/openems.h @@ -84,6 +84,7 @@ public: //! Check for abort conditions bool CheckAbortCond(); + void SetGaussExcite(double f0, double fc); Excitation* InitExcitation(); void SetCSX(ContinuousStructure* csx);