GRTLCollaboration / GRChombo

An AMR based open-source code for numerical relativity simulations.
BSD 3-Clause "New" or "Revised" License
82 stars 53 forks source link

Add ability to use diagnostic variables in tagging criterion #219

Closed mirenradia closed 1 year ago

mirenradia commented 1 year ago

This PR adds the ability to use diagnostic variables in the tagging criterion. Note that the old virtual function (without the diagnostics argument) still exists in GRAMRLevel so this shouldn't break compatibility with old examples.

The only disadvantage is that the compiler will not throw an error if neither computeTaggingCriterion is overridden as they are both not pure virtual. It is up to the user to implement at least one of them.

KAClough commented 1 year ago

I think it is fine that the user needs to implement one of the two, most people will copy the examples so won't forget to do it, and if they do they will soon figure out that it is not refining! We should however update the wiki here: https://github.com/GRChombo/GRChombo/wiki/A-new-Example-folder once this is merged.

mirenradia commented 1 year ago

I updated the wiki page you linked and also the Updating your branches page.