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

Impactor with contact #143

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Impactor with contact #143

wants to merge 14 commits into from

Conversation

streeve
Copy link
Collaborator

@streeve streeve commented Nov 1, 2024

Still a bit messy, but rebased on main from the very old original version in #59

@streeve streeve requested a review from abisner November 1, 2024 15:07
@streeve streeve self-assigned this Nov 1, 2024
@streeve streeve changed the title Initial contact forces Impactor with contact Nov 1, 2024
src/CabanaPD_Contact.hpp Outdated Show resolved Hide resolved
}
};

template <class MemorySpace, class ContactType>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
template <class MemorySpace, class ContactType>
template <class MemorySpace, class ContactModelType>

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed


template <class ForceType, class ParticleType, class ParallelType>
void computeContactFull( ForceType& fc, const ParticleType& particles,
const int n_local,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think n_local here is an unused parameter, and should be removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Kept to align with other force classes (should be removed separately though since it's available in the particle object)

src/CabanaPD_Contact.hpp Outdated Show resolved Hide resolved
// neigh_op_tag );

// Forces only atomic if using team threading
if ( std::is_same<decltype( neigh_op_tag ), Cabana::TeamOpTag>::value )
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if ( std::is_same<decltype( neigh_op_tag ), Cabana::TeamOpTag>::value )
if constexpr ( std::is_same<decltype( neigh_op_tag ), Cabana::TeamOpTag>::value )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

// Update ghost particles.
comm->gatherDisplacement();

// Compute internal forces.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Compute internal forces.
// Compute internal (PD) forces.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Planning for this to be PD or DEM, depending on which force type is passed in

using neighbor_type = typename base_type::neighbor_type;
using force_model_type = ForceModel;
using force_type = typename base_type::force_type;
using neigh_iter_tag = Cabana::SerialOpTag;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I assume you'll mean to expose neigh_iter_tag to allow for TeamOpTag at a later time.

mesh_min[d] = particles.ghost_mesh_lo[d];
mesh_max[d] = particles.ghost_mesh_hi[d];
}
const auto y = particles.sliceCurrentPosition();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing a particles migrate step here to ensure that the current positions are up-to-date?

Copy link
Collaborator Author

@streeve streeve left a comment

Choose a reason for hiding this comment

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

Pretty big update here - contact is now embedded in the main solvers and neighbor lists belong to the force objects to simplify how the PD/contact/DEM works

}
};

template <class MemorySpace, class ContactType>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed

src/CabanaPD_Contact.hpp Outdated Show resolved Hide resolved

template <class ForceType, class ParticleType, class ParallelType>
void computeContactFull( ForceType& fc, const ParticleType& particles,
const int n_local,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Kept to align with other force classes (should be removed separately though since it's available in the particle object)

// neigh_op_tag );

// Forces only atomic if using team threading
if ( std::is_same<decltype( neigh_op_tag ), Cabana::TeamOpTag>::value )
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

// Update ghost particles.
comm->gatherDisplacement();

// Compute internal forces.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Planning for this to be PD or DEM, depending on which force type is passed in

This was referenced Nov 13, 2024
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.

2 participants