Skip to content

Smesh.jl is a lightweight wrapper of the Fortran package smesh for generation and handling of unstructured meshes

License

Notifications You must be signed in to change notification settings

trixi-framework/Smesh.jl

Repository files navigation

Smesh.jl

Docs-stable Docs-dev Build Status Coveralls Codecov License: MIT DOI

Smesh.jl is a Julia wrapper packagae for smesh, a simple Fortran package for generating and handling unstructured triangular and polygonal meshes.

Getting started

Prerequisites

If you have not yet installed Julia, please follow the instructions for your operating system. Smesh.jl works with Julia v1.8 and later on Linux, macOS and Windows platforms.

Note: On pre-Apple Silicon systems with macOS, Julia v1.10 or later is required.

Installation

Since Smesh.jl is a registered Julia package, you can install it by executing the following command in the Julia REPL:

julia> import Pkg; Pkg.add("Smesh")

By default, Smesh.jl uses pre-compiled binaries of the smesh package that will get automatically installed when obtaining Smesh.jl. However, you can also make use of a local smesh build. For this, create a LocalPreferences.toml file next to your Project.toml for the project in which you use Smesh.jl. It should have the following content:

  • On Linux:
    [Smesh]
    libsmesh = "<smesh-install-prefix>/lib/libsmesh.so"
  • On macOS:
    [Smesh]
    libsmesh = "<smesh-install-prefix>/lib/libsmesh.dylib"
  • On Windows:
    [Smesh]
    libsmesh = "<smesh-install-prefix>/bin/libsmesh.dll"

Where <smesh-install-prefix> is where you have installed the local smesh build.

Usage

The easiest way to get started is to run one of the examples from the examples directory by includeing them in Julia, e.g.,

julia> using Smesh

julia> include(joinpath(pkgdir(Smesh), "examples", "build_delaunay_triangulation.jl"))
Computing Delaunay triangulation.
Triangulation elements:          2
Total flipped edges:             0
Average search time:          1.25
Flips/triangle:               0.00
Flips/node:                   0.00
3×2 Matrix{Int64}:
 3  1
 1  3
 2  4

Referencing

If you use Smesh.jl in your own research, please cite this repository as follows:

@misc{chiocchetti2024smesh_jl,
  title={Smesh.jl: {A} {J}ulia wrapper for the Fortran package smesh to generate and handle unstructured meshes},
  author={Chiocchetti, Simone and Bolm, Benjamin and Schlottke-Lakemper, Michael},
  year={2024},
  howpublished={\url{https://github.com/trixi-framework/Smesh.jl}},
  doi={10.5281/zenodo.10581816}
}

Please also consider citing the upstream package smesh (doi:10.5281/zenodo.10579422) itself.

Authors

Smesh.jl was initiated by Simone Chiocchetti (University of Cologne, Germany), Benjamin Bolm (University of Cologne, Germany), and Michael Schlottke-Lakemper (RWTH Aachen University/High-Performance Computing Center Stuttgart (HLRS), Germany) who are also its principal maintainers.

License and contributing

Smesh.jl and smesh itself are available under the MIT license (see LICENSE.md). Contributions by the community are very welcome!

About

Smesh.jl is a lightweight wrapper of the Fortran package smesh for generation and handling of unstructured meshes

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages