Closed jorgensd closed 1 year ago
Note that there is now an implicit dependency in the generation of the offsets. The list in Line 102 of forms.py is dependent on the dolfinx::fem::IntegralType
-ordering.
This means that if we change the IntegralType
(either value for an entry or add more, the generation of offsets will be wrong).
This is exposed in:
https://github.com/FEniCS/ffcx/pull/589/commits/2fda42c4cc276b39251fa52639cb3ae1b7c6678b
and was introduced in DOLFINx in
https://github.com/FEniCS/dolfinx/pull/2744/files
I think the ordering is in the ufcx enum, not in dolfinx. I agree this is a weakness which should be addressed, though I am not quite sure how. One idea would be to provide a function (fixed code not generated). Is it worth it? I feel it is duplication - two ways of doing the same thing...
I think the ordering is in the ufcx enum, not in dolfinx. I agree this is a weakness which should be addressed,
As it is used in DOLFINx,
I think the ordering is in the ufcx enum, not in dolfinx. I agree this is a weakness which should be addressed, though I am not quite sure how. One idea would be to provide a function (fixed code not generated). Is it worth it? I feel it is duplication - two ways of doing the same thing...
I see, it uses the ufcx.h
file to get exterior_facet
etc in one place in dolfinx/fem/utils.h
(all other places in the file uses IntegralType::...
, so that threw me off.
I think the way to fix this is instead of looping over strings when building the offset, it should base this on the ufch.x
header enum, or smth.
@chrisrichardson could we go along at get this merged (and the PR in ufl), as it is getting quite tedious to keep up to date with rewrites of ffcx, and I haven't seen anyone having any objections regarding this PR
Now that https://github.com/FEniCS/ufl/pull/92 is merged, I think we need to merge this asap
generates a
c
file withrepeated 1000 times. This makes the code generation slow and not scalable with an increasing number of subdomains. Running
ffcx
with a 1000 subdomains takes about 3.8 seconds, while 10000 takes ~43 seconds.This PR depends on: https://github.com/FEniCS/ufl/pull/92 and resolves https://github.com/FEniCS/ffcx/issues/447
The current PR with 1000 subdomains runs in 0.9 seconds and 10000 subdomains runs in 8 seconds. The
c
-file in this branch is 570 lines with 10000 subdomains, while it is over 600 000 lines on the main branch