SFEMaNS
version 4.1 (work in progress)
Reference documentation for SFEMaNS
|
SFEMaNS uses the sofware PETSc to do the linear algebra in parallel. The following documentation describes the procedure to install PETSc. We refer to https://www.mcs.anl.gov/petsc/download/index.html
for more information about PETSc. Since it is more efficient to use the native PETSc of your cluster, you may want to ask your root administrator to install it for you. If you do so, you need to specify that you want the version petsc-3.7.2 and that it needs to include blaslapack, hypre, mumps, scalapack, metis, parmetis and blacs.
Here is the procedure to install PETSc by yourself:
petsc-3.7.2
. export
can be replaced by setenv
or equivalent. The installation of petsc-3.7.2 is now complete.
To compute nonlinear terms efficiently, SFEMaNS uses the package FFTW (Fast Fourier Transform in the West). If it is not yet installed in your work environment, either ask your root administrator to install it or follow the instructions in http://www.fftw.org/download.html
.
SFEMaNS can solve eigenvalue problem using the software ARPACK. If you do not plan to solve such problems, you don't need to install ARPACK. However you will be required to comment a few lines in the file main.f90
as describeb in the next section.
The following describes the procedure to install ARPACK by yourself. We refer to http://www.caam.rice.edu/software/ARPACK/
for more information on ARPACK and its installation.
ARmake.inc
. Here are the main steps to follow. ARmake.inc
, you need to know which environment you are using (SUN4, SP2, ...). ARMAKES
. For example for sun4, type the command: ARmake.inc
. The installation of arpack and parpack is now complete.
In this section, we describe how to download SFEMaNS and how to get an executable called a.exe
. We also provide information on how to check that SFEMaNS and the above sofwares are installed correctly.
Download SFEMaNS_v4.1 with the following command:
Then move the file SFEMaNS_v4.1.tar.gz
where you want to install the code SFEMaNS. Untar it with the command:
Define the following environment variable in your .bashrc
:
Note that depending of your shell environment, the command export
can be replaced by setenv
or equivalent.
IMPORTANT: this last step is required as the code SFEMaNS needs to know this variable when compiling the executable. As a consequence, we ask every user to add this line in his .bashrc
or equivalent.
To generate an executable of the code SFEMaNS, the following files are needed:
make.inc
that defines environment variable (path to PETSc, FFTW, ARPACK) and compilation options. my_make
that allows to generate a file called makefile
. This file contains the tree of the code (which module need which modules, etc.). main.f90
that is used to set the desired outputs with the subroutine my_post_processing
. condlim.f90
that is used to set the initial conditions, boundary conditions and source term of the problem considered. read_user_data.f90
that is used to add new variable in the code. For instance, such variable can be used in the condlim to change the amplitude of a forcing term. Templates of each of the above files are available in the following directory: $SFEMaNS_DIR/TEMPLATE
. We refer to the section Computations with SFEMaNS for more details on how to generate your own executable and set properly your data
file.
The code SFEMaNS presents more than 30 tests that mainly involve manufactured solutions. They have been implemented so one can check the correct installation of the code. It also allows developpers to check the consistency of the new features they implement. To run these test, follows the intructions below:
main.f90
: make.in_template
and my_make_template
as follows: make.inc
. parpack_MPI-SUN4.a
and libarpack_SUN4.a
needs to be change for system other than sun4. debug_SFEMaNS_template
as follows: debug_SFEMaNS_template
with the following command: main.f90
, the test 14 can't be sucessfull as it uses ARPACK. The ouput of each test, which can be found in the files called fort.10_T*, are compared with reference values. These reference values are at the end of the files $SFEMaNS_DIR/MHD_DATA_TEST_CONV_PETSC/debug_data_* where * is the number of the test considered. The output of the test 14 are written in the first two lines of two files named fort.10_T14
and fort.11
.