Home

Awesome

MeshTutor.jl

Bundle of tutorials for the mesh-management library, MeshSteward, and the core mesh library, MeshCore.

Sample mesh

Usage

Visualization

The tutorial will produce files for mesh visualization in the Paraview format (VTK). One can display this information by loading the file with paraview.exe. When the tutorial is executed in mybinder.org, the graphics file needs to be downloaded to your desktop, and then visualized locally. Executing the notebooks locally may start paraview.exe automatically, provided the executable is somewhere in the path. Otherwise there will be a harmless error: failure to start the visualization program. Start then a program of your choice manually to visualize the VTK files.

Executing the tutorials in notebook form with mybinder

Alas, mybinder.org is still on 1.5, so that the configuration files are preventing a build to succeed. Please use the method based on including the tutorial file below. The tutorials may be executed on mybinder.org.

Binder

Enter the tutorials folder and open one of the tutorial notebooks (for instance tutorial1.ipynb). Then execute the notebook, either cell by cell or in its entirety.

The advantage is that no local installation of Julia and of the repository is needed. The disadvantage is that the graphics postprocessing will not be as easy as for local execution, since the binder cannot run the visualization program. The visualization is still possible by using the "File" menu in the notebook interface, checking the box next to the generated file, and downloading it to your computer.

Using a local notebook

Clone the package to your working directory:

git clone https://github.com/PetrKryslUCSD/MeshTutor.jl.git

Change your working directory to MeshTutor.jl. Start Julia and run the following:

using Pkg; Pkg.activate("."); Pkg.instantiate()
Pkg.build()

In general the tutorials require the folder MeshTutor.jl/notebooks to be the working directory since the scripts assume that the input files will be found in the current directory. So to run a tutorial, do

using IJulia    
IJulia.notebook(dir = pwd(), detached = true)

head over to the notebooks folder, open the tutorial notebook, and evaluate in Jupyter.

Using direct inclusion of the tutorial files

The tutorials can be executed directly by including them in the Julia prompt. First activate and instantiate the repository. Then find the source files for the tutorials in deps folder. Use for instance include("tutorial1.jl"). This will execute the entire tutorial. Alternatively, open the tutorial in your favorite editor, and execute line by line.

News