3 use ids_schemas
, only: ids_real, ids_real_invalid
8 subroutine get_hyper_values(hyper, rho, nrho_bnd, prof, deriv, diff, params, active, prof_name, error_index, error_message)
14 real(ids_real),
intent(in) :: rho(:)
15 integer,
intent(in) :: nrho_bnd
16 real(ids_real),
intent(in) :: prof(:)
17 real(ids_real),
intent(in) :: deriv(:)
18 real(ids_real),
intent(in) :: diff(:)
20 logical,
intent(in) :: active
21 character(*),
intent(in) :: prof_name
22 integer,
intent(out) :: error_index
23 character(*),
intent(inout) :: error_message
26 real(ids_real) :: max_rho(size(rho))
31 hyper%diff = 0.0_ids_real
32 hyper%vconv = 0.0_ids_real
33 hyper%src = 0.0_ids_real
36 if (.not. active)
return
41 max_rho = min( 0.5_ids_real*(rho(nrho_bnd-1)+rho(nrho_bnd)) , params%rho_norm_cutoff)
42 where (rho <= max_rho)
43 hyper%diff = params%explicit + params%implicit * maxval(diff(1:nrho_bnd))
47 if (params%terms == id_diffusion_and_advection)
THEN
48 where (abs(deriv) <= tiny(1.0_ids_real))
49 hyper%vconv = hyper%diff * deriv / prof
51 elseif (params%terms == id_diffusion_and_source)
THEN
53 error_message =
'in hyper_value ('//prof_name//
'), hyperdiffusion with sources is not yet implemented'
57 error_message =
'in hyper_value ('//prof_name//
'), cannot determine how to set up the hyperdiffusion'
subroutine get_hyper_values(hyper, rho, nrho_bnd, prof, deriv, diff, params, active, prof_name, error_index, error_message)
The module defines derived types used by ETS6-CoreActor and subroutines to allocate and deallocate in...
Structure describing the hyper-diffusion/convection/source Here the concept of hyper diffusion refers...
The module declares types of variables used by numerical solvers.