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

Core implementation of MultiPatch #161

Merged
merged 89 commits into from
Jun 19, 2023
Merged

Core implementation of MultiPatch #161

merged 89 commits into from
Jun 19, 2023

Conversation

j042
Copy link
Member

@j042 j042 commented Jun 12, 2023

Overview

Implements multipatch core PyMultiPatch. Functions that require looping over a large array is now implemented in cpp. if applicable, also with multi-threading capabilities.

Addressed issues

  • Slow multipatch operations

Checklists

  • Documentations are up-to-date.
  • Added example(s)
  • Added test(s)

@j042 j042 mentioned this pull request Jun 12, 2023
3 tasks
@j042 j042 changed the title Core implementation of MultiPatch WIP Core implementation of MultiPatch Jun 12, 2023
@j042 j042 requested a review from jzwar June 12, 2023 13:52
}

// form mismatch info
std::string mismatch_info{};
Copy link
Member Author

Choose a reason for hiding this comment

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

stringstream?

tests/common.py Outdated Show resolved Hide resolved
@jzwar
Copy link
Collaborator

jzwar commented Jun 15, 2023

I am currently checking my scripts with the objective to compare the newly created files to existing ones. So far I still run into some issues, but I think it's because you slightly changed the syntax. I hope to get this sorted out by the end of the day

splinepy/multipatch.py Outdated Show resolved Hide resolved
@jzwar
Copy link
Collaborator

jzwar commented Jun 15, 2023

Happy to announce that it passed the test - except for the two comments I made earlier. I get the same results with both implementations. Hopefully, this proves the validity.
I will now look at the code in more detail

@j042
Copy link
Member Author

j042 commented Jun 15, 2023

Happy to announce that it passed the test - except for the two comments I made earlier. I get the same results with both implementations. Hopefully, this proves the validity.
I will now look at the code in more detail

great!

Co-authored-by: jzwar <63095162+jzwar@users.noreply.github.com>
Copy link
Collaborator

@jzwar jzwar left a comment

Choose a reason for hiding this comment

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

There are still 6 files on my to read list but it looks really good so far. Please check out the remarks till here and if I take too long send me a text and I will approve. This PR should not be yolo-ed!

CMakeLists.txt Outdated Show resolved Hide resolved
cpp/splinepy/py/py_multi_patch.hpp Show resolved Hide resolved
cpp/splinepy/py/py_multi_patch.hpp Show resolved Hide resolved
cpp/splinepy/py/py_multi_patch.hpp Outdated Show resolved Hide resolved
cpp/splinepy/py/py_multi_patch.hpp Show resolved Hide resolved
cpp/splinepy/py/py_multi_patch.hpp Show resolved Hide resolved
cpp/splinepy/py/py_multi_patch.hpp Show resolved Hide resolved
cpp/splinepy/py/splinepy_core.cpp Show resolved Hide resolved
cpp/splinepy/splines/helpers/properties.hpp Outdated Show resolved Hide resolved
cpp/splinepy/splines/nurbs.hpp Show resolved Hide resolved
@j042 j042 requested a review from jzwar June 19, 2023 12:42
splines=None,
interfaces=None,
):
def __init__(self, splines=None, interfaces=None, *, spline=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the-* used for?

Copy link
Member Author

Choose a reason for hiding this comment

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

makes sure spline is only set as keyword. say, Multipatch(splines, interfaces, garbage) will raise TypeError regarding number of positional argument

)

# Transform bezier types, as they are not supported in gismo
if spline.name.startswith("Bezier"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here is really where current gustaf functions would shine

Copy link
Member Author

Choose a reason for hiding this comment

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

you could use BSpline(splinepy.splinepy_core.same_spline_with_knot_vectors())

Copy link
Collaborator

@jzwar jzwar left a comment

Choose a reason for hiding this comment

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

Thank you for putting in so much effort. I hope this helps establish the use of the multipatch class for other users as well, and provides a sufficient core implementation for gustaf as well.
Please bump version.

@j042
Copy link
Member Author

j042 commented Jun 19, 2023

Thank you for putting in so much effort. I hope this helps establish the use of the multipatch class for other users as well, and provides a sufficient core implementation for gustaf as well.
Please bump version.

Thanks for taking time to review! Next PRs with extended scopes are on their way

@j042 j042 merged commit 6b81d28 into main Jun 19, 2023
24 checks passed
@j042 j042 deleted the ft-cpp-mp branch June 19, 2023 13:39
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.

None yet

2 participants