Skip to content

Commit f51bb47

Browse files
committed
Remove double buoyancy routines
1 parent 5e38799 commit f51bb47

File tree

7 files changed

+46
-285
lines changed

7 files changed

+46
-285
lines changed

src/Fortran_libraries/MHD_src/sph_MHD/cal_div_of_forces.f90

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
!! type(base_force_address), intent(in) :: ipol_div_frc
1616
!! type(phys_data), intent(inout) :: rj_fld
1717
!!
18-
!! subroutine add_div_advection_to_force &
18+
!! subroutine sub_div_advection_to_force &
1919
!! & (is_press, is_div, nnod_rj, ntot_phys_rj, d_rj)
20+
!! integer(kind = kint), intent(in) :: is_press, is_div
21+
!! integer(kind = kint), intent(in) :: nnod_rj, ntot_phys_rj
22+
!! real (kind=kreal), intent(inout) :: d_rj(nnod_rj,ntot_phys_rj)
2023
!! subroutine add_term_to_div_force &
2124
!! & (is_press, is_div, nnod_rj, ntot_phys_rj, d_rj)
25+
!! integer(kind = kint), intent(in) :: is_press, is_div
26+
!! integer(kind = kint), intent(in) :: nnod_rj, ntot_phys_rj
27+
!! real (kind=kreal), intent(inout) :: d_rj(nnod_rj,ntot_phys_rj)
2228
!!@endverbatim
2329
!
2430
module cal_div_of_forces
@@ -108,11 +114,11 @@ subroutine sum_div_of_forces &
108114
else
109115
call clear_field_data(rj_fld, n_scalar, ipol_base%i_press)
110116
!
111-
! if(fl_prop%flag_inertia) then
112-
! call add_div_advection_to_force &
113-
! & (ipol_base%i_press, ipol_div_frc%i_m_advect, &
114-
! & rj_fld%n_point, rj_fld%ntot_phys, rj_fld%d_fld)
115-
! end if
117+
if(fl_prop%flag_inertia) then
118+
call sub_div_advection_to_force &
119+
& (ipol_base%i_press, ipol_div_frc%i_m_advect, &
120+
& rj_fld%n_point, rj_fld%ntot_phys, rj_fld%d_fld)
121+
end if
116122
!
117123
if(fl_prop%flag_coriolis) then
118124
call add_term_to_div_force &
@@ -239,7 +245,7 @@ end subroutine set_div_cv_terms_to_force
239245
! ----------------------------------------------------------------------
240246
! ----------------------------------------------------------------------
241247
!
242-
subroutine add_div_advection_to_force &
248+
subroutine sub_div_advection_to_force &
243249
& (is_press, is_div, nnod_rj, ntot_phys_rj, d_rj)
244250
!
245251
integer(kind = kint), intent(in) :: is_press, is_div
@@ -255,7 +261,7 @@ subroutine add_div_advection_to_force &
255261
end do
256262
!$omp end parallel do
257263
!
258-
end subroutine add_div_advection_to_force
264+
end subroutine sub_div_advection_to_force
259265
!
260266
! ----------------------------------------------------------------------
261267
!

src/Fortran_libraries/MHD_src/sph_MHD/cal_self_buoyancies_sph.f90

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ module cal_self_buoyancies_sph
4343
!
4444
implicit none
4545
!
46-
private :: sel_buoyancies_sph_rj
46+
private :: sel_buoyancy_sph_rj
4747
!
4848
!-----------------------------------------------------------------------
4949
!
@@ -93,19 +93,18 @@ subroutine sel_buoyancies_sph_MHD &
9393
type(phys_data), intent(inout) :: rj_fld
9494
!
9595
!
96-
call sel_buoyancies_sph_rj(fl_prop%i_grav, sph_rj, leg, &
97-
& ibuo_temp, ipol_frc%i_buoyancy, fl_prop%coef_buo, &
98-
& sph_bc_U, rj_fld)
99-
call sel_buoyancies_sph_rj(fl_prop%i_grav, sph_rj, leg, &
100-
& ibuo_comp, ipol_frc%i_comp_buo, fl_prop%coef_comp_buo, &
101-
& sph_bc_U, rj_fld)
96+
call sel_buoyancy_sph_rj(fl_prop%i_grav, sph_rj, leg, ibuo_temp, &
97+
& ipol_frc%i_buoyancy, fl_prop%coef_buo, sph_bc_U, rj_fld)
98+
call sel_buoyancy_sph_rj(fl_prop%i_grav, sph_rj, leg, ibuo_comp, &
99+
& ipol_frc%i_comp_buo, fl_prop%coef_comp_buo, sph_bc_U, rj_fld)
102100
!
103101
end subroutine sel_buoyancies_sph_MHD
104102
!
105103
!-----------------------------------------------------------------------
106104
!
107-
subroutine sel_buoyancies_sph_rj(i_grav, sph_rj, leg, &
108-
& ipol_scalar, ipol_buo, coef_buo, sph_bc_U, rj_fld)
105+
subroutine sel_buoyancy_sph_rj &
106+
& (i_grav, sph_rj, leg, ipol_scalar, ipol_buo, &
107+
& coef_buo, sph_bc_U, rj_fld)
109108
!
110109
use cal_buoyancies_sph_MHD
111110
use adjust_reference_fields
@@ -141,7 +140,7 @@ subroutine sel_buoyancies_sph_rj(i_grav, sph_rj, leg, &
141140
end if
142141
call delete_sphere_average(ipol_buo, sph_rj, rj_fld)
143142
!
144-
end subroutine sel_buoyancies_sph_rj
143+
end subroutine sel_buoyancy_sph_rj
145144
!
146145
!-----------------------------------------------------------------------
147146
!

src/Fortran_libraries/MHD_src/sph_MHD/cal_sph_divergence_of_force.f90

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ subroutine cal_div_of_forces_sph_2 &
6464
!
6565
use t_control_parameter
6666
use const_sph_divergence
67-
! use div_self_buoyancies_sph
6867
!
6968
type(sph_rj_grid), intent(in) :: sph_rj
7069
type(fdm_matrices), intent(in) :: r_2nd
@@ -102,14 +101,6 @@ subroutine cal_div_of_forces_sph_2 &
102101
& MHD_prop%fl_prop%flag_comp_buoyancy, &
103102
& sph_rj, r_2nd, sph_MHD_bc, g_sph_rj, &
104103
& ipol_frc, ipol_div_frc, rj_fld)
105-
!
106-
! call sel_div_buoyancies_sph_MHD &
107-
! & (MHD_prop%fl_prop%flag_thermal_buoyancy, &
108-
! & MHD_prop%fl_prop%flag_comp_buoyancy, &
109-
! & sph_rj, ipol_base, ipol_grad, ipol_div_frc, &
110-
! & MHD_prop%fl_prop%coef_buo, MHD_prop%fl_prop%coef_comp_buo, &
111-
! & MHD_prop%ref_param_T, MHD_prop%ref_param_C, &
112-
! & sph_MHD_bc%sph_bc_U, rj_fld)
113104
!
114105
end subroutine cal_div_of_forces_sph_2
115106
!

src/Fortran_libraries/MHD_src/sph_MHD/div_self_buoyancies_sph.f90

Lines changed: 0 additions & 201 deletions
This file was deleted.

src/Fortran_libraries/MHD_src/sph_MHD/lead_fields_4_sph_mhd.f90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ subroutine pressure_4_sph_mhd(sph, MHD_prop, sph_MHD_bc, &
327327
call cal_div_of_forces_sph_2 &
328328
& (sph%sph_rj, r_2nd, MHD_prop, sph_MHD_bc, leg%g_sph_rj, &
329329
& ipol%forces, ipol%div_forces, rj_fld)
330-
! & ipol%base, ipol%grad_fld, ipol%forces, ipol%div_forces, rj_fld)
331330
!
332331
call s_const_radial_forces_on_bc(sph%sph_rj, leg%g_sph_rj, &
333332
& MHD_prop%fl_prop, sph_MHD_bc%sph_bc_U, &

0 commit comments

Comments
 (0)