Load predefined space time function
Todo
Provide an error code to return instead of aborting.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_spacetime_fun_type), | intent(inout) | :: | me |
spacetime fun information |
||
type(flu_State) | :: | conf |
lua state type |
|||
integer, | intent(in) | :: | thandle |
spacetime function handle |
||
integer, | intent(in), | optional | :: | nComp |
number of components of the variable |
subroutine load_spacetime_predefined( me, conf, thandle, nComp ) ! -------------------------------------------------------------------------- !> spacetime fun information type(tem_spacetime_fun_type), intent(inout) :: me !> lua state type type(flu_State) :: conf !> spacetime function handle integer, intent(in) :: thandle !> number of components of the variable integer, optional, intent(in) :: nComp ! -------------------------------------------------------------------------- character(len=labelLen) :: funkind integer :: iError ! -------------------------------------------------------------------------- funkind = adjustl(me%fun_kind) funkind = upper_to_lower(funkind) select case(trim(funkind)) case('combined') ! A typical case of a space-time function that can be represented ! a multiplicative combination of a temporal and a spatial part. call tem_load_spatial( me = me%spatial, & & conf = conf, & & parent = thandle, & & errCode= iError, & & nComp = nComp ) if (me%spatial%kind == 'none') then call tem_abort('Error in loading combined space-time function:' & & //' no spatial function defined!' ) end if call tem_load_temporal( me = me%temporal, & & conf = conf, & & parent = thandle ) if (me%temporal%kind == 'none') then call tem_abort('Error in loading combined space-time function:' & & //' no temporal function defined!' ) end if case('miescatter_displacementfieldz') call tem_load_miescatter_displacementfieldz( conf = conf, & & thandle = thandle, & & me = me%mie_fun ) case('miescatter_magneticfieldx') call tem_load_miescatter_magneticfieldx( conf = conf, & & thandle = thandle, & & me = me%mie_fun ) case('miescatter_magneticfieldy') call tem_load_miescatter_magneticfieldy( conf = conf, & & thandle = thandle, & & me = me%mie_fun ) case('cylindricalwave') call tem_load_cylindricalWave( conf = conf, & & thandle = thandle, & & me = me%cylindricalWave ) case('acoustic_pulse') call tem_load_acoustic_pulse( conf = conf, & & thandle = thandle, & & me = me%acoustic_pulse ) case('polygon_body_2d','polygon_body_3d') call tem_polygon_material_single_load( & & conf = conf, & & thandle = thandle, & & me = me%polygon_material ) case('polygon_multi_body_2d', 'polygon_multi_body_3d') call tem_polygon_material_multi_load( & & conf = conf, & & thandle = thandle, & & me = me%polygon_material ) case('apesmate') call tem_aps_load_coupling( me = me%aps_coupling, & & thandle = thandle, & & conf = conf ) case('precice') if (.not. precice_available) then call tem_abort(' Error: Spacetime function predefinded = precice not & & available if not compiled with preCICE support, stopping... ' ) end if call tem_precice_load_coupling( me = me%precice_coupling, & & conf = conf, & & thandle = thandle ) case default ! If you introduce new predefined functions, add their loading ! routine in a seperate case branch here. write(logUnit(1),*) 'ERROR in definition of a space-time function:' write(logUnit(1),*) 'Unknown "predefined" space-time function: '// & & trim( me%fun_kind ) call tem_abort() end select end subroutine load_spacetime_predefined