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
Added a parameter to switch between fraction of total error and fraction of cells #1085
Conversation
@@ -519,6 +519,10 @@ namespace aspect | |||
Patterns::Double(0,1), | |||
"The fraction of cells with the smallest error that " | |||
"should be flagged for coarsening."); | |||
prm.declare_entry ("Use fraction of cells", "false", | |||
Patterns::Bool(), | |||
"Use fraction of the total number of cells instead of" |
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.
add a space after "of" at the end of the string.
This has the disadvantage that is only mentions "refine" and not "coarsening", maybe "Adapt by fraction of cells"? |
I changed the name to "Adapt by fraction of cells" |
/run-tests |
parameters.refinement_fraction, | ||
parameters.coarsening_fraction); | ||
|
||
|
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.
Please remove one or both (your decision) of these empty lines
Hi Lev, sorry to come up with more comments after already reviewing it at the hackathon (there was simply too little time there). Can you please change the minor things that I have commented on, and add an entry into /doc/modules/changes.h to make sure you get credit for this change in the next ASPECT release mail. Just copy one of the 'New: ...' entries in there and describe the new feature in a sentence or two. And is there a test that uses the new functionality? If not, please create a very simple one. |
Hi Rene, no worries! I cleaned up the blank lines and added the decription to changes.h. I'm not sure about the tests though - I don't know how to check if any of them use the functionality (I would guess they don't), and I don't really know how to make one. Are there any guidelines for that? Or what would be a good place to start? |
576d2b9
to
06b5a77
Compare
We should write a tutorial about that in the manual at some point, but as a bottom line: Take one of the existing parameter files in the tests/ directory, modify it to use the new feature, check that the new feature does what it is supposed to do, and then just add the parameter file to the tests directory. You will then need to add another folder to that directory that is named like the parameter file, and add the model output files that proof that the feature is working (in your case likely just the file |
Hi Lev,
|
Changed name to adapt_by_fraction_of_cells Cleaned up blank lines Added description to changes.h Added a test removed the output directory parameter from the test .prm file Revert "removed the output directory parameter from the test .prm file" This reverts commit a27a2f4. Patched output files
babd61e
to
5883fa7
Compare
The one failing test is due to changes on the master branch that happened since you opened this pull request. Just apply the changes.diff file from the tester one more time (or do the changes by hand) and this should be good to go. |
Thanks Rene! |
Ready to merge. Nice! Thanks for contributing 👍 |
Added a parameter to switch between fraction of error and fration of cells for the mesh refinement/coarsening routine