-
Notifications
You must be signed in to change notification settings - Fork 16
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
Contact 1 of 3 #197
base: main
Are you sure you want to change the base?
Contact 1 of 3 #197
Conversation
Yaml input now accepts 'global' as a geometry option for the boundary conditions. This is for contact only and means that contact will be checked on all boundary patches. Additionally, there is some cleanup here as contact features will begin to be added.
Setting things up with a function pointer for the case where there is no contact, an empty function will be getting executed instead of hitting an if statement.
Additionally, the contact_test.geo was changed so that the patch ordered in outward normal. Added additional members to contact_patch_t and contact_patches_t. Getting everything set up for the bucket sorting.
All the previous sorting methods lead up to the ability to find nodes that could potentially penetrate a patch. This ability is now implemented with the contact_patches_t::find_nodes function.
We probably want the contact bank to live outside of the SGH solver, that way we can use the same framework for multiple solvers. Lets chat at our next meeting about where that needs to live. |
Note: For all KOKKOS_FUNCTIONS, it needs the macro (KOKKOS_FUNCTION) placed before the return type on the line above for both the declaration and the definition. @nathanielmorgan, do we have a macro wrapping KOKKOS_FUNCTION to alias to something like DEVICE_FUNCTION, for those who dont know kokkos? May be worth doing. |
const double &ax_max, const double &ay_max, const double &az_max, | ||
const double &dt, CArrayKokkos<double> &bounds) const | ||
{ | ||
CArrayKokkos<double> add_sub(2, 3, contact_patch_t::num_nodes_in_patch); |
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.
Consider adding a comment explaining what add_sub is doing. If it is documented somewhere else, note that.
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 added this for the next pull request:
// collecting all the points that will be used to construct the bounding box into add_sub
// the bounding box is the maximum and minimum points for each dimension
Description
This is the first of a three stage pull request plan to get contact into Fierro single-node. This first stage covers sorting the set of contact nodes in such a way to allow easy access to nodes in proximity to a patch/surface. For now, all contact features are handled by
struct contact_patch_t
andstruct contact_patches_t
. The first is for handling the many roles between a single patch and node, such as detection, force resolution, computing normals, etc. The latter is for setting up the instances ofstruct contact_patch_t
, getting contact pairs, handling interactions between patches, etc. Though the name might imply that only patches are considered, this can be manipulated to handle higher order surfaces. Such features are not expected to be available immediately.In the future,
SGH::boundary_contact()
will look like this:This PR covers the
contact_patches_t::sort()
method, initializing the instances ofcontact_patches_t
andcontact_patch_t
inSGH::setup()
, and thecontact_patches_t::find_nodes()
method, which takes in acontact_patch_t
instance and determines the nodes that could penetrate thecontact_patch_t
.Type of change
Please select all relevant options
How Has This Been Tested?
contact_test.yaml
as the input, see that it successfully runs with each call ofcontact_bank.sort()
in theboundary_contact
function. Additionally, outputting thecontact_bank.nsort
array correctly depicts the nodes sorted propagating first in the x direction, then the y direction, then the z direction. Callingcontact_bank.find_nodes()
with patch 2 as the patch of interest correctly finds nodes18 19 20 21
.contact_test2.yaml
.Test Configuration:
Checklist: