@@ -27,20 +27,6 @@ module m_global_parameters_common
2727 ! num_dims, num_vels, weno_polyn, muscl_polyn, weno_num_stencils, wenojs, igr, etc.
2828 #:include ' generated_case_opt_decls.fpp'
2929
30- ! For pre_process and post_process: num_dims and num_vels are declared manually here
31- ! (sim gets them from generated_case_opt_decls.fpp above)
32- #ifndef MFC_SIMULATION
33- integer :: num_dims !< Number of spatial dimensions
34- integer :: num_vels !< Number of velocity components (different from num_dims for mhd)
35- #endif
36-
37- ! For pre_process: weno_polyn and muscl_polyn are declared manually here
38- ! (sim gets them from generated_case_opt_decls.fpp; post does not use them)
39- #ifdef MFC_PRE_PROCESS
40- integer :: weno_polyn !< Degree of the WENO polynomials
41- integer :: muscl_polyn !< Degree of the MUSCL polynomials
42- #endif
43-
4430 !> @name Annotations of the structure of the state and flux vectors in terms of the size and configuration of the system of
4531 !! equations
4632 !> @{
@@ -90,49 +76,9 @@ module m_global_parameters_common
9076 !> Minimum cell widths. These are distinct from the per- cell width arrays named dx, dy, and dz in simulation and post- process.
9177 real (wp) :: dx_min, dy_min, dz_min
9278
93- #ifdef MFC_SIMULATION
9479 $:GPU_DECLARE(create= ' [sys_size, eqn_idx, b_size, tensor_size]' )
9580 $:GPU_DECLARE(create= ' [shear_num, shear_indices, shear_BC_flip_num, shear_BC_flip_indices]' )
96- ! Device residency for namelist/ case- opt state declared above via the generated
97- ! includes: declare directives must live in the declaring module (Cray ftn rejects
98- ! declare- target on use- associated names), so these moved here from simulation.
99- $:GPU_DECLARE(create= ' [cyl_coord]' )
100- $:GPU_DECLARE(create= ' [dt, m, n, p]' )
101- $:GPU_DECLARE(create= ' [cfl_target]' )
102- $:GPU_DECLARE(create= ' [int_comp, ic_eps, ic_beta]' )
103- $:GPU_DECLARE(create= ' [muscl_eps]' )
104- $:GPU_DECLARE(create= ' [mpp_lim, model_eqns, mixture_err, alt_soundspeed]' )
105- $:GPU_DECLARE(create= ' [avg_state, mp_weno, weno_eps, teno_CT, hypoelasticity]' )
106- $:GPU_DECLARE(create= ' [hyperelasticity, elasticity, low_Mach]' )
107- $:GPU_DECLARE(create= ' [cont_damage, hyper_cleaning]' )
108- $:GPU_DECLARE(create= ' [relax, relax_model, palpha_eps, ptgalpha_eps]' )
109- $:GPU_DECLARE(create= ' [down_sample]' )
110- $:GPU_DECLARE(create= ' [fd_order]' )
111- $:GPU_DECLARE(create= ' [rhoref, pref]' )
112- $:GPU_DECLARE(create= ' [ib, num_ibs]' )
113- $:GPU_DECLARE(create= ' [ib_coefficient_of_friction]' )
114- $:GPU_DECLARE(create= ' [Ca, Web, Re_inv]' )
115- $:GPU_DECLARE(create= ' [bubbles_euler, polytropic, polydisperse]' )
116- $:GPU_DECLARE(create= ' [adv_n, adap_dt, adap_dt_tol, adap_dt_max_iters]' )
117- $:GPU_DECLARE(create= ' [bubble_model, thermal]' )
118- $:GPU_DECLARE(create= ' [poly_sigma]' )
119- $:GPU_DECLARE(create= ' [qbmm, pi_fac]' )
120- $:GPU_DECLARE(create= ' [R0ref]' )
121- $:GPU_DECLARE(create= ' [acoustic_source, num_source]' )
122- $:GPU_DECLARE(create= ' [sigma, surface_tension]' )
123- $:GPU_DECLARE(create= ' [bubbles_lagrange]' )
124- $:GPU_DECLARE(create= ' [Bx0]' )
125- $:GPU_DECLARE(create= ' [tau_star, cont_damage_s, alpha_bar]' )
126- $:GPU_DECLARE(create= ' [hyper_cleaning_speed, hyper_cleaning_tau]' )
127- $:GPU_DECLARE(create= ' [synthetic_turbulence, num_turbulent_sources, synth_U_inf]' )
128- #:if not MFC_CASE_OPTIMIZATION
129- $:GPU_DECLARE(create= ' [num_dims, num_vels, weno_polyn, weno_order]' )
130- $:GPU_DECLARE(create= ' [weno_num_stencils, num_fluids, wenojs]' )
131- $:GPU_DECLARE(create= ' [mapped_weno, wenoz, teno, wenoz_q, mhd, relativity]' )
132- $:GPU_DECLARE(create= ' [igr_iter_solver, igr_order, viscous, igr_pres_lim, igr]' )
133- $:GPU_DECLARE(create= ' [recon_type, muscl_order, muscl_polyn, muscl_lim]' )
134- #:endif
135- #endif
81+ $:GPU_DECLARE(create= ' [elasticity]' )
13682
13783 !> @name Processor coordinates and parallel- IO addressing (identical declaration across all three targets)
13884 !> @{
@@ -163,10 +109,11 @@ contains
163109 !! - qbmm_idx allocations and fills (diverge between pre vs sim/ post)
164110 !! - sim- only: gam = bub_pp%gam_g, nmomsp/ nmomtot, Re_idx allocation, GPU_UPDATE calls
165111 !! - post- only: beta_idx increment (bubbles_lagrange path), offset/ grid allocations
166- impure subroutine s_initialize_eqn_idx (nmom_in , nb_in )
112+ impure subroutine s_initialize_eqn_idx (nmom_in , nb_in , six_eqn_alf_is_advected )
167113
168114 integer , intent (in ) :: nmom_in
169115 integer , intent (in ) :: nb_in
116+ logical , intent (in ) :: six_eqn_alf_is_advected
170117
171118 ! Gamma/ Pi_inf Model
172119
@@ -252,9 +199,7 @@ contains
252199 eqn_idx%E = eqn_idx%mom%end + 1
253200 eqn_idx%adv%beg = eqn_idx%E + 1
254201 eqn_idx%adv%end = eqn_idx%E + num_fluids
255- #ifdef MFC_SIMULATION
256- eqn_idx%alf = eqn_idx%adv%end
257- #endif
202+ if (six_eqn_alf_is_advected) eqn_idx%alf = eqn_idx%adv%end
258203 eqn_idx%int_en%beg = eqn_idx%adv%end + 1
259204 eqn_idx%int_en%end = eqn_idx%adv%end + num_fluids
260205 sys_size = eqn_idx%int_en%end
@@ -352,7 +297,6 @@ contains
352297 integer :: ierr !< Generic flag used to identify and report MPI errors
353298#endif
354299
355- #ifdef MFC_SIMULATION
356300 ! Under case- optimization, num_dims and num_vels are compile- time parameters; skip assignment .
357301 #:if not MFC_CASE_OPTIMIZATION
358302 num_dims = 1 + min (1 , n) + min (1 , p)
@@ -363,15 +307,6 @@ contains
363307 num_vels = num_dims
364308 end if
365309 #:endif
366- #else
367- num_dims = 1 + min (1 , n) + min (1 , p)
368-
369- if (mhd) then
370- num_vels = 3
371- else
372- num_vels = num_dims
373- end if
374- #endif
375310
376311 allocate (proc_coords(1 :num_dims))
377312
0 commit comments