SLIM solves the governing equations on adaptative unstructured meshes using the discontinuous Galerkin finite element method.
slimPre contains the tools writing the input files necessary for the simulations (for simulations, see slim.py file), such as partitioned mesh, bathymetry, coriolis, wind, tides, ...
To generate the input files, run the script my_prepro_script.py:
- On a single core: rundgpy my_prepro_script.py
- On multiple cores: mpirun -np N rundgpy my_prepro_script.py (replace N by the number of cores)
...
...
@@ -28,7 +28,7 @@
The write_file function writes a netcdf file, using a Region object (giving the nodes for which there is data), a time object (giving the times of the data), and a list of data tuples.
The first variable of a data tuple is the data name.
The secod variable of a data tuple is the data array, with as many lines as the number of nodes, and as many columns as the number of time steps
netcdf_to_msh:
The function transforms a netcdf file to a .msh file.
...
...
@@ -40,13 +40,13 @@
smooth_bathymetry:
The function smooths the given bathymetry, following a smoothing criterion, and writes it to a file. It can also write a bathymetry constant per element (P0), for a better stability. If the bathymetry is P0, it will be written in a idx file. Otherwise, it will be written in a netcdf file.
interpolate_from_structured_grid
The function interpolates from structured data
interpolate_from_structured_file
The function interpolates structured data from a GMSH-file
get_data_from_netcdf:
The function returns the data array contained in the netcdf file given as an argument
...
...
@@ -61,16 +61,16 @@
make_directory:
This function makes a directory if it does not exist
partition_mesh:
This function partitions the mesh (if run in multiprocessing)
partition_id:
This function returns the number of the current partition as a string
partition_nb:
This function returns the number of partitions used as a string