Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Lots more restructuring, cleaning, refactoring, etc. Rearranged netcd…
Browse files Browse the repository at this point in the history
…f stuff to make it a bit cleaner
  • Loading branch information
daminton committed Dec 21, 2022
1 parent 1b61f96 commit da3fe6f
Show file tree
Hide file tree
Showing 17 changed files with 1,756 additions and 1,731 deletions.
21 changes: 11 additions & 10 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ SET(STRICT_MATH_FILES
SET(FAST_MATH_FILES
${SRC}/globals/globals_module.f90
${SRC}/base/base_module.f90
${SRC}/netcdf_io/netcdf_io_module.f90
${SRC}/misc/lambda_function_module.f90
${SRC}/misc/io_progress_bar_module.f90
${SRC}/encounter/encounter_module.f90
Expand All @@ -36,16 +37,6 @@ SET(FAST_MATH_FILES
${SRC}/rmvs/rmvs_module.f90
${SRC}/helio/helio_module.f90
${SRC}/symba/symba_module.f90
${SRC}/swiftest/swiftest_discard.f90
${SRC}/swiftest/swiftest_io.f90
${SRC}/swiftest/swiftest_obl.f90
${SRC}/swiftest/swiftest_util.f90
${SRC}/swiftest/swiftest_drift.f90
${SRC}/swiftest/swiftest_io_netcdf.f90
${SRC}/swiftest/swiftest_orbel.f90
${SRC}/swiftest/swiftest_gr.f90
${SRC}/swiftest/swiftest_kick.f90
${SRC}/swiftest/swiftest_setup.f90
${SRC}/collision/collision_check.f90
${SRC}/collision/collision_regime.f90
${SRC}/collision/collision_setup.f90
Expand All @@ -67,6 +58,7 @@ SET(FAST_MATH_FILES
${SRC}/helio/helio_setup.f90
${SRC}/helio/helio_step.f90
${SRC}/helio/helio_util.f90
${SRC}/netcdf_io/netcdf_io_implementations.f90
${SRC}/operator/operator_cross.f90
${SRC}/operator/operator_mag.f90
${SRC}/operator/operator_unit.f90
Expand All @@ -75,6 +67,15 @@ SET(FAST_MATH_FILES
${SRC}/rmvs/rmvs_setup.f90
${SRC}/rmvs/rmvs_step.f90
${SRC}/rmvs/rmvs_util.f90
${SRC}/swiftest/swiftest_discard.f90
${SRC}/swiftest/swiftest_io.f90
${SRC}/swiftest/swiftest_obl.f90
${SRC}/swiftest/swiftest_util.f90
${SRC}/swiftest/swiftest_drift.f90
${SRC}/swiftest/swiftest_orbel.f90
${SRC}/swiftest/swiftest_gr.f90
${SRC}/swiftest/swiftest_kick.f90
${SRC}/swiftest/swiftest_setup.f90
${SRC}/symba/symba_discard.f90
${SRC}/symba/symba_drift.f90
${SRC}/symba/symba_encounter_check.f90
Expand Down
212 changes: 1 addition & 211 deletions src/base/base_module.f90

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions src/collision/collision_io.f90

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/collision/collision_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ module collision


!! NetCDF dimension and variable names for the enounter save object
type, extends(encounter_io_parameters) :: collision_io_parameters
type, extends(encounter_netcdf_parameters) :: collision_netcdf_parameters
integer(I4B) :: stage_dimid !! ID for the stage dimension
integer(I4B) :: stage_varid !! ID for the stage variable
character(NAMELEN) :: stage_dimname = "stage" !! name of the stage dimension (before/after)
Expand All @@ -154,7 +154,7 @@ module collision
integer(I4B) :: regime_varid !! ID for the collision regime variable
contains
procedure :: initialize => collision_io_initialize_output !! Initialize a set of parameters used to identify a NetCDF output object
end type collision_io_parameters
end type collision_netcdf_parameters


type, extends(encounter_snapshot) :: collision_snapshot
Expand Down Expand Up @@ -205,7 +205,7 @@ end subroutine collision_io_dump

module subroutine collision_io_initialize_output(self, param)
implicit none
class(collision_io_parameters), intent(inout) :: self !! Parameters used to identify a particular NetCDF dataset
class(collision_netcdf_parameters), intent(inout) :: self !! Parameters used to identify a particular NetCDF dataset
class(base_parameters), intent(in) :: param !! Current run configuration parameters
end subroutine collision_io_initialize_output

Expand Down
6 changes: 3 additions & 3 deletions src/encounter/encounter_check.f90
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module subroutine encounter_check_all_plpl(param, npl, x, v, renc, dt, nenc, ind
! lfirst = .false.
! itimer%step_counter = INTERACTION_TIMER_CADENCE
! else
! if (itimer%io_netcdf_check(param, nplpl)) call itimer%time_this_loop(param, nplpl)
! if (itimer%netcdf_io_check(param, nplpl)) call itimer%time_this_loop(param, nplpl)
! end if
! else
! param%lencounter_sas_plpl = .false.
Expand Down Expand Up @@ -117,7 +117,7 @@ module subroutine encounter_check_all_plplm(param, nplm, nplt, xplm, vplm, xplt,
! lfirst = .false.
! itimer%step_counter = INTERACTION_TIMER_CADENCE
! else
! if (itimer%io_netcdf_check(param, nplplm)) call itimer%time_this_loop(param, nplplm)
! if (itimer%netcdf_io_check(param, nplplm)) call itimer%time_this_loop(param, nplplm)
! end if
! else
! param%lencounter_sas_plpl = .false.
Expand Down Expand Up @@ -214,7 +214,7 @@ module subroutine encounter_check_all_pltp(param, npl, ntp, xpl, vpl, xtp, vtp,
! if (lsecond) then ! This ensures that the encounter check methods are run at least once prior to timing. Sort and sweep improves on the second pass due to the bounding box extents needing to be nearly sorted
! call itimer%time_this_loop(param, npltp)
! lsecond = .false.
! else if (itimer%io_netcdf_check(param, npltp)) then
! else if (itimer%netcdf_io_check(param, npltp)) then
! lsecond = .true.
! itimer%is_on = .false.
! end if
Expand Down
Loading

0 comments on commit da3fe6f

Please sign in to comment.