PIC

A Programmer’s Guide to Nektar++

Department of Aeronautics, Imperial College London, UK
Scientific Computing and Imaging Institute, University of Utah, USA

December 1, 2026

Nektar++ Developer’s Guide

1 Preface
2 Introduction
2.1 The Ethos of Nektar++
2.2 The Structure of Nektar++
2.3 Assumed Proficiencies
2.4 Other Software Implementations and Frameworks
2.5 How to Use This Document
3 Preliminaries
3.1 Summary of Development Tools and Best Practices
3.2 Documentation and Tutorials
3.3 Compiling Tutorials
3.4 Core Nektar++ Programming Concepts
3.5 Design Patterns
3.6 Software Testing Approaches
I  Building-Blocks of Our Framework (Inside the Library)
4 Inside the Library: LibUtilities
4.1 BasicConst
4.2 BasicUtils
4.3 Communication
4.4 FFT
4.5 Foundations
4.6 Interpreter
4.7 Kernel
4.8 Linear Algebra
4.9 Memory
4.10 Polylib
4.11 SIMDLib
4.12 Time Integration
5 Inside the Library: StdRegions
5.1 The Fundamentals Behind StdRegions
5.2 The Fundamental Data Structures within StdRegions
5.3 The Fundamental Algorithms within StdRegions
6 Inside the Library: SpatialDomains
6.1 The Fundamentals Behind SpatialDomains
6.2 The Fundamental Data Structures within SpatialDomains
6.3 Node Orderings for Curved Geometry
6.4 The Fundamental Algorithms within SpatialDomains
7 Inside the Library: LocalRegions
7.1 The Fundamentals Behind LocalRegions
7.2 The Fundamental Data Structures within LocalRegions
7.3 The Fundamental Algorithms within LocalRegions
8 Inside the Library: Collections
8.1 The Fundamentals Behind Collections
8.2 The Fundamental Data Structures within Collections
8.3 The Fundamental Algorithms within Collections
9 Inside the Library: MultiRegions
9.1 The Fundamentals Behind MultiRegions
9.2 The Fundamental Data Structures within MultiRegions
9.3 The Fundamental Algorithms within MultiRegions
9.4 Preconditioners
10 Inside the Library: GlobalMapping
10.1 The Fundamentals Behind GlobalMapping
10.2 The Fundamental Data Structures within GlobalMapping
10.3 The Fundamental Algorithms within GlobalMapping
11 Inside the Library: FieldUtils
11.1 The Fundamentals Behind FieldUtils
11.2 The Fundamental Data Structures within FieldUtils
11.3 The Fundamental Algorithms within FieldUtils
12 Inside the Library: SolverUtils
12.1 The Fundamentals Behind SolverUtils
12.2 The Fundamental Data Structures within SolverUtils
12.3 The Fundamental Algorithms within SolverUtils
13 Inside the Library: SolverCore
13.1 SolverCore Filters
II  Solvers
14 ADRSolver: Solving the Advection-Reaction-Diffusion Equation
15 IncNavierStokesSolver: Solving the Incompressible Navier-Stokes Equations
15.1 Fundamental Theories of IncNavierStokesSolver
15.2 Functions of the implementation
15.3 Structure of the algorithm
16 CompressibleFlowSolver: Solving the Compressible Navier-Stokes Equations
16.1 Fundamental Theories of CompressibleFlowSolver
16.2 Functions of the implementation
16.3 Data Structure of CompressibleFlowSolver
16.4 Flow Chart of CompressibleFlowSolver
III  Utilities
17 FieldConvert
18 NekMesh
18.1 Introduction
18.2 Overview of the redesign
18.3 Theory
18.4 Input Modules
18.5 Mesh generation from CAD
18.6 Process Modules
18.7 Output Modules
Bibliography
Bibliography
IV  NekPy: Python interface to Nektar++
19 Introduction
19.1 Features and functionality
20 Installing NekPy
20.1 Compiling and installing Nektar++
20.2 Using the bindings
21 Package structure
22 NekPy wrapping guide
22.1 Defining a library
22.2 Basic class wrapping
23 Documentation
24 Memory management in NekPy
24.1 Memory management in C++ and Python
24.2 Passing C++ memory to Python
25 FieldConvert in NekPy
25.1 Idea and motivation
V  Redesign
26 MemoryRegion Class
26.1 MemoryRegion
26.2 MemoryStorage
27 Field Class
27.1 BlockAttributes
27.2 BlockAccessor
27.3 Field
28 Element Operators
28.1 File structure
28.2 Apply() by Example
28.3 PhysDeriv z-derivative GPU acceleration (3DH1D)
28.4 Trace extraction
28.5 The fused element-local operators
29 Redesign Incompressible Navier–Stokes Solver
29.1 Overview
29.2 Governing equations and time discretisation
29.3 Boundary conditions
29.4 Initial conditions and restarts
29.5 Pressure kick at start-up and restart
29.6 Filters
29.7 Usage and parameters
29.8 Implementation map
30 Higher-order pressure boundary condition
30.1 Purpose of the condition
30.2 The exact algebra evaluated by the code
30.3 Geometric setup
30.4 Volume-to-boundary evaluation
30.5 Boundary-to-volume weak assembly
30.6 Relation to the pressure Poisson weak form
30.7 Solvability of a singular pressure system
30.8 Implementation map
30.9 Execution-space considerations
30.10 Summary
30.11 Known follow-ups
31 Dong’s high-order outflow boundary condition
31.1 What problem does HOutflow solve?
31.2 Physical picture at an open boundary
31.3 One time-integration stage: the complete workflow
31.4 Setup performed once
31.5 Pressure phase in detail
31.6 Velocity phase in detail
31.7 Memory and execution-space workflow
31.8 Session configuration
31.9 Comparison with ordinary higher-order pressure boundaries
31.10 Implementation map and invariants
31.11 A compact debugging checklist
31.12 Summary
32 Redesign Advection–Diffusion–Reaction Solver
32.1 Filters
33 Redesign Compressible Flow Solver
33.1 Filters
Bibliography
Bibliography

[next]