Nek5000 core library

Note

The following is auto-generated using Doxygen and represents a fork of Nek5000 v19. Only subroutines relevant to the project are listed here. The official documentation is hand-written and is more general.

group core

Functions

program nekton()

Drives the solver calling 3 subroutines:

subroutine nek_init(comm comm)

Initializes the solver and variables.

Calls the following subroutines in order:

  • iniparser: ?

  • Session get_session_info(), dnekclock(), opcount() <- 1

  • Grid: initdim(), initdat(), files(), dnekclock(), readat()

  • Sync: dnekclock_sync(): mpi_barrier() and mpi_wtime()

  • Initialize variables: setvar()

  • Mesh: setup_topo(), genwz(), usrdat()

  • Geometry: gengeom()

  • Setup Direct Stiffness Summation (DSS): setup_mesh_dssum(), usrdat2(), geom_reset()

  • Verify: vrdsmsh()

  • Optionals run if the flags are set

    • dg: dg_setup()

    • ifflow: estrat(). iftran set_overlap()

    • ifcvode: False?

  • usrdat3()

  • Initial conditions: setics(), setprop()

  • User check: ifneknek: False. userchk(): calculates eddy viscosity

  • Misc functions: comment(), sstest(), dofcnt(), in_situ_init(), time00(), opcount() <- 2

subroutine nek_solve()

Runs post processing or time advancment based on value of instep. Parent subroutine to nek__multi_advance() which calls nek_advance() once. Also handles:

  • Set flag ::ifoutfld via set_outfld()

  • Runs userchk() (for example, eddy viscosity)

  • Calls prepost()

subroutine nek_advance()

Time advancement. What it does differs based on solver flags and formulation. Summary of calls:

  • userchk_set_xfer()

  • fluid(), heat()

  • q_filter() with param(103)

subroutine nek_end()

Complete simulation.

  • If zero steps, call runstat() which profiles different components

  • Gather scatter library stats: fgslib_crs_stats(xxth(1))

  • Finally, in_situ_end() shuts down VisIt with visit_end()

subroutine nek__multi_advance(kstep kstep, msteps msteps)

Multi-level time advancement. Calls nek_advance() msteps times.

subroutine fluid(igeom igeom)

Driver for solving the incompressible Navier-Stokes equations.

subroutine incomprn(ux ux, uy uy, uz uz, up up)

Project U onto the closest incompressible field.

subroutine makef()

Compute and add

  1. user specified forcing function (FX,FY,FZ)

  2. driving force due to natural convection

  3. convection term

subroutine plan3(IGEOM IGEOM)

Compute pressure and velocity using consistent approximation spaces.

Operator splitting technique.