Getting Started with Tolosa-lib
Getting Started
Section titled “Getting Started”This guide will help you get started with compiling and running Tolosa-lib examples.
Prerequisites
Section titled “Prerequisites”Before you begin, make sure you have:
- A Fortran compiler (GNU Fortran or Intel Fortran)
- Make utility
- MPI library (for parallel execution)
- Scotch library (for mesh partitioning)
Cloning the Repository
Section titled “Cloning the Repository”git clone https://github.com/TolosaProject/Tolosa-lib.gitcd Tolosa-libCompile a Library Case Example
Section titled “Compile a Library Case Example”Tolosa-lib includes several example cases that demonstrate its features.
Basic Compilation
Section titled “Basic Compilation”makeThis will:
- Compile all Fortran modules
- Link the executable
- Place the executable in the
/bindirectory
Compilation Options
Section titled “Compilation Options”You can customize the compilation with various options:
# Use Intel compilermake COMPILER=intel
# Enable debug modemake DEBUG=yes
# Set optimization levelmake OPT=3Running an Example
Section titled “Running an Example”After compilation:
cd bin./exeInput Files
Section titled “Input Files”The bin directory should contain:
input.txt- Main configuration filem_user_data.f90- User-defined functions for initial/boundary conditions
Example input.txt
Section titled “Example input.txt”# Mesh parametersnx = 100ny = 100lx = 1000.0ly = 1000.0
# Time parametersdt = 0.1t_end = 100.0
# Output parametersoutput_frequency = 10output_format = vtkParallel Execution
Section titled “Parallel Execution”To run with MPI:
mpirun -np 4 ./exeThis will use 4 MPI processes for parallel computation.
Output Files
Section titled “Output Files”Results are written to /bin/res/ directory in the format specified in input.txt:
- VTK files:
.vtkextension - Tecplot files:
.pltextension - Binary files:
.binextension - CSV files:
.csvextension
Next Steps
Section titled “Next Steps”- Initialization and Finalization - Learn about program lifecycle
- Inputs - Understand input file structure
- Outputs - Configure output files
- Mesh - Work with unstructured meshes