atl_source_types_module Module

The only purpose of this module is to keep the types contained separated from the routines in atl_source_module to avoid circular references between atl_source_module and atl_equation_module. In a future rework of these structures, this module should be merged back into the atl_source_module.


Uses


Abstract Interfaces

abstract interface

Abstract interface to update state with source terms

  • public subroutine atl_update_source(fun, varSys, time, mesh, poly_proj, currentLevel, state, material, sourcedata)

    Arguments

    Type IntentOptional Attributes Name
    class(atl_source_op_type), intent(in) :: fun

    Description of method to update source

    type(tem_varSys_type), intent(in) :: varSys

    variable system

    type(tem_time_type), intent(in) :: time

    Point in time at which to evaluate the variable.

    type(atl_cube_elem_type), intent(in) :: mesh

    Current level mesh information

    type(ply_poly_project_type), intent(inout) :: poly_proj

    Parameters for projection

    integer, intent(in) :: currentLevel

    current level

    real(kind=rk), intent(in) :: state(:,:,:)

    The state in modal space. This is needed for several source terms that have to be applied to the current state

    real(kind=rk), intent(in) :: material(:)

    The background material to use for evaluating specific source terms.

    At the moment this background material is used for all elements. At a stage each element should get it's own material parameters.

    real(kind=rk), intent(inout) :: sourcedata(:,:,:)

    The source data to update. When all source terms are added to this buffer, it is applied to the state.


Derived Types

type, public ::  atl_source_elems_type

Contains information about the elements affected by a source term. The information contained are for one particular level.

Components

Type Visibility Attributes Name Initial
integer, public :: nElems = 0

The number of elements affected by the source on this level

type(grw_intarray_type), public :: posInTotal

Position of elements in state array to apply source terms. Position in state array is same as position in total list Size: nElems

type(grw_intarray_type), public :: idx

Index to access point data type to retrieve values from variable refered for source variable

type, public ::  atl_source_op_type

Description contains list of elements on which source is active and function pointer to update source

Components

Type Visibility Attributes Name Initial
integer, public :: srcTerm_varPos

Position of this source term variable in the variable system

integer, public :: data_varPos

Position of data variable usally st-fun provided in config file in the varSys

type(atl_source_elems_type), public, allocatable :: elems(:)

Contains levelwise information about the elements affected by the source

logical, public :: isPermanent = .false.

True for permanent sources, active on global domain so no need to initialize source elems array.

real(kind=rk), public, allocatable :: val(:,:,:)

SourceData to be stored for a particular level buffer for evaluated source terms (contribution to the right hand side of the PDE)

procedure(atl_update_source), public, pointer :: updateSrc => null()

Function to update state with source term

type, public ::  atl_source_type

Description of the new source type in Ateles

Components

Type Visibility Attributes Name Initial
type(atl_source_op_type), public, allocatable :: method(:)

Contains source elements position in tree%treeID and function pointer to update source. size: varDict%nVals

integer, public, allocatable :: poly_proj_pos(:)

Postition of individual projection method in the projection list. This list is levelwise, size: (minLevel:maxLevel)

type(grw_stringkeyvaluepairarray_type), public :: varDict

This dictionary is used to map variables from the variable system to source variables to be used as data source.

type, public ::  atl_eqn_sourceMap_type

datatype containing mapping of source variables to function pointers. The function this pointer is pointing to is used to evaluate the space time function defining the values for the source variable.

Components

Type Visibility Attributes Name Initial
procedure(atl_update_source), public, pointer, nopass :: do => NULL()

type, public ::  atl_init_source_type

This type is used to set the source terms up. It contains information from the equation systems that are used to process the information from the configuration file. Once the source terms are added to the variable system, the information contained in here are not needed anymore, thus are not stored in another, longer persisting type.

Components

Type Visibility Attributes Name Initial
type(tem_possible_variable_type), public :: poss_srcVars

The possible source variables

type(atl_eqn_sourceMap_type), public, allocatable :: eval_source(:)

for each possible source (a variable in sources%poss_varSys) a pointer to the function that adds the necessary source term to the right hand side vector of the equation system