Skip to content

Settings File

Dominykas edited this page Sep 14, 2026 · 1 revision

Settings File

This page documents the YAML settings file used to configure the solver runtime, rendering, and encoding.

lattice

Defines the lattice model.

Field Description
dual Do not modify.
fields Do not modify.
distributions Number of distributions. For the MONATOMIC model, this can be set to 49, since that model does not require a second set of populations — cutting memory demand in half.
lattice:
  dual: false #do not modify
  fields: 8 #do not modify
  distributions: 98

solver

Do not modify.

Field Description
commandBuffer.autoset —
commandBuffer.executeOnRun —
commandBuffer.field_max —
commandBuffer.field_min —
buffering.mode Buffering mode
buffering.buffer_size Buffer size
geometry_file.path Path to the geometry/config file
solver:
  commandBuffer:
    autoset: false
    executeOnRun: false
    field_max: 0.005
    field_min: 0
  buffering:
    mode: compressed
    buffer_size: 4
  geometry_file:
    path: "../set.yaml"

memory

Do not modify.

Field Description
mode Memory mode
buffers.device.fields Device buffer type for fields
buffers.device.distributions Device buffer type for distributions
buffers.host.fields Host buffer type for fields
buffers.host.distributions Host buffer type for distributions
memory:
  mode: Device
  buffers:
    device:
      fields: DevicePure
      distributions: DevicePure
    host:
      fields: HostGeneric
      distributions: HostGeneric

rendering

Top-level rendering dimensions. Must match the render_window values in the config file.

Field Description
render_window.x Render window width
render_window.y Render window height
rendering:
  render_window:
    x: 1900
    y: 900

runtime

Runtime configuration. Can be changed to improve performance (especially when running optimize_device_launch()).

runtime.thread_config

The product of all threads must be < 1024, and z must be 1 since the simulation does not support the 3D solver yet.

Field Description
x Threads in x
y Threads in y
z Threads in z. Must be 1.
runtime:
  thread_config:
    x: 32
    y: 2
    z: 1

runtime.verbose_output

Enables/disables extra information about the simulation during runs.

runtime:
  verbose_output: true

runtime.precision

Do not modify. Currently, all precision must be float4 / float. In later versions, double precision will be enabled. If you require FP64 precision, open an issue on GitHub — the PyPI repository currently cannot host double precision due to size limitations.

Field Description
DRAM DRAM precision
register Register precision
compute Compute precision
runtime:
  precision:
    DRAM: float4 #double4_32a
    register: float #double
    compute: float #double

runtime.solver

Do not modify.

Field Description
alphaMode —
kernel_debug —
runtime:
  solver:
    alphaMode: False
    kernel_debug: false

runtime.rendering

Field Description
render_window.x Render window width. Must match the config file.
render_window.y Render window height. Must match the config file.
frame_rate Playback/capture frame rate
passes_per_frame Rendering passes per frame
show_window Whether to show the render window
renderer Renderer mode
compute_shader Path to the compute shader. Do not modify.
vertex_shader Path to the vertex shader. Do not modify.
fragment_shader Path to the fragment shader. Do not modify.

GLFW settings (show_window, etc.) — do not change for the headless version.

runtime:
  rendering:
    render_window:
      x: 1900
      y: 900
    frame_rate: 60
    passes_per_frame: 1
    show_window: true
    renderer: DIRECT
    compute_shader: "../Rendering/shaders/compute.glsl"
    vertex_shader: "../Rendering/shaders/vertex.glsl"
    fragment_shader: "../Rendering/shaders/fragment.glsl"

runtime.encoding

Encoding settings, used if FFMPEG is enabled.

Field Description
enabled Enables/disables FFMPEG encoding
args FFMPEG command-line arguments
N_FRAMES Maximum number of frames the solver is expected to run — acts as an extra termination condition if EXT events are not triggered.
runtime:
  encoding:
    enabled: true
    args: "ffmpeg -r 60 -f rawvideo -pix_fmt rgb24 -s %dx%d -i - -threads 0 -preset slow -y -pix_fmt yuv420p -crf 18 /home/dominykas/Desktop/shockFlowProject/RiemannProblem/"
    N_FRAMES: 100000

runtime.logging

Field Description
logging_level Logging verbosity level
logging_folder Folder where logs are written
solver_log Solver log filename
memory_log Memory log filename
runtime:
  logging:
    logging_level: 3
    logging_folder: "Logs/"
    solver_log: "solver_log.log"
    memory_log: "memory_log.log"

DEBUG_MODE

Sets debugging mode for the solver on/off. For high Mach flows, it is highly recommended to enable this. While it hurts performance, it helps avoid ill-conditioned systems and stops the simulation if one occurs.

DEBUG_MODE: TRUE

commands

Do not modify.

Field Description
kernel_debug —
autoset —
execute —
screen_limits_x —
screen_limits_y —
selected_field —
runs_per_frame —
commands:
  kernel_debug: true
  autoset: false
  execute: true
  screen_limits_x: 0.005
  screen_limits_y: 0.000
  selected_field: 2
  runs_per_frame: 2

Full Example Settings File

#defines the lattice. For MONATOMIC model, the distributions can be set to 49 (that model does not require a second set of populations, cutting memory demand in half)
lattice:
  dual: false #do not modify
  fields: 8 #do not modify
  distributions: 98
 
#do not modify
solver:
  commandBuffer:
    autoset: false
    executeOnRun: false
    field_max: 0.005
    field_min: 0
  buffering:
    mode: compressed
    buffer_size: 4
  geometry_file:
    path: "../set.yaml"
 
#do not modify
memory:
  mode: Device
  buffers:
    device:
      fields: DevicePure
      distributions: DevicePure
    host:
      fields: HostGeneric
      distributions: HostGeneric
 
#Dimensions for the rendering output => must match to the ones in config file
rendering:
  render_window:
    x: 1900
    y: 900
 
#runtime configuration. Can be changed to improve performance (especially if running optimize_device_launch()). Note that the product of all threads must be < 1024
#and z = 1 since the simulation does not support 3D solver yet.
#verbose output enables / disables extra information about the simulation during runs.
#precision => currently, all precision must be float4 / float float. Do not modify. In later versions, double precision will be enabled.
#if you require FP64 precision, make an issue on github. Currently the PYPI repository cannot host double precision due to size limitations.
runtime:
  thread_config:
    x: 32
    y: 2
    z: 1
  verbose_output: true
 
  precision:
    DRAM: float4 #double4_32a
    register: float #double
    compute: float #double
 
  #do not modify
  solver:
    alphaMode: False
    kernel_debug: false
 
  rendering:
    #Dimensions for the rendering output => must match to the ones in config file
    render_window:
      x: 1900
      y: 900
    #GLFW settings => do not change for headless version
    frame_rate: 60
    passes_per_frame: 1
    show_window: true
    renderer: DIRECT
    #OpenGL shaders => DO NOT MODIFY
    compute_shader: "../Rendering/shaders/compute.glsl"
    vertex_shader: "../Rendering/shaders/vertex.glsl"
    fragment_shader: "../Rendering/shaders/fragment.glsl"
 
  #encoding settings if using FFMPEG
  #N frames indicates the maximum amount of frames the solver is expected to run (extra termination if EXT events are not triggered)
  encoding:
    enabled: true
    args: "ffmpeg -r 60 -f rawvideo -pix_fmt rgb24 -s %dx%d -i - -threads 0 -preset slow -y -pix_fmt yuv420p -crf 18 /home/dominykas/Desktop/shockFlowProject/RiemannProblem/"
    N_FRAMES: 100000
  #logging
  logging:
    logging_level: 3
    logging_folder: "Logs/"
    solver_log: "solver_log.log"
    memory_log: "memory_log.log"
 
#Sets Debugging Mode for the solver to Enabled / Disabled. For High Mach FLOWS, it is highly recommended to enable this. While hurting performance
#this will help avoid ill-conditioned systems and stop the simulation in case of that.
DEBUG_MODE: FALSE
 
#do not modify
commands:
  kernel_debug: true
  autoset: false
  execute: true
  screen_limits_x: 0.005
  screen_limits_y: 0.000
  selected_field: 2
  runs_per_frame: 2

shockFLOW Wiki

Home


Getting Started

Simulation Setup

Exporting Results

Logging & Troubleshooting


Links

Clone this wiki locally