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

Pull Request with Dump File Changes #1

Merged
merged 4 commits into from
Jun 28, 2021
Merged

Pull Request with Dump File Changes #1

merged 4 commits into from
Jun 28, 2021

Conversation

cwishard
Copy link
Collaborator

added new variables to dump files so that restarting from dump works

@cwishard cwishard requested a review from daminton June 28, 2021 18:13
@cwishard cwishard added the bug Something isn't working label Jun 28, 2021
Copy link
Contributor

@daminton daminton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Refactor all user_ subroutines to have the name io_ and consolidate the user folder into the io folder

  2. Fix formatting in user_udio_writer.f90

contains
module subroutine user_dump_param(param,t)
Copy link
Contributor

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(:)
Copy link
Contributor

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)

Copy link
Contributor

@daminton daminton left a 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)
Copy link
Contributor

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
Copy link
Contributor

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.)

@cwishard cwishard merged commit bb6e3b3 into Fragmentation Jun 28, 2021
@daminton daminton deleted the Carlisle branch September 19, 2023 17:22
daminton pushed a commit that referenced this pull request Oct 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants