DG_structures Module

Module that defines the basic DG reference element type and the interface to it's constructor and finalizer as well as routines for calculating characteristic fluxes.

The implementation (found in submodule_DG_implementation.f90) is based on 'Nodal Discontinuous Galerkin Methods' by Hesthaven and Warburton.


Uses

  • module~~dg_structures~~UsesGraph module~dg_structures DG_structures module~kinds kinds module~dg_structures->module~kinds

Used by

  • module~~dg_structures~~UsedByGraph module~dg_structures DG_structures module~dg_implementation DG_implementation module~dg_implementation->module~dg_structures module~scalar_schw scalar_schw module~scalar_schw->module~dg_structures proc~init_grid_coordinates init_grid_coordinates proc~init_grid_coordinates->module~dg_structures program~test test program~test->module~dg_structures program~test->module~scalar_schw module~self_force_observer self_force_observer program~test->module~self_force_observer proc~scal_schw_eff_init scal_schw_eff_init proc~scal_schw_eff_init->module~scalar_schw module~scalar_schw_implementation scalar_schw_implementation module~scalar_schw_implementation->module~scalar_schw module~self_force_observer->module~scalar_schw proc~scal_schw_save_globals_2 scal_schw_save_globals_2 proc~scal_schw_save_globals_2->module~self_force_observer module~self_force_observer_implementation self_force_observer_implementation module~self_force_observer_implementation->module~self_force_observer

Contents


Interfaces

public interface ref_element

interface

  • public module function init_ref_element(order, sorder, nc)

    Interface for the reference element constructor.

    Arguments

    Type IntentOptional AttributesName
    integer(kind=ip), intent(in) :: order

    The order of the reference element.

    integer(kind=ip), optional :: sorder

    The order of a smoothing filter. Both this and nc have to be present before a filter is constructed.

    integer(kind=ip), optional :: nc

    No filtering of orders below this value. Both this and sorder have to be present before a filter is constructed.

    Return Value type(ref_element)

    The return type has to be a reference element.

interface

  • public module function char_flux_real(this, nvar, order, uint, uext, flux, lambda, s, sinv, debug_output)

    Interface for the characteristic flux routine for real data types.

    Arguments

    Type IntentOptional AttributesName
    class(ref_element), intent(in) :: this

    Has to be a reference element type.

    integer(kind=ip), intent(in) :: nvar

    The number of variables the characteristic flux has to be computed for.

    integer(kind=ip), intent(in) :: order

    The order of the reference element. Used to declare the size of the return array.

    real(kind=wp), intent(in), dimension(2,nvar):: uint

    The boundary data internal to this element.

    real(kind=wp), intent(in), dimension(2,nvar):: uext

    The boundary data external to this element.

    real(kind=wp), intent(in), dimension(2,nvar):: flux

    The boundary fluxes.

    real(kind=wp), intent(in), dimension(2,nvar):: lambda

    The boundary characteristic speeds.

    real(kind=wp), intent(in), dimension(2,nvar,nvar):: s

    The matrix that converts from characteristic to evolved variables.

    real(kind=wp), intent(in), dimension(2,nvar,nvar):: sinv

    The matrix that converts from evolved to characteristic variables.

    logical, intent(in) :: debug_output

    Currently ignored for the real version of this routine.

    Return Value real(kind=wp), dimension(order+1,nvar)

    At return the numerical flux has been lifted to the whole element.

interface

  • public module function char_flux_complex(this, nvar, order, uint, uext, flux, lambda, s, sinv, debug_output)

    Interface for the characteristic flux routine for complex data types.

    Arguments

    Type IntentOptional AttributesName
    class(ref_element), intent(in) :: this

    Has to be a reference element type.

    integer(kind=ip), intent(in) :: nvar

    The number of variables the characteristic flux has to be computed for.

    integer(kind=ip), intent(in) :: order

    The order of the reference element. Used to declare the size of the return array.

    complex(kind=wp), intent(in), dimension(2,nvar):: uint

    The boundary data internal to this element.

    complex(kind=wp), intent(in), dimension(2,nvar):: uext

    The boundary data external to this element.

    complex(kind=wp), intent(in), dimension(2,nvar):: flux

    The boundary fluxes.

    real(kind=wp), intent(in), dimension(2,nvar):: lambda

    The boundary characteristic speeds.

    real(kind=wp), intent(in), dimension(2,nvar,nvar):: s

    The matrix that converts from characteristic to evolved variables.

    real(kind=wp), intent(in), dimension(2,nvar,nvar):: sinv

    The matrix that converts from evolved to characteristic variables.

    logical, intent(in) :: debug_output

    If .true., produce debug output

    Return Value complex(kind=wp), dimension(order+1,nvar)

    At return the numerical flux has been lifted to the whole element.

interface

  • public module subroutine deallocate_ref_element(refel)

    Interface for the finalizer.

    Arguments

    Type IntentOptional AttributesName
    type(ref_element) :: refel

    The argument has to be a reference element type.


Derived Types

type, public :: ref_element

The reference element.

Components

TypeVisibility AttributesNameInitial
integer(kind=ip), public :: n

Order of this element.

real(kind=wp), public, dimension(:), allocatable:: r

Node location within this element.

real(kind=wp), public, dimension(:), allocatable:: w

Weights for integration.

real(kind=wp), public, dimension(:,:), allocatable:: v

Vandermonde matrix for this element.

real(kind=wp), public, dimension(:,:), allocatable:: dr

Derivative matrix for this element.

real(kind=wp), public, dimension(:,:), allocatable:: lift

Lift matrix for this element.

real(kind=wp), public, dimension(:,:), allocatable:: filter

An optional smoothing filter.

logical, public :: have_filter

Set to .true. if a filter has been initialized.

Constructor

public interface init_ref_element()

Finalizations Procedures

final :: deallocate_ref_element

The finalizer.

Type-Bound Procedures

generic, public :: characteristic_flux => char_flux_real, char_flux_complex

Use characteristic_flux for either char_flux_real or char_flux_complex.

procedure, public :: char_flux_real

The real version of the characteristic flux routine.

procedure, public :: char_flux_complex

The complex version of the characteristic flux routine.