Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load_Boundary_Conditions, Backup_Mod_Load, Initialize_Variables #201

Open
Niceno opened this issue May 17, 2020 · 0 comments
Open

Load_Boundary_Conditions, Backup_Mod_Load, Initialize_Variables #201

Niceno opened this issue May 17, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Niceno
Copy link
Collaborator

Niceno commented May 17, 2020

Dear all,

I was looking at the Main_Pro, and am starting to believe that the order in which we call the subroutines Load_Boundary_Conditions, Backup_Mod_Load, Initialize_Variables is a bit silly.

We currently call them in this order:

1 - Load_Boundary_Conditions
2 - Backup_Mod_Load
3 - Initialize_Variables

First problem is if we want to make a restart, we should avoid that Initialize_Variables is called. And we are currently doing it with an if statement. So it works, but it could have been avoided if Initialize Variables was called before Backup_Mod_Load.

Second problem is, say, you want to use backup files for restart, but in the new simulation you want to change boundary conditions. Currently, we first call Load_Boundary_Conditions and then we call Backup_Mod_Load which will overwrite the new boundary conditions we might want to use in new simulation :-(

I believe a better order would be:

1 - Initialize_Variables - initializes with whatever is specified in control file.
2 - Backup_Mod_Load - if specified, loads whatever it is a user want to load and overwrites initial conditions from step 1.
3 - Load_Boundary_Conditions - if one wants to change boundary conditions after restart, call this function last will overwrite values in boundary cells from step 2.

Please let me know what you think.

@Niceno Niceno added the enhancement New feature or request label May 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant