-
Notifications
You must be signed in to change notification settings - Fork 28
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
First design of MD capability in Magpie #369
Conversation
aa73963
to
07b333b
Compare
Nope, not in master yet... |
src/userobjects/MDRunBase.C
Outdated
|
||
#include "libmesh/mesh_tools.h" | ||
|
||
// custom data load and data store methods for a class with virtual members (vtable pointer must not |
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 comment is not appropriate here. We need the custom load/store because we have members with data on the heap.
std::vector<std::pair<std::size_t, Real>> indices_dist; | ||
BoundingBox bbox = elem->loose_bounding_box(); | ||
Point center = 0.5 * (bbox.min() + bbox.max()); | ||
Real radius = (bbox.max() - center).norm(); |
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.
Why not use centroid and h_max here?
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 need to make sure to construct a sphere that contains the element. h_max
is the spacing between nodes and I am not sure that h_max / 2
is equal or larger than the radius of the circumscribing sphere.
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.
Yes, you're right. I may have made this mistake already somewhere in the code... :-/
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.
The alternative is to compute the circumscribing sphere in Elem
. It requires computation of the centroid though and that might be expensive. I could push a corresponding function in libmesh.
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, let's not go down that rabbit hole just now. The centroid is not necessarily the center of the circumsphere (circumcenter). This is not trivial.
07b333b
to
6f9c9ae
Compare
2822d60
to
dacc36a
Compare
Job Precheck on dacc36a wanted to post the following: Your code requires style changes. A patch was auto generated and copied here
Alternatively, with your repository up to date and in the top level of your repository:
|
ffef8c1
to
63aa6d3
Compare
Algorithm double counts MD particles on faces that are also processor interfaces. |
Is this ready then? |
Ah, I see, no double counting on element boundaries unless they also are processor boundaries. :-/ |
63aa6d3
to
d238e85
Compare
I have implemented it differently. Loop over all semi-local elements and accept particles into the element with the smaller element unique id. |
f1943a7
to
09f9b75
Compare
09f9b75
to
4230e08
Compare
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 looks good. In the future we might want to allow reading proper lammps dump files (not just .xyz). I think I have code for that already.
Refs #367