-
Notifications
You must be signed in to change notification settings - Fork 144
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
tether force evaluation in IIMethod
#1568
Comments
not sure if there is a way to avoid looping over local surface mesh elements during each evaluation. |
We must avoid looping over all boundary elements just to evaluate a single point force. Somehow we need either to rely on existing libMesh data structures to map between surface and volume elements, or we need to cache that stuff ourselves. |
An easy partial fix is to exchange the loop order: we can make the loop over dimensions the innermost one to cut the amount of work by 2/3rds. |
But this is not a single point force. In fact, the traction is imposed on all side-sets of the flexible flapping wing in this example except for a single smaller side that has a zero displacement (clamped to the housing). |
Yes, this would be helpful, especially if you a dense TET surface mesh with a lot of elements. |
Sorry by "TET", I meant surface triangulation based on a volumetric tetrahedral mesh |
I guess we can store the info we get from the |
Okay I guess I'm now getting what @boyceg was also referring to. Such function would be somehow the inverse of |
It seems like you want two mappings: surface element to {volumetric element + side} and {volumetric element + side} to surface element. Should be easy to track if libMesh does not already provide it. |
The implementation is OK for 2D models, and using |
(In contrast, in 2D, there are O(N) surface elements, and so the runtime complexity is O(N^2) --- the same as solving the fluid equations --- and if there are not too many surface elements in a model, you might not even notice this function.) |
This makes perfect sense, particularly for situations in which the structure expands through the entire Cartesian domain (such as a flexible tube). In example 9, however, the flexible wing where we need to apply the fluid traction is only a small portion of the computational domain, so maybe that's why it hasn't been too bad to loop over the entire surface elements for this particular example. |
Yes, exactly --- for smaller 2D models this is not a big deal. But I think that @cpuelz is trying to use this same code in a larger 3D model and is running into performance problems. |
so I built an unordered map like this:
and I evaluate the tethering force function on the volumetric mesh like this:
but the assertion I have there is thrown. I suppose either I am not building the map correctly or not using the correct element labeling. |
There could be multiple side elements associated with the same volume element. |
I think you might need to make the key {volume element ID, side index} |
I call the |
Yes but you could have multiple surface elements associated with each interior parent -- e.g. the map could be pointing back to the "wong" surface element. |
disregard that comment. I can visualize a case where you have multiple sides associated with a volume element. I was thinking that would not be the case because my surface mesh is just the vessel lumen, but maybe something funny is happening. |
If you have a boundary mesh that is synced with the volumetric mesh via the |
If you want to maintain your own mapping, |
Do one of you want to try to turn this into a patch? |
I have some code I could put in to this example that I think works. |
IBAMR/examples/IIM/ex9/example.cpp
Lines 212 to 225 in 79502c7
Any thoughts about how to make this evaluation faster? This seems to be a bottleneck for large surface meshes.
The text was updated successfully, but these errors were encountered: