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

Shape union #3493

Merged
merged 4 commits into from
Feb 19, 2020
Merged

Shape union #3493

merged 4 commits into from
Feb 19, 2020

Conversation

KaiSzuttor
Copy link
Member

A union of shapes.

@codecov
Copy link

codecov bot commented Feb 17, 2020

Codecov Report

Merging #3493 into python will increase coverage by <1%.
The diff coverage is 94%.

Impacted file tree graph

@@           Coverage Diff           @@
##           python   #3493    +/-   ##
=======================================
+ Coverage      87%     87%   +<1%     
=======================================
  Files         534     537     +3     
  Lines       24367   24433    +66     
=======================================
+ Hits        21216   21275    +59     
- Misses       3151    3158     +7
Impacted Files Coverage Δ
src/core/shapes/Shape.hpp 100% <100%> (ø) ⬆️
src/script_interface/shapes/initialize.cpp 100% <100%> (ø) ⬆️
src/core/shapes/Union.hpp 100% <100%> (ø)
src/core/shapes/unit_tests/Union_test.cpp 100% <100%> (ø)
src/script_interface/shapes/Union.hpp 79% <79%> (ø)
src/core/grid_based_algorithms/lb_boundaries.cpp 97% <97%> (ø) ⬆️
src/core/electrostatics_magnetostatics/p3m.cpp 85% <0%> (-1%) ⬇️
.../grid_based_algorithms/lbboundaries/LBBoundary.hpp 100% <0%> (ø) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed9cbaf...2e0260e. Read the comment docs.

Copy link
Member

@jngrad jngrad left a comment

Choose a reason for hiding this comment

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

Looks good, but it would be nice to have a minimal documentation for this feature. For example, the calculate_dist() method could use a docstring like /** Calculate the distance to the closest shape */. In the Sphinx docs, file constraints.rst, one could make section 11.2 a subsection of section 11.1 (and make 11.2.1 to 11.2.4 subsubsections of 11.2, but keep 11.2.5-11.2.6 as subsections of 11.1), and have a new section 11.3 to describe the union.

@fweik
Copy link
Contributor

fweik commented Feb 17, 2020

@jngrad this should have a formal definition of what is calculated (which is not hard), but first this has to be actually feature complete ^^

@jngrad
Copy link
Member

jngrad commented Feb 17, 2020

@fweik of course. I saw your comment when writing my review. I was a little confused at first as to what was calculated, and thought the union was a variant, until I read through the boost accumulator code ^^

@KaiSzuttor KaiSzuttor force-pushed the shape_union branch 2 times, most recently from b1c466e to 0b8eb47 Compare February 18, 2020 16:27


@script_interface_register
class ShapeUnion(Shape, ScriptObjectRegistry):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be called Union, it's clear from the context that this is about Shapes.

@KaiSzuttor KaiSzuttor force-pushed the shape_union branch 2 times, most recently from 26debdb to af2201c Compare February 18, 2020 19:20
@KaiSzuttor KaiSzuttor changed the title ShapeUnion shape Union shape Feb 18, 2020
@KaiSzuttor KaiSzuttor changed the title Union shape Shape union Feb 18, 2020
Copy link
Contributor

@fweik fweik left a comment

Choose a reason for hiding this comment

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

LGTM. The change on the bondary logic need to be applied to #2701 (Walberla).

@KaiSzuttor
Copy link
Member Author

@fweik I've simplified the LB boundary initialization a bit via boost.

@KaiSzuttor KaiSzuttor added the automerge Merge with kodiak label Feb 19, 2020
@kodiakhq kodiakhq bot merged commit 238b1e1 into espressomd:python Feb 19, 2020
@jngrad jngrad added this to the Espresso 4.2 milestone Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge with kodiak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants