Skip to content

Inputs

Tolosa-lib provides flexible input management through:

  • Command-line arguments
  • Text configuration files (input.txt)
  • YAML configuration files
  • User-defined functions (m_user_data.f90)

The type(cli) structure allows passing arguments via command line:

Terminal window
./exe -nx 100 -ny 100 -dt 0.1 -t_end 100.0

The input.txt file contains simulation parameters:

# Domain parameters
nx = 100
ny = 100
lx = 1000.0
ly = 1000.0
# Time parameters
dt = 0.1
t_end = 100.0
# Output parameters
output_frequency = 10

For complex configurations, use YAML files with the type(yaml_file) structure:

domain:
nx: 100
ny: 100
extent:
lx: 1000.0
ly: 1000.0
time:
dt: 0.1
t_end: 100.0
output:
frequency: 10
format: vtk

The m_user_data.f90 file contains user-defined Fortran functions for:

  • Initial conditions
  • Boundary conditions
  • Source terms
  • Custom bathymetry