-
Notifications
You must be signed in to change notification settings - Fork 0
Quick introduction and howto for glemur.
GLEMuR is a finite difference Lagrangian code which uses mimetic differential operators and runs on Nvidia GPUs. GLEMuR stands for Gpu-based Lagrangian mimEtic Magnetic Relaxation. Its main purpose is to study the relaxation of magnetic relaxation in environments of zero resistivity and viscosity.
GLEMuR is not a general purpose equation solver, neither are the full magnetohydrodynamics equations implemented. For such problems refer to other numerical codes.
- Nvidia graphic cards with computing capability 3.0 or higher
- CUDA Toolkit
- C++ compiler
- Fortran compiler
- Make
optional, but strongly recommended:
- IPython
- Paraview
- Bash
-
Obtain GLEMuR from its repository:
git clone https://[email protected]/SimonCan/glemur.git
This creates the directoryglemur
with its source files. -
Add the binary and python directories to your PATH and PYTHONPATH environmental variables:
export PATH=$PATH:glemur/bin
,export PATH=$PYTHONPATH:glemur/python
If you are using anything else then bash add the paths accordingly. For convenience, copy those lines into your~/.bashrc
. -
Compile GLEMuR within the
glemur/src
directory by simply typingmake
. -
Create the directory
data
. -
Run the code with
./glemur
Before we can plot we need to make sure that IPython knows about GLEMuR by changing a few configuration files. These can reside in different directories, depending on which operating system or distribution you have. The following will work with Ubutnu 14.04:
-
Add to your
~/.ipython/ipythonrc
:import_all glemur
. -
Add to your
~/.ipython/profile_default/startup/init.py
:import glemur as gm
andimport pylab as plt
. -
Go back to your simulation directory
glemur/src
and startipython
. -
Load and plot the data:
ts = gm.readTs()
,plt.plot(ts.t, ts.B2)
.
- Tidy up your simulation directory structure.
- Simulation parameters.
- Creating custom initial conditions.
- Time stepping.
- Boundary conditions.
- Mimetic operators.