You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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 anif
statement. So it works, but it could have been avoided ifInitialize Variables
was called beforeBackup_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 callBackup_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.
The text was updated successfully, but these errors were encountered: