-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add single 3d field evaluation kernel #335
base: devel
Are you sure you want to change the base?
Conversation
The current use of
I get the error message
Locally I will switch back to the |
Related to issue #188 |
The templates should work now, provided that you upgrade Pyccel to version >= 1.11.2 |
I just updated my Pyccel and the error is still there. Could you try on your machine? |
@yguclu |
You did not forget to run the script |
I see the problem now. This branch has not been updated with |
@jowezarek Is there a reason for allowing the basis functions to be complex valued? Instead of this code @template(name='T1', types=['float[:,:,:]', 'complex[:,:,:]'])
@template(name='T2', types=['float[:]', 'complex[:]'])
def eval_field_3d_once(local_coeffs: 'T1',
local_bases_0: 'T2', local_bases_1: 'T2', local_bases_2: 'T2'): we can just write @template(name='T', types=[float, complex])
def eval_field_3d_once(local_coeffs: 'T[:,:,:]',
local_bases_0: 'float[:]', local_bases_1: 'float[:]', local_bases_2: 'float[:]'): |
@yguclu, is it possible that your proposed solution was not possible prior to your |
My PR related to templates makes this function easier to read, but even without it it was possible to write this: @template(name='T', types=['float[:,:,:]', 'complex[:,:,:]'])
def eval_field_3d_once(local_coeffs: 'T',
local_bases_0: 'float[:]', local_bases_1: 'float[:]', local_bases_2: 'float[:]'): |
@yguclu everything seems to be fixed now |
Adds the kernel
eval_field_3d_once
topsydac.core.field_evaluation_kernels.py
and makes use of it inpsydac.fem.tensor.py
's methodeval_field
.The purpose of this kernel is to accelerate the evaluation of a single 3d field at a single point. This is needed repeatedly, for example, when creating a Poincaré plot tracing a single fieldline.
To Do: