Tutorials

The tutorials teach samurai by example. Each one builds a program step by step and explains what it does to the mesh and the fields. To carry out a precise task, see the how-to guides. To look up how a feature behaves, see the reference or the API reference.

Start here

  • Getting started: a first adaptive simulation: install samurai, then write, build and run a program that transports a disc on an adaptive mesh.

  • Hands-on samurai course: the guided path through samurai. The course starts with a mesh and a field and ends with a 2D solver for the Euler equations on an adaptive mesh, one part at a time.

Data structure

These tutorials explain how samurai stores a mesh and its fields, and how a program walks through them. Each one builds on the previous one.

Solvers

These tutorials write a complete solver on an adaptive mesh.

Complete programs

After the tutorials, start from a complete program close to your problem.

  • Demos: the programs of the demos/ folder, with the CMake target and a run command for each one.

  • samurai gallery: complete simulations with videos of the solution and the mesh, each one a self-contained project.