Martin Sandve Alnæs

10/6 2014

Work in progress - current top priorities

  • ...

Main points left for release

  • Geometry - Circumradius, CellVolume, FacetArea, MaxFacetEdgeLength, MinFacetEdgeLength.
  • Conditionals.
  • Point integral.
  • Custom integral.
  • Non-affine vector-element mappings - implement ReferenceValueOf in UFL.
  • RestrictedElement.

Optimization of code generation

  • Factorization algorithm in unoptimized and slow.
  • Profile!

Optimization of generated code

  • At this point performance is competitive but has potential.
  • Extract constant-to-a-scale tensor parts out of quadrature loop.
  • Fuse loops of same size.
  • Add nonzero table column support similar to quadrature representation.
  • Auto-vectorization with AVX2 intrinsics.
  • Tune unstructured expressions better - generate FMAs?

Status of geometry types

  • 25 types
  • 3 cell/facet types
  • 5 integral types
  • = 375 of combinations to test...
  • Overview below is not up to date!

Implemented geometry types

SpatialCoordinate FacetNormal

Geometry types likely working

CellCoordinate FacetCoordinate CellOrigin FacetOrigin CellFacetOrigin Jacobian JacobianDeterminant JacobianInverse FacetJacobian FacetJacobianDeterminant FacetJacobianInverse CellFacetJacobian CellFacetJacobianDeterminant CellFacetJacobianInverse CellNormal CellOrientation FacetOrientation QuadratureWeight

Missing geometry types

CellVolume Circumradius FacetArea MinFacetEdgeLength MaxFacetEdgeLength

Status of integral types

  • Need unit testing of geometry.
  • Need unit testing of gradient mappings.
  • Need unit testing of integration scaling.
cell exterior_facet interior_facet custom point

Commands to test uflacs with ffc:


ffc -r uflacs
./test.py --ext-uflacs --skip-download --permissive --print-timing
./test.py --ext-uflacs --skip-download --permissive --print-timing --bench
          

Python unit testing status

C++ unit testing status

Overview of which FFC regression test demos that produce CORRECT results

Mass Poisson1D Poisson VectorPoisson TensorWeightedPoisson Heat Stokes NavierStokes Division NeumannProblem StabilisedStokes Optimization MixedMixedElement Mini SpatialCoordinates SubDomain P5tet P5tri Constant Equation ReactionDiffusion EnergyNorm AlgebraOperators Components MathFunctions QuadratureElement MetaData CoefficientOperators Elasticity HyperElasticity SubDomains FacetIntegrals FacetRestrictionAD

Overview of which FFC regression test demos that produce incorrect results or fail to generate code

Note:

Biharmonic and PoissonDG dolfin demos work if replacing CellSize with a Constant.

Missing geometry

CellGeometry (Biharmonic) (PoissonDG)

Missing element mappings

MixedPoissonDual MixedPoisson

Missing integral type handling

PointMeasure CustomIntegral

Incorrect manifold dimensions

ProjectionManifold

Missing conditional operators

Conditional

Missing element table definitions

AdaptivePoisson VectorLaplaceGradCurl

Missing element type handling

RestrictedElement

Clean up graph building code

Rewrite ffc table generation

Merge into ffc?

Loop invariant code motion

Loop fusion

Identify relation to tensor representation

AVX vectorization

BLAS