Skip to content

Commit 8548336

Browse files
committed
Back to commit a9ae165 and fix dynamo benchmark data evaluation for Case 0
1 parent 5e1b229 commit 8548336

File tree

97 files changed

+3775
-4252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+3775
-4252
lines changed

src/Fortran_libraries/MHD_src/IO/set_control_4_MHD_coefs.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!!
44
!!@author H. Matsui
55
!!@date Programmed by H. Matsui in 2001
6-
!!@n Modified by H. Matsui in Aug., 2007
6+
!!@n Mmodified by H. Matsui in Aug., 2007
77
!
88
!> @brief set coeffcients for MHD simulation from control data
99
!!

src/Fortran_libraries/MHD_src/IO/set_control_4_magne.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
!!
44
!!@author H. Matsui
55
!!@date Programmed by H. Matsui in 2002
6-
!!@n Modified by H. Matsui in Aug., 2007
6+
!!@n Mmodified by H. Matsui in Aug., 2007
77
!
88
!> @brief set boundary conditions for magnetic field from control data
99
!!

src/Fortran_libraries/MHD_src/IO/set_control_4_model.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
!!
44
!!@author H. Matsui and H. Okuda
55
!!@date Programmed by H. Okuda in 2000
6-
!!@n Modified by H. Matsui in 2001
7-
!!@n Modified by H. Matsui in Aug., 2007
6+
!!@n Mmodified by H. Matsui in 2001
7+
!!@n Mmodified by H. Matsui in Aug., 2007
88
!
99
!> @brief set models for MHD simulation from control data
1010
!!

src/Fortran_libraries/MHD_src/IO/set_control_4_press.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
!!
44
!!@author H. Matsui and H. Okuda
55
!!@date Programmed by H. Okuda in 2000
6-
!!@n Modified by H. Matsui in 2001
7-
!!@n Modified by H. Matsui in Aug., 2007
6+
!!@n Mmodified by H. Matsui in 2001
7+
!!@n Mmodified by H. Matsui in Aug., 2007
88
!
99
!> @brief set boundary conditions for pressure from control data
1010
!!

src/Fortran_libraries/MHD_src/IO/set_control_4_temp.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
!!
44
!!@author H. Matsui and H. Okuda
55
!!@date Programmed by H. Okuda in 2000
6-
!!@n Modified by H. Matsui in 2001
7-
!!@n Modified by H. Matsui in Aug., 2007
6+
!!@n Mmodified by H. Matsui in 2001
7+
!!@n Mmodified by H. Matsui in Aug., 2007
88
!
99
!> @brief set boundary conditions for temperature from control data
1010
!!

src/Fortran_libraries/MHD_src/IO/set_control_4_velo.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
!!
44
!!@author H. Matsui and H. Okuda
55
!!@date Programmed by H. Okuda in 2000
6-
!!@n Modified by H. Matsui in 2001
7-
!!@n Modified by H. Matsui in Aug., 2007
6+
!!@n Mmodified by H. Matsui in 2001
7+
!!@n Mmodified by H. Matsui in Aug., 2007
88
!
99
!> @brief set boundary conditions for velocity from control data
1010
!!

src/Fortran_libraries/MHD_src/IO/t_ctl_data_crust_filter.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module t_ctl_data_crust_filter
3838
use m_precision
3939
!
4040
use m_machine_parameter
41+
use calypso_mpi
4142
use t_control_array_integer
4243
use t_control_data_sections
4344
!

src/Fortran_libraries/MHD_src/radial_FDM/cal_sph_FDM3e_hdiv_viscous.f90

Lines changed: 171 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,48 @@
88
!! for Valuable density
99
!!
1010
!!@verbatim
11-
!! subroutine set_sph_FDM_fix_hdiv_vscs_mat(n_in, n_out, &
11+
!! subroutine set_sph_FDM_fix_hdiv_vscs_mat(kr, n_in, n_out, &
1212
!! & jmax, a2r_ele_rj, a3r_ele_rj, g_sph_rj, &
13+
!! & nri_fdm, fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d3_mat, &
14+
!! & hdiv_visous_mat)
15+
!! subroutine add_sph_hdiv_viscous_rho_depend &
16+
!! & (kr, n_in, n_out, jmax, &
17+
!! & a1r_ele_rj, a2r_ele_rj, g_sph_rj, h_rho, h_drhodr, &
18+
!! & nri_fdm, fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
19+
!! & hdiv_visous_mat)
20+
!! subroutine add_sph_hdiv_viscous_nu_depend(kr, n_in, n_out, jmax,&
21+
!! & a1r_ele_rj, a2r_ele_rj, g_sph_rj, relative_d, h_nu, &
22+
!! & nri_fdm, fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
23+
!! & hdiv_visous_mat)
24+
!! integer(kind = kint), intent(in) :: n_in, n_out
25+
!! integer(kind = kint), intent(in) :: kr, nri_fdm
26+
!! integer(kind = kint), intent(in) :: jmax
27+
!! real(kind = kreal), intent(in) :: a1r_ele_rj
28+
!! real(kind = kreal), intent(in) :: a2r_ele_rj
29+
!! real(kind = kreal), intent(in) :: a3r_ele_rj
30+
!! real(kind = kreal), intent(in) :: g_sph_rj(jmax,17)
31+
!! real(kind = kreal), intent(in) :: h_rho, h_drhodr
32+
!! real(kind = kreal), intent(in) :: relative_d, h_nu
33+
!! real(kind = kreal), intent(in) &
34+
!! & :: fdm3e_d0_mat(nri_fdm,n_in:n_out)
35+
!! real(kind = kreal), intent(in) &
36+
!! & :: fdm3e_d1_mat(nri_fdm,n_in:n_out)
37+
!! real(kind = kreal), intent(in) &
38+
!! & :: fdm3e_d2_mat(nri_fdm,n_in:n_out)
39+
!! real(kind = kreal), intent(in) &
40+
!! & :: fdm3e_d3_mat(nri_fdm,n_in:n_out)
41+
!! real(kind = kreal), intent(inout) &
42+
!! & :: hdiv_visous_mat(jmax,n_in:n_out)
43+
!!
44+
!! subroutine each_sph_FDM_fix_hdiv_vscs_mat(n_in, n_out, jmax, &
45+
!! & a2r_ele_rj, a3r_ele_rj, g_sph_rj, &
1346
!! & fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d3_mat, &
1447
!! & hdiv_visous_mat)
15-
!! subroutine add_sph_hdiv_viscous_rho_depend(n_in, n_out, jmax, &
48+
!! subroutine each_sph_hdiv_vscs_rho_depend(n_in, n_out, jmax, &
1649
!! & a1r_ele_rj, a2r_ele_rj, g_sph_rj, h_rho, h_drhodr, &
1750
!! & fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
1851
!! & hdiv_visous_mat)
19-
!! subroutine add_sph_hdiv_viscous_nu_depend(n_in, n_out, jmax, &
52+
!! subroutine each_sph_hdiv_vscs_nu_depend(n_in, n_out, jmax, &
2053
!! & a1r_ele_rj, a2r_ele_rj, g_sph_rj, relative_d, h_nu, &
2154
!! & fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
2255
!! & hdiv_visous_mat)
@@ -49,8 +82,42 @@ module cal_sph_FDM3e_hdiv_viscous
4982
!
5083
! -----------------------------------------------------------------------
5184
!
52-
subroutine set_sph_FDM_fix_hdiv_vscs_mat(n_in, n_out, &
85+
subroutine set_sph_FDM_fix_hdiv_vscs_mat(kr, n_in, n_out, &
5386
& jmax, a2r_ele_rj, a3r_ele_rj, g_sph_rj, &
87+
& nri_fdm, fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d3_mat, &
88+
& hdiv_visous_mat)
89+
!
90+
integer(kind = kint), intent(in) :: n_in, n_out
91+
integer(kind = kint), intent(in) :: kr, nri_fdm
92+
integer(kind = kint), intent(in) :: jmax
93+
real(kind = kreal), intent(in) :: a2r_ele_rj
94+
real(kind = kreal), intent(in) :: a3r_ele_rj
95+
real(kind = kreal), intent(in) :: g_sph_rj(jmax,17)
96+
real(kind = kreal), intent(in) &
97+
& :: fdm3e_d0_mat(nri_fdm,n_in:n_out)
98+
real(kind = kreal), intent(in) &
99+
& :: fdm3e_d1_mat(nri_fdm,n_in:n_out)
100+
real(kind = kreal), intent(in) &
101+
& :: fdm3e_d3_mat(nri_fdm,n_in:n_out)
102+
!
103+
real(kind = kreal), intent(inout) &
104+
& :: hdiv_visous_mat(jmax,n_in:n_out)
105+
!
106+
integer(kind = kint) :: i_next
107+
!
108+
!
109+
do i_next = n_in, n_out
110+
hdiv_visous_mat(1:jmax,i_next) = - fdm3e_d3_mat(kr,i_next) &
111+
& + g_sph_rj(1:jmax,3)*a2r_ele_rj * fdm3e_d1_mat(kr,i_next) &
112+
& - two*g_sph_rj(1:jmax,3)*a3r_ele_rj * fdm3e_d0_mat(kr,i_next)
113+
end do
114+
!
115+
end subroutine set_sph_FDM_fix_hdiv_vscs_mat
116+
!
117+
! -----------------------------------------------------------------------
118+
!
119+
subroutine each_sph_FDM_fix_hdiv_vscs_mat(n_in, n_out, jmax, &
120+
& a2r_ele_rj, a3r_ele_rj, g_sph_rj, &
54121
& fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d3_mat, &
55122
& hdiv_visous_mat)
56123
!
@@ -69,18 +136,63 @@ subroutine set_sph_FDM_fix_hdiv_vscs_mat(n_in, n_out, &
69136
integer(kind = kint) :: i_next
70137
!
71138
!
139+
!$omp parallel
72140
do i_next = n_in, n_out
141+
!$omp workshare
73142
hdiv_visous_mat(1:jmax,i_next) = - fdm3e_d3_mat(i_next) &
74143
& + g_sph_rj(1:jmax,3)*a2r_ele_rj * fdm3e_d1_mat(i_next) &
75144
& - two*g_sph_rj(1:jmax,3)*a3r_ele_rj * fdm3e_d0_mat(i_next)
145+
!$omp end workshare
76146
end do
147+
!$omp end parallel
77148
!
78-
end subroutine set_sph_FDM_fix_hdiv_vscs_mat
149+
end subroutine each_sph_FDM_fix_hdiv_vscs_mat
79150
!
80151
! -----------------------------------------------------------------------
81152
! -----------------------------------------------------------------------
82153
!
83-
subroutine add_sph_hdiv_viscous_rho_depend(n_in, n_out, jmax, &
154+
subroutine add_sph_hdiv_viscous_rho_depend &
155+
& (kr, n_in, n_out, jmax, &
156+
& a1r_ele_rj, a2r_ele_rj, g_sph_rj, h_rho, h_drhodr, &
157+
& nri_fdm, fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
158+
& hdiv_visous_mat)
159+
!
160+
integer(kind = kint), intent(in) :: n_in, n_out
161+
integer(kind = kint), intent(in) :: kr, nri_fdm
162+
integer(kind = kint), intent(in) :: jmax
163+
real(kind = kreal), intent(in) :: a1r_ele_rj
164+
real(kind = kreal), intent(in) :: a2r_ele_rj
165+
real(kind = kreal), intent(in) :: g_sph_rj(jmax,17)
166+
real(kind = kreal), intent(in) :: h_rho, h_drhodr
167+
real(kind = kreal), intent(in) &
168+
& :: fdm3e_d0_mat(nri_fdm,n_in:n_out)
169+
real(kind = kreal), intent(in) &
170+
& :: fdm3e_d1_mat(nri_fdm,n_in:n_out)
171+
real(kind = kreal), intent(in) &
172+
& :: fdm3e_d2_mat(nri_fdm,n_in:n_out)
173+
!
174+
real(kind = kreal), intent(inout) &
175+
& :: hdiv_visous_mat(jmax,n_in:n_out)
176+
!
177+
integer(kind = kint) :: i_next
178+
real(kind = kreal) :: c_d1
179+
!
180+
!
181+
c_d1 = two * a1r_ele_rj * h_rho + h_drhodr
182+
do i_next = n_in, n_out
183+
hdiv_visous_mat(1:jmax,i_next) = hdiv_visous_mat(1:jmax,i_next) &
184+
& + h_rho * fdm3e_d2_mat(kr,i_next) &
185+
& + c_d1 * fdm3e_d1_mat(kr,i_next) &
186+
& - (g_sph_rj(1:jmax,3)*a2r_ele_rj &
187+
& * h_rho * two / three) &
188+
& * fdm3e_d0_mat(kr,i_next)
189+
end do
190+
!
191+
end subroutine add_sph_hdiv_viscous_rho_depend
192+
!
193+
! -----------------------------------------------------------------------
194+
!
195+
subroutine each_sph_hdiv_vscs_rho_depend(n_in, n_out, jmax, &
84196
& a1r_ele_rj, a2r_ele_rj, g_sph_rj, h_rho, h_drhodr, &
85197
& fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
86198
& hdiv_visous_mat)
@@ -103,21 +215,67 @@ subroutine add_sph_hdiv_viscous_rho_depend(n_in, n_out, jmax, &
103215
!
104216
!
105217
c_d1 = two * a1r_ele_rj * h_rho + h_drhodr
218+
!$omp parallel
106219
do i_next = n_in, n_out
220+
!$omp workshare
107221
hdiv_visous_mat(1:jmax,i_next) = hdiv_visous_mat(1:jmax,i_next) &
108222
& + h_rho * fdm3e_d2_mat(i_next) &
109223
& + c_d1 * fdm3e_d1_mat(i_next) &
110224
& - (g_sph_rj(1:jmax,3)*a2r_ele_rj &
111225
& * h_rho * two / three) &
112226
& * fdm3e_d0_mat(i_next)
227+
!$omp end workshare
113228
end do
229+
!$omp end parallel
114230
!
115-
end subroutine add_sph_hdiv_viscous_rho_depend
231+
end subroutine each_sph_hdiv_vscs_rho_depend
116232
!
117233
! -----------------------------------------------------------------------
118234
! -----------------------------------------------------------------------
119235
!
120-
subroutine add_sph_hdiv_viscous_nu_depend(n_in, n_out, jmax, &
236+
subroutine add_sph_hdiv_viscous_nu_depend(kr, n_in, n_out, jmax, &
237+
& a1r_ele_rj, a2r_ele_rj, g_sph_rj, relative_d, h_nu, &
238+
& nri_fdm, fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
239+
& hdiv_visous_mat)
240+
!
241+
integer(kind = kint), intent(in) :: n_in, n_out
242+
integer(kind = kint), intent(in) :: kr, nri_fdm
243+
integer(kind = kint), intent(in) :: jmax
244+
real(kind = kreal), intent(in) :: a1r_ele_rj
245+
real(kind = kreal), intent(in) :: a2r_ele_rj
246+
real(kind = kreal), intent(in) :: g_sph_rj(jmax,17)
247+
real(kind = kreal), intent(in) :: relative_d, h_nu
248+
real(kind = kreal), intent(in) &
249+
& :: fdm3e_d0_mat(nri_fdm,n_in:n_out)
250+
real(kind = kreal), intent(in) &
251+
& :: fdm3e_d1_mat(nri_fdm,n_in:n_out)
252+
real(kind = kreal), intent(in) &
253+
& :: fdm3e_d2_mat(nri_fdm,n_in:n_out)
254+
!
255+
real(kind = kreal), intent(inout) &
256+
& :: hdiv_visous_mat(jmax,n_in:n_out)
257+
!
258+
integer(kind = kint) :: i_next
259+
real(kind = kreal) :: c_d2, c_d1
260+
!
261+
!
262+
do i_next = n_in, n_out
263+
c_d2 = - h_nu
264+
c_d1 = two * a1r_ele_rj * h_nu
265+
hdiv_visous_mat(1:jmax,i_next) = hdiv_visous_mat(1:jmax,i_next) &
266+
& + c_d2 * fdm3e_d2_mat(kr,i_next) &
267+
& + c_d1 * fdm3e_d1_mat(kr,i_next) &
268+
& - g_sph_rj(1:jmax,3) * a2r_ele_rj * h_nu &
269+
& * fdm3e_d0_mat(kr,i_next)
270+
hdiv_visous_mat(1:jmax,i_next) = relative_d &
271+
& * hdiv_visous_mat(1:jmax,i_next)
272+
end do
273+
!
274+
end subroutine add_sph_hdiv_viscous_nu_depend
275+
!
276+
! -----------------------------------------------------------------------
277+
!
278+
subroutine each_sph_hdiv_vscs_nu_depend(n_in, n_out, jmax, &
121279
& a1r_ele_rj, a2r_ele_rj, g_sph_rj, relative_d, h_nu, &
122280
& fdm3e_d0_mat, fdm3e_d1_mat, fdm3e_d2_mat, &
123281
& hdiv_visous_mat)
@@ -139,19 +297,23 @@ subroutine add_sph_hdiv_viscous_nu_depend(n_in, n_out, jmax, &
139297
real(kind = kreal) :: c_d2, c_d1
140298
!
141299
!
300+
!$omp parallel
142301
do i_next = n_in, n_out
143302
c_d2 = - h_nu
144303
c_d1 = two * a1r_ele_rj * h_nu
304+
!$omp workshare
145305
hdiv_visous_mat(1:jmax,i_next) = hdiv_visous_mat(1:jmax,i_next) &
146306
& + c_d2 * fdm3e_d2_mat(i_next) &
147307
& + c_d1 * fdm3e_d1_mat(i_next) &
148308
& - g_sph_rj(1:jmax,3) * a2r_ele_rj * h_nu &
149309
& * fdm3e_d0_mat(i_next)
150310
hdiv_visous_mat(1:jmax,i_next) = relative_d &
151311
& * hdiv_visous_mat(1:jmax,i_next)
312+
!$omp end workshare
152313
end do
314+
!$omp end parallel
153315
!
154-
end subroutine add_sph_hdiv_viscous_nu_depend
316+
end subroutine each_sph_hdiv_vscs_nu_depend
155317
!
156318
! -----------------------------------------------------------------------
157319
!

0 commit comments

Comments
 (0)