Skip to content

Commit 5ebbd36

Browse files
committed
fix gpu
1 parent 08f309e commit 5ebbd36

File tree

4 files changed

+17
-23
lines changed

4 files changed

+17
-23
lines changed

examples/1D_cont_damage/case.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666
"patch_icpp(1)%length_x": 0.5,
6767
"patch_icpp(1)%vel(1)": 0.0,
6868
"patch_icpp(1)%pres": 1e5,
69-
"patch_icpp(1)%alpha_rho(1)": 1000*(1. - 1e-6),
70-
"patch_icpp(1)%alpha_rho(2)": 1000*1e-6,
71-
"patch_icpp(1)%alpha(1)": 1. - 1e-6,
69+
"patch_icpp(1)%alpha_rho(1)": 1000 * (1.0 - 1e-6),
70+
"patch_icpp(1)%alpha_rho(2)": 1000 * 1e-6,
71+
"patch_icpp(1)%alpha(1)": 1.0 - 1e-6,
7272
"patch_icpp(1)%alpha(2)": 1e-6,
7373
"patch_icpp(1)%tau_e(1)": 0.0,
7474
# Patch 2 R
@@ -77,10 +77,10 @@
7777
"patch_icpp(2)%length_x": 0.5,
7878
"patch_icpp(2)%vel(1)": 0.0,
7979
"patch_icpp(2)%pres": 1e5,
80-
"patch_icpp(2)%alpha_rho(1)": 1000*1e-6,
81-
"patch_icpp(2)%alpha_rho(2)": 1000*(1. - 1e-6),
80+
"patch_icpp(2)%alpha_rho(1)": 1000 * 1e-6,
81+
"patch_icpp(2)%alpha_rho(2)": 1000 * (1.0 - 1e-6),
8282
"patch_icpp(2)%alpha(1)": 1e-6,
83-
"patch_icpp(2)%alpha(2)": 1. - 1e-6,
83+
"patch_icpp(2)%alpha(2)": 1.0 - 1e-6,
8484
"patch_icpp(2)%tau_e(1)": 0.0,
8585
# Fluids Physical Parameters
8686
"fluid_pp(1)%gamma": 1.0e00 / (4.4e00 - 1.0e00),

examples/2D_cont_damage/case.py

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77
{
88
# Logistics
99
"run_time_info": "T",
10-
1110
# Computational Domain Parameters
12-
"x_domain%beg": 0.,
11+
"x_domain%beg": 0.0,
1312
"x_domain%end": 0.001,
14-
"y_domain%beg": 0.,
13+
"y_domain%beg": 0.0,
1514
"y_domain%end": 0.0005,
1615
"m": 50,
1716
"n": 25,
@@ -20,7 +19,6 @@
2019
"t_step_start": 0,
2120
"t_step_stop": 400,
2221
"t_step_save": 20,
23-
2422
# Simulation Algorithm Parameters
2523
"num_patches": 2,
2624
"model_eqns": 2,
@@ -42,21 +40,18 @@
4240
"bc_x%end": -6,
4341
"bc_y%beg": -2,
4442
"bc_y%end": -6,
45-
4643
# Hypoelasticity
4744
"hypoelasticity": "T",
4845
"fd_order": 4,
4946
"cont_damage": "T",
5047
"tau_star": 0.0,
5148
"cont_damage_s": 2.0,
5249
"alpha_bar": 1e-4,
53-
5450
# Formatted Database Files Structure Parameters
5551
"format": 1,
5652
"precision": 2,
5753
"prim_vars_wrt": "T",
5854
"parallel_io": "T",
59-
6055
# Patch 1 Liquid
6156
"patch_icpp(1)%geometry": 3,
6257
"patch_icpp(1)%x_centroid": 0.0005,
@@ -66,11 +61,10 @@
6661
"patch_icpp(1)%vel(1)": 0.0,
6762
"patch_icpp(1)%vel(2)": 0.0,
6863
"patch_icpp(1)%pres": 1e05,
69-
"patch_icpp(1)%alpha_rho(1)": 1100*(1.0-1e-6),
70-
"patch_icpp(1)%alpha(1)": 1.0-1e-6,
71-
"patch_icpp(1)%alpha_rho(2)": 1100*1e-6,
64+
"patch_icpp(1)%alpha_rho(1)": 1100 * (1.0 - 1e-6),
65+
"patch_icpp(1)%alpha(1)": 1.0 - 1e-6,
66+
"patch_icpp(1)%alpha_rho(2)": 1100 * 1e-6,
7267
"patch_icpp(1)%alpha(2)": 1e-6,
73-
7468
# Patch 2 Solid
7569
"patch_icpp(2)%alter_patch(1)": "T",
7670
"patch_icpp(2)%geometry": 3,
@@ -81,11 +75,10 @@
8175
"patch_icpp(2)%vel(1)": 0.0,
8276
"patch_icpp(2)%vel(2)": 0.0,
8377
"patch_icpp(2)%pres": 1e05,
84-
"patch_icpp(2)%alpha_rho(1)": 1100*1e-6,
78+
"patch_icpp(2)%alpha_rho(1)": 1100 * 1e-6,
8579
"patch_icpp(2)%alpha(1)": 1e-6,
86-
"patch_icpp(2)%alpha_rho(2)": 1100*(1.0-1e-6),
87-
"patch_icpp(2)%alpha(2)": 1.0-1e-6,
88-
80+
"patch_icpp(2)%alpha_rho(2)": 1100 * (1.0 - 1e-6),
81+
"patch_icpp(2)%alpha(2)": 1.0 - 1e-6,
8982
# Acoustic source
9083
"acoustic_source": "T",
9184
"num_source": 1,
@@ -99,7 +92,6 @@
9992
"acoustic(1)%foc_length": 0.00045,
10093
"acoustic(1)%aperture": 0.0008,
10194
"acoustic(1)%delay": 0.0,
102-
10395
# Fluids Physical Parameters
10496
"fluid_pp(1)%gamma": 1.0e00 / (4.4e00 - 1.0e00),
10597
"fluid_pp(1)%pi_inf": 4.4e00 * 5.57e08 / (4.4e00 - 1.0e00),

src/simulation/m_data_output.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ contains
12841284
damage_state = q_cons_vf(damage_idx)%sf(j - 2, k - 2, l)
12851285
G = G*max((1._wp - damage_state), 0._wp)
12861286
end if
1287-
1287+
12881288
call s_compute_pressure( &
12891289
q_cons_vf(1)%sf(j - 2, k - 2, l), &
12901290
q_cons_vf(alf_idx)%sf(j - 2, k - 2, l), &

src/simulation/m_global_parameters.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,8 @@ contains
12231223
12241224
!$acc update device(Bx0, powell)
12251225
1226+
!$acc update device(cont_damage, tau_star, cont_damage_s, alpha_bar)
1227+
12261228
#:if not MFC_CASE_OPTIMIZATION
12271229
!$acc update device(wenojs, mapped_weno, wenoz, teno)
12281230
!$acc update device(wenoz_q)

0 commit comments

Comments
 (0)