expose SetCustomExcite() in Python (ported from PR #129)
parent
e5db9de99b
commit
45c90c24e8
|
@ -882,6 +882,12 @@ void openEMS::SetStepExcite(double f_max)
|
|||
m_Exc->SetupStepExcite(f_max);
|
||||
}
|
||||
|
||||
void openEMS::SetCustomExcite(std::string str, double f0, double fmax)
|
||||
{
|
||||
this->InitExcitation();
|
||||
m_Exc->SetupCustomExcite(str, f0, fmax);
|
||||
}
|
||||
|
||||
Excitation* openEMS::InitExcitation()
|
||||
{
|
||||
delete m_Exc;
|
||||
|
|
|
@ -105,6 +105,7 @@ public:
|
|||
void SetSinusExcite(double f0);
|
||||
void SetDiracExcite(double f_max);
|
||||
void SetStepExcite(double f_max);
|
||||
void SetCustomExcite(std::string str, double f0, double fmax);
|
||||
|
||||
Excitation* InitExcitation();
|
||||
|
||||
|
|
|
@ -259,6 +259,17 @@ cdef class openEMS:
|
|||
"""
|
||||
self.thisptr.SetStepExcite(f_max)
|
||||
|
||||
def SetCustomExcite(self, _str, f0, fmax):
|
||||
""" SetCustomExcite(_str, f0, fmax)
|
||||
|
||||
Set a custom function as excitation signal. The custom function is supplied as a string which gets
|
||||
parsed using `Function Parser for C++ <http://warp.povusers.org/FunctionParser/fparser.html>`_.
|
||||
|
||||
:param _str: str -- Custom function as string literal
|
||||
:param f0: -- Base frequency.
|
||||
:param fmax: -- Maximum frequency.
|
||||
"""
|
||||
self.thisptr.SetCustomExcite(_str, f0, fmax)
|
||||
|
||||
def SetBoundaryCond(self, BC):
|
||||
""" SetBoundaryCond(BC)
|
||||
|
|
Loading…
Reference in New Issue