Skip to content
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

Difference in using float or Function(FunctionSpace(mesh, "R", 0))? #150

Open
ddundo opened this issue Sep 17, 2024 · 7 comments
Open

Difference in using float or Function(FunctionSpace(mesh, "R", 0))? #150

ddundo opened this issue Sep 17, 2024 · 7 comments
Labels
question Further information is requested

Comments

@ddundo
Copy link
Member

ddundo commented Sep 17, 2024

In the newly-added bubble shear demo, I noticed that we get different solutions if I set variables dt and theta to be floats, rather than Function(FunctionSpace(mesh, "R", 0)). That is, the uniform resolution results don't appear to change, but the adapted ones do (both classical and metric advection). Any idea why this is the case?

@ddundo ddundo added the question Further information is requested label Sep 17, 2024
@jwallwork23
Copy link
Member

Thanks for reporting this, @ddundo. Putting it for discussion at the next meeting.

@ddundo
Copy link
Member Author

ddundo commented Oct 18, 2024

This commit bfed2c2 also changed the non-uniform solutions, where time t was changed from being a float to Function(R)

@ddundo
Copy link
Member Author

ddundo commented Oct 19, 2024

Very interesting... Even logging affects adaptive results:

(firedrake) firedrake@0241f81993fe:~/firedrake/src/animate/demos$ python bubble_shear.py
Relative L2 error on the coarse mesh: 56.52%
Relative L2 error on the fine mesh: 32.29%.
Classical mesh adaptation.
   Avg. number of vertices: 2299.5
   Relative L2 error: 30.43%
Metric advection mesh adaptation.
   Avg. number of vertices: 2008.3
   Relative L2 error: 30.58%
   
   
(firedrake) firedrake@0241f81993fe:~/firedrake/src/animate/demos$ python bubble_shear.py -log_view :foo.txt:ascii_flamegraph
Relative L2 error on the coarse mesh: 56.52%
Relative L2 error on the fine mesh: 32.29%.
Classical mesh adaptation.
   Avg. number of vertices: 2308.1
   Relative L2 error: 30.32%
Metric advection mesh adaptation.
   Avg. number of vertices: 2014.3
   Relative L2 error: 30.79%

@jwallwork23
Copy link
Member

Very interesting... Even logging affects adaptive results:

Is this with float or R-space?

@ddundo
Copy link
Member Author

ddundo commented Oct 20, 2024

Very interesting... Even logging affects adaptive results:

Is this with float or R-space?

This is on the 153_improve_bubble branch, so with R-space.

@jwallwork23
Copy link
Member

Hm, are there any other floats that might be causing an issue?

@ddundo
Copy link
Member Author

ddundo commented Oct 20, 2024

Not sure, but I'll try to make minimal examples for each of these before the next meeting so we can discuss :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Development

No branches or pull requests

2 participants