Examples for Nek5000
Python Fortran Shell Matlab
Latest commit 55d236a Feb 20, 2017 @RonRahaman RonRahaman committed on GitHub Merge pull request #37 from RonRahaman/master
Removed artifacts from an outdated makenek
Permalink
Failed to load latest commit information.
2d_annulus added 2D annulus example, pff Mar 5, 2015
2d_eigtest updated to match repo hmholtz.f, pff Jan 14, 2016
3d_annulus add 3d_annulus example,pff Jun 26, 2015
3dbox
CMT CMT examples, pff + JH + MS Nov 5, 2015
axi
benard adjust BB tests Mar 21, 2014
blasius adjust BB tests Mar 21, 2014
cone fix cone256 example Oct 28, 2015
conj_ht adjust BB tests Mar 21, 2014
cyl_restart Update of cyl_restart run case for the new restart procedure. Nov 4, 2016
eddy update BB tests, small fix to velocity projection Jun 9, 2014
eddy_neknek
eddy_psi_omega clean up psi-omega example, pff Apr 5, 2014
expansion adjust BB tests Mar 21, 2014
ext_cyl adjust BB tests Mar 21, 2014
fs_2 adjust BB tests Mar 21, 2014
fs_hydro adjust BB tests Mar 21, 2014
hemi adjust BB tests Mar 21, 2014
incl_def New example with all include files Oct 11, 2016
kov_st_state adjust BB tests Mar 21, 2014
kovasznay adjust BB tests Mar 21, 2014
lib Updated location of makenek from core/ to bin/ Feb 20, 2017
lowMach_test Updated .par file for lowMach_test Nov 30, 2016
mhd adjust BB tests Mar 21, 2014
moab finished updating examples .rea and .usr to reflect default p66/p67 s… Mar 17, 2014
moab_conjht adjust BB tests Mar 21, 2014
mv_cyl Removed artifacts from an outdated makenek Jan 25, 2017
ocyl added 2nd ocyl2 case, pff Feb 20, 2015
ocyl_neknekm fixed fs examples and new README for neknek example Jul 16, 2015
os7000 adjust BB tests Mar 21, 2014
peris Updated BB tests, fixed 8-byte genmap error May 9, 2014
pipe adjust BB tests Mar 21, 2014
rayleigh adjust BB tests Mar 21, 2014
robin adjust BB tests Mar 21, 2014
shear4
solid adjust BB tests Mar 21, 2014
strat adjust BB tests Mar 21, 2014
taylor adjust BB tests Mar 21, 2014
thermal_io adjust BB tests Mar 21, 2014
timing adjust BB tests Mar 21, 2014
turbChannel Fix for turbChannel.usr with bg_xlf compiler & less output in add_tem… May 19, 2015
turbJet adjust BB tests Mar 21, 2014
var_vis adjust BB tests Mar 21, 2014
vortex adjust BB tests Mar 21, 2014
vortex2 adjust BB tests Mar 21, 2014
.gitignore Updated .gitignore to exclude PyCharm project data Sep 14, 2016
.gitmodules
NekTests.py Excessive solver time produces a warning, not a failure Nov 18, 2016
README.md Updated default environment variables. Nov 4, 2016
__init__.py Moved everything from NekUnitTests/ to the base directory May 20, 2016

README.md

NekTests

Nek unittests

The NekTests.py module contains the Nek5000 verification tests, implemented using the Python standard-library unittest framework. NekTests requires Python 2.7 or higher.

Module Contents

The module contains a separate class for each test problem. The classes are:

  • Axi
  • Benard_Ray9
  • Benard_RayDD
  • Benard_RayDN
  • Benard_RayNN
  • Blasius
  • ConjHt
  • CylRestart_Ca
  • CylRestart_Cb
  • CylRestart_Pa
  • CylRestart_Pb
  • Eddy_EddyUv
  • Eddy_PsiOmega
  • ExtCyl
  • Fs2_St1
  • Fs2_St2
  • Fs2_StdWv
  • FsHydro
  • Hemi
  • Kovasznay
  • KovStState
  • LowMachTest
  • Mhd_Gpf
  • Mhd_GpfB
  • Mhd_GpfM
  • Os7000
  • Peris
  • Pipe_Helix
  • Pipe_Stenosis
  • Rayleigh_Ray1
  • Rayleigh_Ray2
  • Shear4_Shear4
  • Shear4_Thin
  • Solid
  • Strat_P0001
  • Strat_P1000
  • Taylor
  • ThreeDBox
  • TurbChannel
  • VarVis
  • Vortex
  • Vortex2

Each class also contains four methods for different formulations and parallelization modes:

  • test_PnPn_Serial
  • test_PnPn_Parallel
  • test_PnPn2_Serial
  • test_PnPn2_Parallel

Running Tests

The tests may be run using the Python standard-library 'unittest' module, which requires no additional dependencies. The tests may also be run with any third-party testing tool compatible with unittest, such as nose, py.test, TwistedTrial, and others.

Setting Up Your Environment

Before running the tests, these environment variables should be defined:

  • SOURCE_ROOT: Points to the top-level Nek5000 repository. (default: none)
  • CC: The C compiler you wish to use. (default: gcc)
  • F77: The Fortran 77 compiler you wish to use. (default gfortran)
  • IFMPI=[true|false]: If true, run tests with MPI. (default: false)

These environment variables may optionally be defined:

  • EXAMPLES_ROOT: Points to an alternate Nek5000 examples directory. For example, $HOME/NekExamples. (default: this directory)
  • TOOLS_ROOT: Points to an alternate directory for Nek5000 tools. (default: $SOURCE_ROOT/tools)
  • SCRIPTS_ROOT: Points to an alternate directory Nek5000 scripts directory.
  • TOOLS_BIN: If defined, compile tools in this directory. (default: $SOURCE_ROOT/bin)
  • LOG_ROOT: If defined, move completed logs into this directory. If not defined, leave logs in the example folders. (default: undefined)
  • VERBOSE_TESTS=[true|false]: If true, display standard output from compiler and Nek5000 to terminal window. Standard output will always be recorded in logfiles, whether VERBOSE_TESTS is true or false. (default: true)
  • PARALLEL_PROCS: The number of processes to use when running with MPI. (default: 4)

Running NekTests with unittest

To run all the tests, first cd into this directory and then run: $ python -m 'unittest' NekTests

If you wish to run tests for just one example problem (for example, "TurbChannel"), run: $ python -m 'unittest' NekTests.TurbChannel

If you wish to run tests for just one example problem and one formulation/parallelization (for example, test_PnPn_Serial), run: $ python -m 'unittest' NekTests.TurbChannel.test_PnPn_Serial