Skip to content

Conversation

@kwitaechong
Copy link
Collaborator

add uniform surface particle initialization.

when ppf = 1 : create on the centroid
ppf = 3 : create on the center between centroid and vertex
ppf = 4 : ppf = 1 + ppf = 3

if( particles_per_facet == 3 )
px = abc_centroid[ip+1];
// ppf = 1 or 4
else
Copy link
Collaborator

@abisner abisner Jan 23, 2023

Choose a reason for hiding this comment

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

ppf = 2 is not disallowed here, or for that matter, ppf > 4, which would lead to a runtime error.
We might want a better way to restrict to these special cases for now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this ppf more like the particles per dimension in the interior uniform - number of particles per median (or some combination of median and space between for better coverage)? That way we don't have to restrict so many cases

Copy link
Collaborator

Choose a reason for hiding this comment

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

I updated here to get the style that matches the internal particle uniform init. For ppf=0 you get one on the centroid, then the intent is to add 1 per facet median for each ppf>0, but those are wrong.

@abisner can you take a look to fix since you wrote the random version? Mostly looking for anything reasonable we can merge for now, even if we only really use the one on the centroid for now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@streeve I fixed it to work with internal division points with particles_per_facet_median if this is your intention

Copy link
Collaborator

Choose a reason for hiding this comment

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

No, your recursive version is better

if( particles_per_facet == 3 )
px = abc_centroid[ip+1];
// ppf = 1 or 4
else
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make this ppf more like the particles per dimension in the interior uniform - number of particles per median (or some combination of median and space between for better coverage)? That way we don't have to restrict so many cases

@kwitaechong kwitaechong force-pushed the uniform_surface_particle branch from f52d377 to 58de92a Compare May 11, 2023 03:14
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