You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
F1, F2, F3, # arrays of degrees of freedom (intent out)
f1, f2, f3# input scalar functions (callable)
):
k1=quad_x1.shape[1]
k2=quad_x2.shape[1]
k3=quad_x3.shape[1]
n1, n2, n3=F1.shape
fori1inrange(n1):
fori2inrange(n2):
fori3inrange(n3):
F1[i1, i2, i3] =0.0
forg1inrange(k1):
F1[i1, i2, i3] +=quad_w1[i1, g1] * \
f1(quad_x1[i1, g1], intp_x2[i2], intp_x3[i3])
n1, n2, n3=F2.shape
fori1inrange(n1):
fori2inrange(n2):
fori3inrange(n3):
F2[i1, i2, i3] =0.0
forg2inrange(k2):
F2[i1, i2, i3] +=quad_w2[i2, g2] * \
f2(intp_x1[i1], quad_x2[i2, g2], intp_x3[i3])
n1, n2, n3=F3.shape
fori1inrange(n1):
fori2inrange(n2):
fori3inrange(n3):
F3[i1, i2, i3] =0.0
forg3inrange(k3):
F3[i1, i2, i3] +=quad_w3[i3, g3] * \
f3(intp_x1[i1], intp_x2[i2], quad_x3[i3, g3])
The evaluate_dofs_*() functions seem to be good candidates for pyccel-ization. Problem is, evaluate_dofs_*() can take a Python function as an input, and this is not yet supported in pyccel. I'll have to find another way to speed this up.
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%
Pyccelized modules can call Python functions, if these are also Pyccelized...
That's the catch -- those Python functions (i.e. f-evals in our case) should remain black box from C/ForTran perspective, and thus should not be pyccel-ized. Not optimal, but I think preserving the original f-eval (i.e. not pyccel-izing) is more important. There should be a way to bind Python methods as a function pointers in C . I asked this question in the Pyccel repo: pyccel/pyccel#2213 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_derham_projector_3dandtest_3d_commuting_pro_3collectively take ~10mins to run. This PR tries to drastically reduce this long test time.These slow tests call
evaluate_dofs_*()multiple times. A single call toevaluate_dofs_*()is already costly due to usage of deeply nestedforloops:psydac/psydac/feec/global_projectors.py
Lines 772 to 778 in 66205a5
psydac/psydac/feec/global_projectors.py
Lines 781 to 818 in 66205a5
The
evaluate_dofs_*()functions seem to be good candidates for pyccel-ization. Problem is,evaluate_dofs_*()can take a Python function as an input, and this is not yet supported in pyccel. I'll have to find another way to speed this up.