Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_spatial_type) | :: | me |
spatial type for given boundary state |
|||
integer(kind=long_k), | intent(in) | :: | treeIds(n) |
treeIds of elements in given level |
||
type(treelmesh_type), | intent(in) | :: | tree |
global treelm mesh |
||
integer, | intent(in) | :: | n |
number of return values |
||
integer, | intent(in) | :: | ncomp |
number of components in the resulting vector |
return value of a function
function tem_spatial_vector_for_treeIDs( me, treeIds, tree, n, ncomp) & & result(res) ! -------------------------------------------------------------------- ! !> spatial type for given boundary state type(tem_spatial_type) :: me !> global treelm mesh type(treelmesh_type), intent(in) ::tree !> number of return values integer, intent(in) :: n !> number of components in the resulting vector integer, intent(in) :: ncomp !> treeIds of elements in given level integer(kind=long_k), intent(in) :: treeIds(n) !> return value of a function real(kind=rk) :: res(n,ncomp) ! -------------------------------------------------------------------- ! integer :: i ! -------------------------------------------------------------------- ! select case( trim(adjustl(me%kind)) ) case( 'none', 'const' ) do i = 1, nComp res(:,i) = me%const(i) end do case( 'lua_fun' ) res = tem_spatial_lua_for( fun_ref = me%lua_fun_ref, & & conf = me%conf, & & treeIds = treeIds, & & tree = tree, & & n = n, & & ncomp = ncomp ) case( 'spongelayer_plane', 'spongelayer_plane_2d', 'spongelayer_plane_1d' ) res = tem_spongeLayer_plane_for(me%spongePlane, nComp, treeids, tree, n) case( 'spongelayer_box' ) res = tem_spongeLayer_box_for(me%spongeBox, nComp, treeids, tree, n) case( 'spongelayer_box_2d' ) res = tem_spongeLayer_box2d_for(me%spongeBox, nComp, treeids, tree, n) case( 'spongelayer_radial_2d') res = tem_spongeLayer_radial_for( & & me = me%spongeRadial, & & nComp = nComp, & & treeids = treeids, & & tree = tree, & & n = n, & & nDim = 2 ) case( 'spongelayer_radial') res = tem_spongeLayer_radial_for( & & me = me%spongeRadial, & & nComp = nComp, & & treeids = treeids, & & tree = tree, & & n = n, & & nDim = 3 ) case( 'parabol' ) select case( trim(adjustl(me%parabol%geometry%canoND(1)%kind)) ) case('line') res(:,1) = tem_spatial_parabol2d_for( & & me = me%parabol%geometry%canoND(1), & & treeIds = treeIds, & & tree = tree, & & n = n ) case('plane') res(:,1) = tem_spatial_parabol3d_for( & & me = me%parabol%geometry%canoND(1), & & treeIds = treeIds, & & tree = tree, & & n = n ) end select do i = 2, nComp res(:,i) = res(:,1)*me%parabol%amplitude(i) end do res(:,1) = res(:,1)*me%parabol%amplitude(1) case default write(logUnit(1),*)'ERROR: No vectorial routine for spatial functions of' write(logUnit(1),*)' kind "' // trim(adjustl(me%kind)) // '"' write(logUnit(1),*)' available! Have a look in the ' & & // 'tem_spatial_module' write(logUnit(1),*)' for implemented vectorial functions.' call tem_abort() end select end function tem_spatial_vector_for_treeIDs