summaryrefslogtreecommitdiff
path: root/openEMS/python/openEMS/openEMS.pxd
blob: a3071523c4f480750f7fc78194b30e6a179db650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015,20016 Thorsten Liebig (Thorsten.Liebig@gmx.de)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

from libcpp.string cimport string
from libcpp cimport bool

from CSXCAD.CSXCAD cimport _ContinuousStructure, ContinuousStructure

cdef extern from "openEMS/openems.h":
    cdef cppclass _openEMS "openEMS":
        _openEMS() except +
        void SetNumberOfTimeSteps(unsigned int val)
        void SetCSX(_ContinuousStructure* csx)

        void SetEndCriteria(double val)
        void SetOverSampling(int val)
        void SetCellConstantMaterial(bool val)

        void SetCylinderCoords(bool val)
        void SetupCylinderMultiGrid(string val)

        void SetTimeStepMethod(int val)
        void SetTimeStep(double val)
        void SetTimeStepFactor(double val)
        void SetMaxTime(double val)

        void SetNumberOfThreads(int val)

        void Set_BC_Type(int idx, int _type)
        int Get_BC_Type(int idx)
        void Set_BC_PML(int idx, unsigned int size)
        int Get_PML_Size(int idx)
        void Set_Mur_PhaseVel(int idx, double val)

        void SetGaussExcite(double f0, double fc)

        void SetVerboseLevel(int level)
        void DebugPEC()
        void DebugMaterial()
        void DebugCSX()

        int SetupFDTD()
        void RunFDTD()

        @staticmethod
        void WelcomeScreen()

cdef class openEMS:
    cdef  _openEMS *thisptr
    cdef readonly ContinuousStructure __CSX      # hold a C++ instance which we're wrapping