-
Notifications
You must be signed in to change notification settings - Fork 22
Add evaluation kernels for single FemField #335
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
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 |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
|
The
I am really surprised given that we have made no change to the documentation infrastructure. I have asked Copilot and it says that this happens because Psydac cannot be imported. So it suggests to either install Psydac, or add its source directory to the PYTHONPATH. I am not convinced, but I will try the latter... @jowezarek: What do you think? |
This reverts commit abc3908.
I have decided to install Psydac as this only takes 2 minutes. Things appear to work now. |
NumPy-only, efficient (uses sum factorization), generic (N-dimensional) single-point evaluation of a field is provided in module psydac.fem.tensor.
Sum factorization is used in 2 and 3 dimensions for improved efficiency. Further, the required work arrays are passed as arguments rather than locally allocated at each function call.
Adds the kernel
eval_field_3d_oncetopsydac.core.field_evaluation_kernels.pyand 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: