timestep_template_m Module

Advances template model by one timestep



Contents


Interfaces

public interface cxx_timestep

  • public function GrillAccX_timestep(static_object, runtime_object, state_object) bind(c, name='timestep')

    Arguments

    Type IntentOptional Attributes Name
    type(static_data_struct), intent(inout) :: static_object
    type(runtime_data_struct), intent(inout) :: runtime_object
    type(state_data_struct), intent(inout) :: state_object

    Return Value integer(kind=c_int32_t)

interface

  • public module subroutine apply_partransp(comm_handler)

    Applies changerates due to parallel transport model

    Arguments

    Type IntentOptional Attributes Name
    type(comm_handler_t), intent(in) :: comm_handler

    Communication handler

interface

  • public module subroutine apply_perptransp(comm_handler)

    Applies changerates due to perpendicular diffusive transport model

    Arguments

    Type IntentOptional Attributes Name
    type(comm_handler_t), intent(in) :: comm_handler

    Communication handler

interface

  • public module subroutine apply_pardiff(comm_handler)

    Applies changerates due to parallel diffusion

    Arguments

    Type IntentOptional Attributes Name
    type(comm_handler_t), intent(in) :: comm_handler

    Communication handler

interface

  • public module subroutine apply_mms_sources(comm_handler, tau)

    Applies changerates due to MMS sources

    Arguments

    Type IntentOptional Attributes Name
    type(comm_handler_t), intent(in) :: comm_handler

    Communication handler

    real(kind=GP), intent(in) :: tau

    Current time

interface

  • public module subroutine apply_mms_boundaries(comm_handler, tau)

    Applies boundaries according MMS solutions

    Arguments

    Type IntentOptional Attributes Name
    type(comm_handler_t), intent(in) :: comm_handler

    Communication handler

    real(kind=GP), intent(in) :: tau

    Current time


Derived Types

type, public ::  static_data_struct

This struct shall hold algorithm-relevant data structures that are fixed for a fixed numerical experiment (i.e. numerical solution). (e.g. mesh)

Components

Type Visibility Attributes Name Initial
type(c_ptr), public :: mesh_cano_data

type, public ::  runtime_data_struct

This struct shall hold fixed runtime data. mpi communicator. integer in fortran, MPI_Fint in C use MPI_Comm_f2c in C/C++ to get an MPI_Comm

Components

Type Visibility Attributes Name Initial
integer, public :: mpi_communicator

type, public ::  state_data_struct

This struct shall hold data needed in a checkpoint (e.g. dynamical system state variables)

Components

Type Visibility Attributes Name Initial
integer(kind=c_int64_t), public :: npoints
type(c_ptr), public :: density
real(kind=GP), public :: tau

Functions

public function fortran_timestep(comm_handler, tau)

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), target :: comm_handler

Communication handler

real(kind=GP), intent(inout) :: tau

Current time

Return Value integer(kind=c_int32_t)


Subroutines

public subroutine timestep_template(comm_handler, tau)

Model template subroutine Yet a simple in-plane diffusion equation with first order explicit Euler scheme is implemented

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), target :: comm_handler

Communication handler

real(kind=GP), intent(inout) :: tau

Current time

public subroutine compute_rhs_explicit(comm_handler, tau)

Computes explicit changerate at time tau

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), intent(in) :: comm_handler

Communication handler

real(kind=GP), intent(inout) :: tau

Time-point

public subroutine apply_boundaries(comm_handler, tau)

Applies boundaries

Arguments

Type IntentOptional Attributes Name
type(comm_handler_t), intent(in) :: comm_handler

Communication handler

real(kind=GP), intent(in) :: tau

Time-point

public subroutine rhs_fun_for_rk(ndim, tau, y, dy)

Evaluates right hand side (explicit terms) for use in Runge-Kutta time-step integrator Be aware, that this function changes the state of the template model. For interface, see the corresponding Runge-Kutta module

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ndim
real(kind=GP), intent(in) :: tau
real(kind=GP), intent(in), dimension(ndim) :: y
real(kind=GP), intent(out), dimension(ndim) :: dy