Skip to content

Conversation

@krober10nd
Copy link
Collaborator

@krober10nd krober10nd commented Feb 16, 2020

msh.BoundCr is a generalization of msh.CheckTimestep which now supports min. and max. Courant bounds.

-Default bounding of the maximum Courant number is preserved (will not try to refine to achieve min. Courant bound if the user does not ask).

For example to edit a mesh to support a 100 s timestep with a max. courant number of 6...
mnew = BoundCr(m,100,6);

If you also want to bound the minimum Courant number to 0.5 for a 100 second timestep, then
mnew = BoundCr(m,100,6,0.5);

You can also specify the number of iterations to perform..For instance here I set maxIT to 10.
mnew = BoundCr(m,100,6,0.5,10);

The approach to bound the maximum Courant number is the same as CheckTimestep.

The approach to bound the minimum Courant number is based on using an octree refinement strategy that splits the edges of triangles that need refinement at their midpoint while leaving the rest alone.

Note it is recommended to use this function (BoundCr) after building a mesh size function with a similar set of bounds as bounding the Courant in the mesh size function only approximately ensures it will be obeyed.

@krober10nd krober10nd mentioned this pull request Feb 16, 2020
@WPringle
Copy link
Collaborator

Should we just get remove CheckTimestep? Or just have it be a placeholder function to say, "this function has been retired, use BoundCr instead".

@krober10nd
Copy link
Collaborator Author

I think just have a warning but replace it’s functionality in the examples and user guide.

I made some corrections to the help and the treatment of the input options to BoundCr. I believe that it was not implemented quite as you wanted it to be.  Also some more information to the display.
@WPringle
Copy link
Collaborator

made some slight corrections to ensure handling of the inputs was correct (such as if you did not provide the max_cr it would error) and also corrected the help to reflect the actual way it is treated.

Copy link
Collaborator

@WPringle WPringle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function of refining added is very nice. Seemed to work as intended on a test mesh. Just made some changes to the handling of inputs, help and display to screen.

@krober10nd krober10nd merged commit d21ad48 into Projection Feb 28, 2020
@WPringle WPringle deleted the InverseCFL branch March 18, 2020 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants