This function computes the space time function for a given list of coordinates
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_spacetime_fun_type) | :: | me |
Spacetime function to evaluate |
|||
real(kind=rk), | intent(in) | :: | coord(n,3) |
barycentric Ids of an elements. 1st index goes over number of elements and 2nd index goes over x,y,z coordinates |
||
type(tem_time_type), | intent(in) | :: | time |
timer object incl. the current time information |
||
integer, | intent(in) | :: | n |
Number of values to return |
return value of the function
function tem_spacetime_for_coord(me, coord, time, n) result(res) ! -------------------------------------------------------------------- ! !> Spacetime function to evaluate type(tem_spacetime_fun_type) :: me !> Number of values to return integer, intent(in) :: n !> barycentric Ids of an elements. !! 1st index goes over number of elements and !! 2nd index goes over x,y,z coordinates real(kind=rk), intent(in) :: coord(n,3) !> timer object incl. the current time information type(tem_time_type), intent(in) :: time !> return value of the function real(kind=rk) :: res(n) ! -------------------------------------------------------------------- ! select case(trim(adjustl(me%fun_kind))) case('none') res = 0.0_rk case('const') res = me%const(1) case('lua_fun') res = tem_spacetime_lua_for( fun_ref = me%lua_fun_ref, & & coord = coord, & & time = time, & & n = n, & & conf = me%conf ) case('combined') res = tem_spatial_for( me = me%spatial, & & coord = coord, & & n = n ) & & * tem_temporal_for( temporal = me%temporal, & & time = time ) case('miescatter_displacementfieldz') res = tem_eval_miescatter_displz( me = me%mie_fun, & & coord = coord, & & time = time%sim, & & n = n ) case('miescatter_magneticfieldx') res = tem_eval_miescatter_magnx( me = me%mie_fun, & & coord = coord, & & time = time%sim, & & n = n ) case('miescatter_magneticfieldy') res = tem_eval_miescatter_magny( me = me%mie_fun, & & coord = coord, & & time = time%sim, & & n = n ) case('cylindricalwave') res = tem_eval_cylindricalWave( me = me%cylindricalWave, & & coord = coord, & & time = time%sim, & & n = n ) case('acoustic_pulse') res = tem_eval_acoustic_pulse( me = me%acoustic_pulse, & & coord = coord, & & time = time%sim, & & n = n ) case('polygon_body_2d', 'polygon_body_3d') res = tem_polygon_material_movement_single( & & me = me%polygon_material, & & coord = coord, & & time = time%sim, & & nPoint = n ) case('polygon_multi_body_2d', 'polygon_multi_body_3d') res = tem_polygon_material_movement_multi( & & me = me%polygon_material, & & coord = coord, & & time = time%sim, & & nPoint = n ) case default call tem_abort('ERROR: Unknown spatial function in' & & // ' tem_spacetime_for_coord.' ) end select end function tem_spacetime_for_coord