Integrating the compiler algorithms from uflacs into ffc for fast compilation of complicated forms
It's a bit difficult to come up with a detailed plan for this up front because I will have to refine the interface while we're implementing. Below follows some coarse steps to follow.
1) Implement this blueprint:
https:/
I expect this alone to have a measurable impact on compilation time and memory use for complicated forms, but I'm not sure how big it is on its own. Done when: the SpatialDerivative class can be removed completely from ufl and performance of code generated by ffc is unchanged.
2) Compute geometry quantities: uflacs needs ffc to generate snippets for geometry and quadrature rules. The interface for this interaction is immature and needs to be designed iteratively with the implementation. Can probably be based directly on the UFC geometry header that Anders is working on. Done when: uflacs unit tests can assert correctness of compiled code for all ufl geometry quantities.
3) Add a uflacs representation mode to ffc, to live side by side with current representations at least for a while. This mode can delegate to the quadrature representation for generation of form/finite_
4) Compute basis functions and their derivatives: uflacs needs ffc to generate snippets for computation of these. The interface for this interaction is immature and needs to be designed iteratively with the implementation. Done when: ffc in uflacs mode can compile working linear and bilinear forms with derivatives.
5) When the basics are working and ffc-uflacs gives correct results for all tests and demos, I'll need to do some tweaks and optimizations in uflacs algorithms. As it is, it probably generates slower code than Kristians quadrature code for "normal-sized" forms, but in the long term I don't think we need to maintain both modes. That's hard to predict though. Done when: not sure, have to define goal when we get to this stage.
Blueprint information
- Status:
- Started
- Approver:
- Martin Sandve Alnæs
- Priority:
- High
- Drafter:
- Martin Sandve Alnæs
- Direction:
- Approved
- Assignee:
- Martin Sandve Alnæs
- Definition:
- Approved
- Series goal:
- None
- Implementation:
- Good progress
- Milestone target:
- None
- Started by
- Martin Sandve Alnæs
- Completed by
Related branches
Whiteboard
Current status is that many regression tests in ffc passes, but some fail to generate, some fail to compile, some fail to run, some produce incorrect output, and several features are not covered by the ffc regression tests.
However, this blueprint is getting stale, so I'm creating a more fine masked plan on the uflacs blueprint pages here:
https:/