Skip to content

Conversation

@SchoeniPhlippsn
Copy link
Contributor

Description

The Helfrich energy has been assigned to each vertex for each outgoing mesh bond, making it roughly 6 times larger.

Motivation and context

Calculating energy correctly for logging purposes.

How has this been tested?

Running simulations.

Checklist:

  • I have reviewed the Contributor Guidelines.
  • I agree with the terms of the HOOMD-blue Contributor Agreement.
  • My name is on the list of contributors (sphinx-doc/credits.rst) in the pull request source branch.
  • I have summarized these changes in CHANGELOG.rst following the established format.

h_force.data[idx_a].z += Fa.z;
h_force.data[idx_a].w += h_params.data[meshbond_type] * 0.5
* dot(sigma_dash_a, sigma_dash_a) * inv_sigma_a;
h_force.data[idx_a].w = h_params.data[meshbond_type] * 0.5
Copy link
Member

Choose a reason for hiding this comment

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

How does changing += to = not introduce new problems? What if idx_a or idx_b participate in multiple mesh bonds? With =, only the energy due to the last bond evaluated will be set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is true. But sigma_dash_a and inv_sigma_a are both precalculated quantities. That means they will be the same across all bonds and I apply the same value each time.

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.

3 participants