-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Refactor all user_ subroutines to have the name io_ and consolidate the user folder into the io folder
-
Fix formatting in user_udio_writer.f90
contains | ||
module subroutine user_dump_param(param,t) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only other thing I think would be useful is to change all of these subroutines from user_ to io_, then consolidating the user and io folders. This is how the OOP branch is structured after I realized it was a mistake to try to separate the parameter input file stuff from everything else.
@@ -114,6 +115,16 @@ module subroutine user_udio_writer(param, unit, iotype, v_list, iostat, iomsg) | |||
write(unit, '("LTOT_ORIG ",3(1X,ES25.17))') param%Ltot_orig(:) | |||
write(unit, '("LORBIT_ORIG",3(1X,ES25.17))') param%Lorbit_orig(:) | |||
write(unit, '("LSPIN_ORIG ",3(1X,ES25.17))') param%Lspin_orig(:) | |||
write(unit, '("LCB_INITIAL ",3(1X,ES25.17))') swiftest_pLA%Lcb_initial(:) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The formatting of the parameter files gets all wonky with these simple write statements. With the exception of the arrays, scalar outputs should follow this pattern in order for the parameter dump files to be formatted in a neat and tidy way:
write(param_name, Afmt) "VARIABLENAME"; write(param_value, Rfmt) VARIABLE; write(unit, Afmt) adjustl(param_name), adjustl(param_value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One optional refactoring exercise, then you are go for merge.
Makefile
Outdated
@@ -59,7 +58,7 @@ SWIFTEST_MODULES = swiftest_globals.f90 \ | |||
|
|||
include Makefile.Defines | |||
|
|||
MODULES = $(SWIFTEST_MODULES) $(USER_MODULES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is a bit confusing, but USER_MODULES refers to the user-defined force functions (of which, none are defined here). So you don't actually have to get rid of this bit as it's not related to the user input module that you got rid of
@@ -61,17 +60,128 @@ module swiftest_data_structures | |||
procedure :: read_from_file => swiftest_read_pl_in | |||
end type swiftest_pl | |||
|
|||
type, public :: io_input_parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked in the OOP branch, and it looks like I call this variable type swiftest_parameters
. If you want to save future Carlisle (or Future Dave) time and effort, you could refactor io_input_parameters
to swiftest_parameters
now (or you can make an executive decision that you prefer io_input_parameters
and I'll be the one to make the change on the OOP branch....it's up to you. I can refactor it in like two clicks.)
added new variables to dump files so that restarting from dump works