Load predefined spatial function
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_spatial_type), | intent(inout) | :: | me |
spatial fun information |
||
type(flu_State) | :: | conf |
lua state type |
|||
integer, | intent(in) | :: | thandle |
spatial function handle |
||
integer, | intent(in) | :: | nComp |
Number of components |
subroutine load_spatial_predefined( me, conf, thandle, nComp ) ! -------------------------------------------------------------------- ! !> spatial fun information type(tem_spatial_type), intent(inout) :: me !> lua state type type(flu_State) :: conf !> spatial function handle integer, intent(in) :: thandle !> Number of components integer, intent(in) :: nComp ! -------------------------------------------------------------------- ! integer :: nDim, iError character(len=labelLen) :: funkind ! -------------------------------------------------------------------- ! write(logUnit(1),*) 'Spatial is defined as predefined:' funkind = adjustl(me%kind) funkind = upper_to_lower(funkind) select case(trim(funkind)) case('parabol') write(logUnit(3),*) ' is a parabolic profile' call load_spatial_parabol( me = me%parabol, & & conf = conf, & & thandle = thandle, & & nComp = nComp ) case('random') write(logUnit(3),*) ' is a random distribution' call load_spatial_random( me = me%random, & & conf = conf, & & thandle = thandle ) case('gausspulse') write(logUnit(3),*) ' is a gaussian pulse' call load_ic_gausspulse( conf = conf, & & thandle = thandle, & & me = me%gausspulse ) case('tgv_p') write(logUnit(5),*) ' is a Taylor-Green vortex pressure' call load_ic_tgv( conf = conf, & & thandle = thandle, & & me = me%tgv ) case('tgv_ux') write(logUnit(5),*) ' is a Taylor-Green vortex Ux' call load_ic_tgv( conf = conf, & & thandle = thandle, & & me = me%tgv ) case('tgv_uy') write(logUnit(5),*) ' is a Taylor-Green vortex Uy' call load_ic_tgv( conf = conf, & & thandle = thandle, & & me = me%tgv ) case('tgv_sxx') write(logUnit(5),*) ' is a Taylor-Green vortex Sxx' call load_ic_tgv( conf = conf, & & thandle = thandle, & & me = me%tgv ) case('tgv_syy') write(logUnit(5),*) ' is a Taylor-Green vortex Syy' call load_ic_tgv( conf = conf, & & thandle = thandle, & & me = me%tgv ) case('tgv_syz') write(logUnit(5),*) ' is a Taylor-Green vortex Syz' call load_ic_tgv( conf = conf, & & thandle = thandle, & & me = me%tgv ) case('tgv_sxz') write(logUnit(5),*) ' is a Taylor-Green vortex Sxz' call load_ic_tgv( conf = conf, & & thandle = thandle, & & me = me%tgv ) !HK: Not implemented yet. !HK! case('hopf') !HK! write(logUnit(1),*) ' is a Hopf fibration solution' !HK! call load_spatial_hopf( me = me%hopf, conf = conf, & !HK! & thandle = thandle ) case('crvpx') write(logUnit(3),*) ' is a Spinning vortex pair X component' call load_ic_2dcrvp( conf = conf, & & thandle = thandle, & & me = me%crvp ) case('crvpy') write(logUnit(3),*) ' is a Spinning vortex pair Y component' call load_ic_2dcrvp( conf = conf, & & thandle = thandle, & & me = me%crvp ) case('crvppressure') write(logUnit(3),*) ' is a Spinning vortex pair density' call load_ic_2dcrvp( conf = conf, & & thandle = thandle, & & me = me%crvp ) 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('heaviside_gibbs') call tem_load_heaviside_gibbs( conf = conf, & & thandle = thandle, & & me = me%heaviside_gibbs_fun ) case('spongelayer_plane') ndim = 3 call tem_load_spongeLayer_plane( conf = conf, & & thandle = thandle, & & me = me%spongePlane, & & ndim = ndim, & & nComp = nComp ) case('spongelayer_plane_2d') ndim = 2 call tem_load_spongeLayer_plane( conf = conf, & & thandle = thandle, & & me = me%spongePlane, & & ndim = ndim, & & nComp = nComp ) case('spongelayer_plane_1d') ndim = 1 call tem_load_spongeLayer_plane( conf = conf, & & thandle = thandle, & & me = me%spongePlane, & & ndim = ndim, & & nComp = nComp ) case('spongelayer_radial') write(logUnit(3),*) ' is a radial sponge layer' ndim = 3 call tem_load_spongelayer_radial( me = me%spongeRadial, & & conf = conf, & & thandle = thandle, & & nDim = nDim, & & nComp = nComp ) case('spongelayer_radial_2d') write(logUnit(3),*) ' is a 2d radial sponge layer' ndim = 2 call tem_load_spongelayer_radial( me = me%spongeRadial, & & conf = conf, & & thandle = thandle, & & nDim = nDim, & & nComp = nComp ) case('spongelayer_box') call tem_load_spongeLayer_box( conf = conf, & & thandle = thandle, & & me = me%spongeBox, & & ndim = 3, & & nComp = nComp ) case('spongelayer_box_2d') call tem_load_spongeLayer_box( conf = conf, & & thandle = thandle, & & me = me%spongeBox, & & ndim = 2, & & nComp = nComp ) case('viscous_spongelayer_plane') ndim = 3 call tem_load_spongeLayer_plane( conf = conf, & & thandle = thandle, & & me = me%spongePlane, & & ndim = nDim, & & nComp = nComp, & & stateName = 'viscosity' ) case('viscous_spongelayer_box') ndim = 3 call tem_load_spongeLayer_box( conf = conf, & & thandle = thandle, & & me = me%spongeBox, & & ndim = nDim, & & nComp = nComp, & & stateName = 'viscosity' ) case('viscous_spongelayer_box_2d') ndim = 2 call tem_load_spongeLayer_box( conf = conf, & & thandle = thandle, & & me = me%spongeBox, & & ndim = nDim, & & nComp = nComp, & & stateName = 'viscosity' ) case('viscous_spongelayer_radial') write(logUnit(3),*) ' is a radial viscous sponge layer' nDim = 3 call tem_load_spongelayer_radial( me = me%spongeRadial, & & conf = conf, & & thandle = thandle, & & nDim = nDim, & & nComp = nComp, & & stateName = 'viscosity' ) case('viscous_spongelayer_radial_2d') write(logUnit(3),*) ' is a 2d radial viscous sponge layer' nDim = 2 call tem_load_spongelayer_radial( me = me%spongeRadial, & & conf = conf, & & thandle = thandle, & & nDim = nDim, & & nComp = nComp, & & stateName = 'viscosity' ) case('pml') call tem_load_pmlLayer( conf = conf, & & thandle = thandle, & & me = me%pml ) case('cylindricalwave') call tem_load_cylindricalWave( conf = conf, & & thandle = thandle, & & me = me%cylindricalWave ) case('polygon_material','polygon_material_3d') call tem_polygon_material_load( conf = conf, & & thandle = thandle, & & me = me%polygon_material ) case('rectangular', 'gate') call aot_get_val( L = conf, & & thandle = thandle, & & key = 'ly', & & val = me%rect_ly, & & ErrCode = iError, & & default = 0.5_rk ) call aot_get_val( L = conf, & & thandle = thandle, & & key = 'lz', & & val = me%rect_lz, & & ErrCode = iError, & & default = 0.5_rk ) write(logUnit(3),"(A)") ' this is a predefined rectangular shape' write(logUnit(3),"(A)") ' ly: '//trim(tem_toStr(me%rect_ly)) write(logUnit(3),"(A)") ' lz: '//trim(tem_toStr(me%rect_lz)) case default write(logUnit(1),*)'ERROR in definition of the spatial'//& & ' boundary Conditions:' write(logUnit(1),*)'Selected an unknown spatial function: '//& & trim(me%kind) call tem_abort() end select end subroutine load_spatial_predefined