-
Notifications
You must be signed in to change notification settings - Fork 240
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
Update point_is_in_domain function #5509
Update point_is_in_domain function #5509
Conversation
Hi Anne, I will review this later (have to finish AGU poster first :-)), but here is an idea for your original problem:
Is it worth trying to implement the fall back method in case mesh deformation is enabled? Or is your question specifically about the case where initial mesh deformation will deform the mesh a lot? |
Ah good idea! I'll have a look if using find_active_cell_around_point can cover all the possible scenarios, thanks! |
I took a closer look at the code, but I have to say it is quite hard to understand its intent. I have two question:
If the solution to expand the functionality of the functions to also check deformed meshes is working, I think that would be what I prefer to the current approach in this PR. |
There are two things that I wanted to change:
Concerning point 1: Concerning point 2: However, now I took your suggestion and when there is mesh deformation of any kind and at any time, I use the GridTools function. This means all situations are covered (I still need to test it though). |
I've now also added the find_active_cell_around_point call to chunk.cc. Two new tests check whether the point_is_in_domain function works with initial topography for the box and the chunk. And I've adapted an existing test to test the function over time with mesh deformation. All tests fail on my laptop though, so I have to see what the tester says. |
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.
I am not sure if I like the call to the GridTools
function.
Ah yes, of course. I've done something similar to point_values.cc now, is that what you're looking for? |
The new tests run now (but fail as I haven't copied over the test results yet). dealii-master seems broken, 18 unrelated gmg tests fail. |
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.
Yes, I think this is the right approach, thanks for the changes. Just some smallish comments. Also please add a changelog, its worth noting that this works now (at least for some geometries) with mesh deformation.
8a39e0a
to
9d13f2b
Compare
9d13f2b
to
4b997e0
Compare
Hi @gassmoeller, I've added a changelog, unified the comments and moved part of the functionality into a Utilities function. Anything else? The failing tester is only for gmg tests on dealii main. |
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.
Thank you. Looks good to go now. 👍
We have use cases where we apply traction boundary conditions and mesh deformation. However, the initial lithostatic pressure traction plugin uses the function
point_is_in_domain
of the geometry model to check whether the reference point where the lithostatic profile is calculated lies in the domain. At the moment, the function cannot deal with initial topography and throws an error message. It also neglects initial mesh deformation. However, forchunk
andbox
geometries, we know what initial topography is applied. And we can also check whether initial mesh deformation is applied. This PR:The problem is that when the lithostatic profile is computed, initialization of the simulator has not finished, and therefore we cannot ask for the Mesh Deformation Handler. My original problem is therefore not solved. I do consider this PR an improvement by itself and would appreciate input on how to also fix my problem. I could read in the required mesh deformation information from the input file, but that seems less elegant.
The
initial lithostatic pressure
plugin actually does not need to know whether the representative point lies within the domain boundaries in all directions, only in the horizontal directions, as the vertical coordinate is ignored. Thepoint_is_in_domain
function could therefore become apoint_is_within_horizontal_extents_of_domain
function.But, the
point_is_in_domain
function is by now used in one other place than for theinitial lithostatic pressure
plugin, namely in initial_temperature/random_gaussian_perturbation.cc. Therefore, I could also do the checking of the horizontal extents within theinitial lithostatic pressure
plugin, as this plugin requests a lot of information from the geometry models already.For all pull requests:
For new features/models or changes of existing features: