FENICS'16: THE FENICS 2016 WORKSHOP
PROGRAM FOR WEDNESDAY, MAY 18TH
Days:
next day
all days

View: session overviewtalk overview

13:15-14:00 Session 2: Software and algorithms I

.

Location: Storstua
13:15
FENDIALS: A FEniCS interface to SUNDIALS for adaptive-step time integration, sensitivity analysis and optimization
SPEAKER: Chao Zhang

ABSTRACT. This talk introduces package FENDIALS, which provides an interface between FEniCS [1] and SUNDIALS [2]. The goal of the package is to utilize the existing mature functionalities of SUNDIALS, namely robust adaptive-step time integrators and sensitivity analysis capabilities, and further optimization potential with Ipopt [3]. Based on information provided by DOLFIN, such as global matrix and boundary conditions, FENDIALS is able to automatically generate callbacks to feed SUNDIALS through package Assimulo [4]. The callbacks contain methods to evaluate the system residual, jacobian, and jacobianv and to set up preconditioner, which are required by IDAS, a SUNDIALS integrator for differential-algebraic equation (DAE) problems. A dense LU solver and a sparse GMRES solver are currently available to solve the linearized sub-problems. A time-dependent non-linear sample problem is wrapped in an interface as:

myProblem = Problem(u, F, fs, u0, T, bcs, dae, verbose)

The package includes sample scripts that illustrate its use. The current sensitivity analysis feature is suitable for problems with a few parameters, as only the forward sensitivity analysis (FSA) interface is implemented. A planned interface to IDAS's continuous adjoint capability might provide an interesting complement to the discrete adjoint capability of doflin-adjoint [5].

References [1] M. S. Alnæs, J. Blechta, J. Hake, A. Johansson, B. Kehlet, A. Logg, C. Richardson, J. Ring, M. E. Rognes and G. N. Wells: The FEniCS Project Version 1.5, Archive of Numerical Software, 3(100), 2015, 9-23. [2] A. C. Hindmarsh, P. N. Brown, K. E. Grant, S. L. Lee, R. Serban, D. E. Shumaker, and C. S. Woodward: SUNDIALS: Suite of Nonlinear and Differential/Algebraic Equation Solvers, ACM Transactions on Mathematical Software, 32(3), 2005, 363-396. [3] Andreas Wächter and L. T. Biegler: On the Implementation of an Interior-point Filter Line-search Algorithm for Large-scale Nonlinear Programming, Mathematical programming, 106(1), 2006 , 25-57. [4] C. Andersson, C. Führer and J. Åkesson: A Unified Framework for ODE Solvers, Mathematics and Computers in Simulation, 116(0), 2015, 26-43. [5] P. E. Farrell, D. A. Ham, S. W. Funke, and M. E. Rognes, Automated Derivation of the Adjoint of High-level Transient Finite Element Programs, SIAM Journal on Scientific Computing, 35(4), 2013, 369-393.

13:30
TSFC: a structure-preserving form compiler

ABSTRACT. This talk presents the design and implementation of TSFC, Firedrake’s new form compiler. The core concept of TSFC is to maintain the structure of the input expression as long as possible. This facilitates the application of optimisations at the highest possible level of abstraction.

TSFC is built on two core ideas: 1. A novel way of handling arguments in interior facet integrals, exploiting the linearity of the form in its arguments. 2. Compilation happens in two stages, using a tensor algebra language as an intermediate representation. This creates better separation of concerns between the implementation of finite element objects and the optimal scheduling of the resulting tensor algebra operations.

TSFC provides good compile-time performance for complicated forms, such as those featuring non-affine elements. Its preservation of the algebraic structure of the input expressions will facilitate optimisations such as the sum factorisation of tensor product elements, once FInAT makes this available.

13:45
Optimizing finite element kernels with Loo.py and PyOpenCL
SPEAKER: Robert Kirby

ABSTRACT. The rapid evolution of GPU and other manycore architectures presents difficulty for maintaining high performance of scientific codes. While languages such as OpenCL allow one to write code that runs across many kinds of devices, the performance of such code varies greatly, requiring re-optimization for each platform. To expedite this, the Python-based Loo.py~\cite{loopy} project provides a language-neutral description of compute kernels and provides high-level tools to manipulate and optimize them toward particular architectures, with the end result of generating highly performant code in OpenCL or other languages.

In this talk, we will show how some basic finite element loop nests can be represented in Loo.py and optimized for GPU machines. Various optimization techniques (e.g.~parallelizing over cells as well as possibly matrix and/or vector entries, loop unrolling, prefetching), are applied from Python to yield a significant fraction of peak performance on modern GPUs. Additionally, we will discuss techniques for resolving the race condition inherent in assembling global results from elementwise contributions. These include segmented scans~\cite{blelloch} and atomic operations.

Finally, it is expected that Loo.py can be used as a kind of intermediate language, with users not writing entire finite element kernels by hand. Instead, one could assemble small libraries of micro-kernels and generate more complete programs be means of kernel fusion. Preliminary results for building kernels via such composition will also be discussed.

14:00-14:15Break
14:15-15:00 Session 3: Software and algorithms II

.

Location: Storstua
14:15
A tetrahedral space-filling curve via bitwise interleaving

ABSTRACT. Load-balancing is essential to ensure scalability of parallel numerical computations. For adaptive meshes that are refined and coarsened frequently during a single simulation (i.e. every few time steps), partitioning according to space-filling curves (SFC) has been established as a fast and reliable tool. Key features are an efficient implicit encoding of curve indices and minimal requirements of shared metadata. SFC have been used most prominently for hexahedral meshes. We introduce an SFC for adaptive triangular and tetrahedral meshes [1] that can be computed using bitwise interleaving operations similar to the well-known Morton curve for cubical meshes [3]. Using this space-filling curve we establish constant-time algorithms (i.e., independent of the refinement level) to compute the parent, children and face-neighbors of a given mesh element, as well as the next and previous element in the SFC. To store the information necessary for random access, we propose 10 bytes per triangle and 14 bytes per tetrahedron. Presently we are working on the adaptive mesh refinement library t8code using a forest of octrees approach (cf. [2]), implementing parallel algorithms for adaptation and partitioning.

14:30
Teaching with Jupyter Notebooks

ABSTRACT. Jupyter Notebooks provide a web-based environment for interactive programming, interleaving code, prose, mathematics, and rich output, including interactive HTML and javascript. With recent improvements in matplotlib integration, FEniCS-based content can now be reasonably produced in notebooks. Lectures with notebooks can include interactive demonstrations with code and explanatory mathematics. Student assignments can also be distributed and returned as notebooks. There are many projects surrounding Jupyter notebooks that can be useful in and out of the classroom. JupyterHub and SageMathCloud allow instructors to host notebooks as assignments without students needing to install potentially complicated packages, and nbgrader enables notebooks to be automatically graded as assignments. Binder allows authors to easily build an environment where anyone can follow along with their notebooks, where they are demonstrations of software packages, or explorations of data or physical systems.

14:45
FEECa: Finite Element Exterior Calculus in Haskell

ABSTRACT. The theory of finite element exterior calculus (FEEC), developed by Arnold, Falk and Winther, is a mathematical framework for the discretization of partial differential equations (PDEs) that allows for a universal treatment of a large number of physical problems. FEECa is a software package written in Haskell that implements this mathematical framework. Starting out as a project to explore the possibilities of using a functional programming language to implement the abstract, mathematical concepts of finite element exterior calculus, the project developed into a full-fledged basis form generator and framework for computations on differential forms. FEECa handles polynomial differential forms in arbitrary dimensions and implements monomial as well as Bernstein bases for polynomials. The package provides functionality to compute bases of finite element spaces based on the geometric decomposition proposed by Arnold, Falk and Winther.

15:00-15:15Break
15:15-16:15 Session 4: Biomedical and geological applications
Location: Storstua
15:15
FEniCS for uncertainty quantification using multilayer Monte Carlo methods
SPEAKER: Ettie Unwin

ABSTRACT. There is intrinsic uncertainty in the underlying system parameters of porous media flows which model CO2 sequestration and geothermal energy storage. To understand these flows, it is important to quantify this uncertainty and investigate the impact on functions of interest P.

Typically, Monte Carlo simulations have been used to estimate P. These are computationally expensive since many samples are needed for high levels of accuracy. A new approach is to employ multilayer Monte Carlo techniques. These involve estimating P at level L, the finest level, by solving the governing equations many times on a coarse grids level 0 with low associated computational cost and then fewer times using more expensive finer grids until level L is reached. This achieves the desired accuracy but at a much lower cost:

We focus on capturing the uncertainty in a random field, representing, for example, the permeability of rock. Of key interest is to ensure that this field can be sufficiently captured at all levels of mesh refinement employed in the multi-layer Monte Carlo iterations. We further present techniques implemented using the FEniCS suite of tools which improve the computational performance, in particular using mesh refinement and interpolation.

15:30
Orchestrating clinical simulation with FEniCS
SPEAKER: Phil Weir

ABSTRACT. In a clinical research environment, it is necessary to perform simulations where geometry and parameters are configured at runtime, often by users with significant clinical experience, but without deep knowledge of programming or numerical tools. Providing an online interface for both clinical and technical users, not fixed to pre-existing models or medical equipment, requires adaptable and comprehensive numerical libraries for technical end-users to build upon. FEniCS is well-placed to fulfil this need, supported by the breadth of Python.

The Go-Smart EU-FP7 Project (http://gosmart-project.eu) implements this within the field of minimally invasive cancer treatments, by establishing a web-based platform for clinical training, numerical model validation and interdisciplinary research.

Within this project, FEniCS provides steady-state solutions for energy deposition during microwave tumour ablation, using transverse-magnetic axisymmetric Maxwell's equations coupled to Pennes' bioheat equation, with an empirically-derived nonlinear dependence of electrical parameters on tissue temperature. Integrated FEniCS support assists technical end-users in incorporating their own numerical models of minimally invasive treatments.

The web interface allows users to segment image data, graphically place percutaneous needles and enter clinical procedure steps, which are made available to modellers' code through Python objects. Modellers and manufacturers may combine simulation models, clinical protocols, patient-specific measurements and equipment parameter sets through the web interface.

A Python server, Glossia (https://github.com/go-smart/glossia), enables remote management of simulations over standard web protocols. All software is containerised using Docker to ensure security, efficiency, reproducibility and system independence.

15:45
Poroelastic modelling of the brain

ABSTRACT. We will use a poroelastic approach to model the flow in the brain possibly using a realistic geometry and exploring different scenarios. We will present a FEniCS based solver for this equations and numerically investigate the convergence under different parameters regimes. Finally, we will present the sensitivity of the interstitial fluid flow to the permeability.

16:00
Optimization of a Spatially Varying Cardiac Contraction parameter using the Adjoint Method

ABSTRACT. A cardiac computational model is constrained using clinical measurements such as pressure, volume and regional strain. The problem is formulated as a PDE-constrained optimisation problem where the objective functional represents the misfit between measured and simulated data. The control parameter for the active phase is a spatially varying contraction parameter defined at every vertex in the mesh. This makes gradient calculations using the adjoint approach computationally advantageous over standard finite difference approximations.

16:15-18:00 Session 5: Code, posters and refreshments
Location: Pusterommet
16:15
OpenTidalFarm 1.6: A software package for the optimisation of tidal turbine arrays
SPEAKER: Dave Culley

ABSTRACT. Tidal turbines extract momentum from tidally induced oceanic currents to generate electricity. As with wind power, electricity is generated at an industrial scale by installing many tidal turbines together in an array. The power extracted from the flow by a turbine is highly sensitive to the velocity of that flow. Furthermore, hydrodynamic interactions between the flow, the turbines and the bathymetry are complex to model. This poster outlines OpenTidalFarm; a framework for the optimisation of tidal turbine arrays using a fully coupled hydrodynamic model. Unlike other tools for optimisation of turbine arrays, OpenTidalFarm has computationally economical access to the sensitivity of objectives to control variables, via the FEniCS and dolfin-adjoint framework on which it is built. The OpenTidalFarm code itself is written in Python and hence is user-friendly and accessible, while the problem-specific, efficiency- and computational architecture-optimised low-level C$+$$+$ code generated at runtime ensures the efficiency of the computation.

Scenario specific factors, such as site characteristics, technological constraints and practical engineering considerations greatly impact upon both the appropriate number of turbines to include within a tidal current turbine array (array size), and the individual locations of those turbines (turbine micro-siting). Both have been shown to significantly impact upon the energy yield and profitability of an array. Hence, industrial sized turbine arrays may be designed within a broad range of constraints and optimised for complex and occasionally conflicting objectives. These constraints may be financial, environmental or the need to minimise uncertainty. OpenTidalFarm may be run in three modes; as a stand-alone shallow water solver, to conduct sensitivity studies or in full optimisation mode -- where gradient-based optimisation algorithms efficiently find optimal array designs.

This poster presents OpenTidalFarm version 1.6 which includes advances in turbine parametrisation, and more advanced definition of optimisation objectives, control parameters and constraints than previous versions. A road map for future development is also presented.

16:15
The Firedrake Project
SPEAKER: David Ham

ABSTRACT. Firedrake: automating the finite element method by composing abstractions.

This poster shows how the components of Firedrake link together to form a coherent system. It shows the components which are common with FEniCS and how the components which are different form a largely compatible alternative to the FEniCS toolchain.

Firedrake applications.

This poster highlights some of the simulation tasks to which Firedrake is being put at a number of institutions. It will highlight its applications in ocean and atmosphere simulation, among others.

Firedrake extensions to the FEniCS language.

This poster lays out the areas in which Firedrake functionality extends that supported by FEniCS. This contribution is intended to provoke discussion about the best ways to represent this functionality, and the steps which might be taken to maximise compatibility between Firedrake and FEniCS.

16:15
Simulation of the mechanisms of neural activation and conduction
SPEAKER: unknown

ABSTRACT. TBA

16:15
(no title given)
SPEAKER: unknown

ABSTRACT. TBA

16:15
Glossia and FEniCS: Simple simulation containerization and orchestration
SPEAKER: unknown

ABSTRACT. TBA

16:15
An XFEM toolbox for FEniCS
SPEAKER: unknown

ABSTRACT. We present a poster summarizing the status quo of our work on a XFEM toolbox for FEniCS. Partly based on the PUM library by Nikbaht and Wells [1], our approach aims at automating the numerical solution of PDE-based problems with arbitrary time-dependent discontinuities. These discontinuities are described by level set functions [2] which, in turn, are used to enrich the function spaces. As examples the Stefan problem and laser based keyhole welding are considered.

[1] M. Nikbakht and G. N. Wells. Automated modelling of evolving discontinuities. Algorithms, 2(3):1008–1030, 2009. [2] M. Jahn, T. Klock. A level set toolbox including reinitialization and mass correction algorithms for FEniCS. Technical Report 16-01, University of Bremen, 2016.

16:15
Domain decomposition for marine applications in FEniCS
SPEAKER: unknown

ABSTRACT. Dividing a computational domain into multiple sub-domains and solving different equations in the sub-domains is a well known technique in many fields to overcome computational limitations and to model multi-physics problems. Domain decomposition is highly relevant for marine applications where avoiding free surface wave reflections demand large computational domains compared to the size of the phenomenon of interest. We investigate domain decomposition with an outer potential flow domain and an inner Navier-Stokes domain through FEM with FEniCS. We also investigate the use of harmonic polynomials in the potential flow domain. We study the effect of using either Dirichlet or natural boundary conditions on the coupled interface between the domain

16:15
dolfin-adjoint: Automatic Adjoint Models for FEniCS
SPEAKER: unknown

ABSTRACT. dolfin-adjoint automatically derives parallel, efficient adjoint and tangent linear models from finite-element models written in the FEniCS environment. It also provides high-level tools to solve PDE-constrained optimisation and generalised stability problems.

This poster presents an overview of dolfin-adjoint, how it works and gives application examples.

16:15
A computational algebra of hybridization methods for ocean and atmosphere discretizations
SPEAKER: unknown

ABSTRACT. Currently there is an explosion of interest in new numerical methods for oceanic and atmospheric modelling.  A driving force behind this is the need to be able to efficiently simulate ocean and atmosphere systems on massive parallel computers. Recently developed finite element methods can yield stable numerical schemes while maintaining the exact force balances which are essential for accurate ocean and atmosphere simulation. However, efficient solutions of geophysical flow equations depends on transforming the mixed velocity-pressure (or velocity-pressure-buoyancy) system into an elliptic system for pressure.  Implementing this transformation in the finite element method requires the exploitation of “hybridization” techniques, in which the discretized systems are algebraically manipulated during the equation assembly process to produce the elliptic system.

As part of the Firedrake Project, we introduce the necessary operations required for assembling the “hybridized” system.  One crucial operation is performing integration over the traces of finite elements.  We therefore introduce a computational algebra of “trace elements” as an extension to FIAT.  This new element extends the Ciarlet abstraction of a finite element to the facets of a particular cell.  However, this new addition requires changes in the FIAT interface, as well as changing how it uses the tabulation method on facets.  The addition of trace elements in FIAT are essential for performing a Schur complement decomposition, which produces the desired elliptic system.  By introducing symbolic operations for hybridization operations and generating code from them, we aim to successfully extend this system for use in automated simulation to address this important class of problem.

16:15
Towards the ultimate finite element method for the Stokes equations
SPEAKER: unknown

ABSTRACT. We present an approach for solving the Stokes system and implement our algorithm in FEniCS.