Open
Conversation
This allow the file name being specified completely from the user of the api if the last argument (timespte) is -1
This is to make sure restarts can run properly in case mesh is adapted TODO: Need to figure out how to disable this if there is no adapt happening.
the bool input "update" cause the part.smb to be overwritten by the mesh (adapted) when an output file is written.
…itten out If mesh is adapted part.smb should be updated, otherwise restart would fail.
Collaborator
Author
|
@seegyoung @usmanriaz07 @bclyons12 @nferraro This pull request includes all the changes I made regarding spr-base adapt. At the moment the only thing that does not work is restarting for case 5 [described in the body comment above]. Since I have started a new job I can only spend limited time over the next few days fixing that issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The changes in this PR are in regards to adaptive-solve implementation using spr-based error estimation. Additional updates/modifications are also included for things like solution transfer/field transfer/etc (see the detailed list at the end of this notes)
At this point, things work for both 2D/3D. There are a few new parameters introduced in the input file as follows:
ispradapt(default 0): 1 to turn on spr-adapt and 0 to turn it offisprntime(default 10): an integer bigger than 0 to call spr-adapt everyisprntimetime stepsisprweight(default 0.1): a real number smaller than 1 specifying the weight of error to calculate the size-field (note smaller weight results in much more aggressive adaptation).isprmaxsize(default 0.05): user-specified maximum allowed edge length in the entire meshisprrefinelevel(default 1): maximum level of refinement allowed during each call to spr-adapt [for example a value of 3 means the lengths of the edges will not reduce by a factor of more than 8(= 2^3) in each call to spr-adaptisprcoarsenlevel(default -1): maximum level of coarsening allowed during each call to spr-adapt. use -1 to disable coarsening altogether [for example a value of 3 means the lengths of the edges will not increase by a factor of more than 8(= 2^3) in each call to spr-adaptThe high-level API that can be called on the Fortran side is
adapt_by_spr. An example use is as followswhere
field_veccontains the list of all the privacy variables (e.g.u_field,vz_field,chi_field,psi_field, etc) and the the second argumentpsi_gtellsadapt_by_sprto use thepsi_fieldfor error estimation.Checklist
create_fieldandcreate_vectorsubroutines to take an optionalprefixargument as the field nameoutput.f90to mark the fields for solution transfer following the same logic used to write fields to restartFor case 5 the observations is as follows, If I let an adaptive run (with and adapt and output every 5 time step) run until time step 101, the lest time step of the solution (i.e., 101) completes successfully, and the last output file is for time step 100. If I restart another run from time step 100 then the solution at time step 101 does not converge.
NOTE when merging all the installations of
m3dc1_socreclibraries have to updated otherwise users of the Fortran code will have trouble compiling it.NOTE since some of the changes in this branch have been merged and reverted in the past (see commit 3ac2071) when merging to master might cause some issues. I have already merged the master branch (with that revert reverted) into this branch so hopefully merging this into master would not cause any issues.
NOTE Since I didn't have access to all the productions machines, I do not know if the regression tests pass. Since none of the regression tests relly on new spr-based adaptive procedures, I would guess that regression tests should pass. However I think to be safe someone with access to all the production machines needs to check that.