Dear all
Hello. I try to translate my bempp code as bempp-cl to solve large problem in windows.
But I got the error messages when I define the Gridfunction .
My incident field is generated by surface currents J_DUT, M_DUT.
It is working in the bempp 3.3.4 version with docker.
But the following code is not working in bempp-cl when I define the IncidentEfiled function as the following:
case1.
def IncidentEfield(point):
temppoint = point.reshape((3,1))
PropLpart = bempp.api.operators.potential.maxwell.electric_field(div_space_DUT, temppoint,k0)
PropKpart = bempp.api.operators.potential.maxwell.magnetic_field(div_space_DUT, temppoint,k0)
JJ = J_DUT*eta0
MM = M_DUT
tempresult = (PropLpart*JJ - PropKpart*MM)
value = tempresult.reshape(-1)
return value
@bempp.api.complex_callable
def tangential_trace(point, n, domain_index, result):
value = IncidentEfield(point)
result[:] = np.cross(value, n)
I got a error message TypingError: cannot determine Numba type of <class 'function'>.
case2.
@numba.jit
def IncidentEfield(point):
temppoint = point.reshape((3,1))
PropLpart = bempp.api.operators.potential.maxwell.electric_field(div_space_DUT, temppoint,k0)
PropKpart = bempp.api.operators.potential.maxwell.magnetic_field(div_space_DUT, temppoint,k0)
JJ = J_DUT*eta0
MM = M_DUT
tempresult = (PropLpart*JJ - PropKpart*MM)
value = tempresult.reshape(-1)
return value
@bempp.api.complex_callable
def tangential_trace(point, n, domain_index, result):
value = IncidentEfield(point)
result[:] = np.cross(value, n)
In this case, I got a message
TypingError: Invalid use of type(CPUDispatcher(<function IncidentEfield at 0x000001E6EE592DC8>)) with parameters (array(float64, 1d, A))
* parameterized During: resolving callee type: type(CPUDispatcher(<function IncidentEfield at 0x000001E6EE592DC8>))
Please let me know if you have any idea to handle this issue.
Thank you in advance.
BR,
Sangwoo Kang