-
Notifications
You must be signed in to change notification settings - Fork 60
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
Force chains, add the arbitrary rule #1342
Conversation
std::vector<Point<3>> vertices; | ||
std::vector<double> normal_forces_vector; |
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 think you need to give those a defaul value otherwise if you have a processor with nothing won't you get an error ? LIke if the vectors are empty
@@ -102,7 +111,7 @@ ParticlesForceChains<dim, contact_model, rolling_friction_model>:: | |||
Vector<float> force_values(triangulation.n_active_cells()); |
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.
Wait why is this a Vector of float? This will be in single precision... why do 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.
Smalls changes nothing big
// Clear the containers for the next writing time step. | ||
vertices.clear(); | ||
normal_forces_vector.clear(); |
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.
// Clear the containers for the next writing time step. | |
vertices.clear(); | |
normal_forces_vector.clear(); |
You don't need to clear the containers because they will automatically be cleared out by going out of scope since the variables are local to the scope.
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.
Last changes and ready for merge.
*/ | ||
template <ContactType contact_type> | ||
inline void | ||
execute_contact_calculation( | ||
typename DEM::dem_data_structures<dim>::particle_contact_info |
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.
This could be const
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.
No it cannot. It has something to do with the particle_particle_contact_force.h file.
There's an other function called execute_contact_calculation
with the same input parameters. In that function, we clear the tangential overlap, thus it is not const.
I'm not sure if the ParticlesForceChains class needs to inherit from ParticleParticleContactForce, but this is why it cannot be const.
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.
Perfect
2cfd004
to
ecd74ab
Compare
Description
Force chains between local-ghost particle were being duplicated since the arbitrary rule with particle ids was not implemented.
Solution
The
execute_contact_calculation
function in theforce_chain_visualization.h
file is templated with the contact type. Weh nwe are dealing withghost_particle_particle
contacts, we apply the rule.Testing
I could add a test, but I'm not sure what is the best way to do it. It would require two particles, being in two different subdomains.
Documentation
N/A
Checklist (will be removed when merged)
See this page for more information about the pull request process.
Code related list:
Pull request related list: