Contents

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.1.1 General Resources
  3.1.2 Version Control (git)
  3.1.3 Building (CMake)
  3.1.4 Testing (CTest)
  3.1.5 Merge Requests (Gitlab)
 3.2 Documentation and Tutorials
  3.2.1 Dependencies
  3.2.2 Compiling the User Guide
  3.2.3 Developers Guide
  3.2.4 Compiling the code documentation
 3.3 Compiling Tutorials
 3.4 Core Nektar++ Programming Concepts
  3.4.1 Namespaces
  3.4.2 C++ Standard Template Library (STL)
  3.4.3 typedefs
  3.4.4 Forward Declarations
  3.4.5 Templated Classes and Specialization
  3.4.6 Multiple Inheritance and the virtual Keyword
  3.4.7 Virtual Functions and Inheritance
  3.4.8 Const keyword
  3.4.9 Function pointers and bind
  3.4.10 Memory Pools and NekArray
 3.5 Design Patterns
  3.5.1 Template pattern
  3.5.2 Abstract Factory Pattern
 3.6 Software Testing Approaches
  3.6.1 Unit Tests
  3.6.2 Integration, System and Regression Tests
  3.6.3 Continuous Integration
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.5.1 Points
  4.5.2 Basis
 4.6 Interpreter
 4.7 Kernel
 4.8 Linear Algebra
 4.9 Memory
 4.10 Polylib
 4.11 Time Integration
  4.11.1 General Linear Methods
  4.11.2 Introduction
  4.11.3 Formulation
  4.11.4 Matrix notation
  4.11.5 General Linear Methods in Nektar++
  4.11.6 Types of time Integration Schemes
  4.11.7 Usage
  4.11.8 Implementation of a time-dependent problem
  4.11.9 Strongly imposed essential boundary conditions
  4.11.10 How to add a new time-stepping method
  4.11.11 Examples of already implemented time stepping schemes
5 Inside the Library: StdRegions
 5.1 The Fundamentals Behind StdRegions
  5.1.1 Reference Element Transformations That Facilitate Separability
  5.1.2 Reference Elements On Primitive Geometric Types
 5.2 The Fundamental Data Structures within StdRegions
  5.2.1 Variables at the Level of StdExpansion
  5.2.2 Variables at the Level of StdExpansion$D for various Dimensions
  5.2.3 Variables at the Level of Shape-Specific StdExpansions
  5.2.4 General Layout of the Basis Functions in Memory
  5.2.5 General Layout
  5.2.6 2D Geometries
  5.2.7 3D Geometries
 5.3 The Fundamental Algorithms within StdRegions
6 Inside the Library: SpatialDomains
 6.1 The Fundamentals Behind SpatialDomains
  6.1.1 Vertex and Curvature Mapping Information
  6.1.2 Regular Mappings: Geometric Factors
  6.1.3 Deformed Mappings: Geometric Factors
 6.2 The Fundamental Data Structures within SpatialDomains
  6.2.1 Variables at the Level of Geometry
  6.2.2 Variables at the Level of Geometry$D for various Dimensions
  6.2.3 Variables at the Level of Shape-Specific Geometry Information
  6.2.4 Reference to World-Space Mapping
  6.2.5 MeshGraph
 6.3 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.2.1 Variables at the Level of Expansion
  7.2.2 Variables at the Level of Expansion$D for various Dimensions
  7.2.3 Variables at the Level of Shape-Specific Expansions
 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.2.1 Variables at the Level of ExpList
  9.2.2 Variables at the Level of ExpList$D for various Dimensions
  9.2.3 Variables at the Level of Discontinuous Field Expansions
  9.2.4 Variables at the Level of Continuous Field Expansions
 9.3 The Fundamental Algorithms within MultiRegions
 9.4 Preconditioners
  9.4.1 Mathematical formulation
  9.4.2 Preconditioners
  9.4.3 Low energy
10 Inside the Library: GlobalMapping
 10.1 The Fundamentals Behind GlobalMapping
  10.1.1 Divergence operator
  10.1.2 Laplacian operator
  10.1.3 Anisotropic diffusion
  10.1.4 Anisotropic Laplacian operator
 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
II  Solvers
13 ADRSolver: Solving the Advection-Reaction-Diffusion Equation
14 IncNavierStokesSolver: Solving the Incompressible Navier-Stokes Equations
15 CompressibleFlowSolver: Solving the Compressible Navier-Stokes Equations
 15.1 Fundamental Theories of CompressibleFlowSolver
 15.2 Data Structure of CompressibleFlowSolver
 15.3 Flow Chart of CompressibleFlowSolver
III  Utilities
16 FieldConvert
17 NekMesh
IV  NekPy: Python interface to Nektar++
18 Introduction
 18.1 Features and functionality
19 Installing NekPy
 19.1 Compiling and installing Nektar++
  19.1.1 macOS
  19.1.2 Linux: Ubuntu/Debian
  19.1.3 Compiling the wrappers
 19.2 Using the bindings
  19.2.1 Examples
20 Package structure
21 NekPy wrapping guide
 21.1 Defining a library
 21.2 Basic class wrapping
  21.2.1 py::class_<>
  21.2.2 Wrapping member functions
  21.2.3 Inheritance
  21.2.4 Wrapping enums
22 Documentation
23 Memory management in NekPy
 23.1 Memory management in C++ and Python
  23.1.1 C++
 23.2 Passing C++ memory to Python
  23.2.1 Passing Python data to C++
24 FieldConvert in NekPy
 24.1 Idea and motivation
 24.2 Design and implementation
  24.2.1 FieldConverter class
  24.2.2 User workflow
  24.2.3 Conversion process
 24.3 Further development and improvement
Bibliography