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

[CoSim] Extra options for ComputeNormalsOperation #13039

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Johsigen
Copy link

This PR is related to coupling the CableNetApplication with the MPMApplication.

  • add option for computing normals on Elements instead of Conditions
  • add option for selecting between unit normals / area scaled normals

@matekelemen @philbucher

@Johsigen Johsigen requested review from a team as code owners January 24, 2025 14:10
@@ -222,6 +222,14 @@ void AddGeometricalUtilitiesToPython(pybind11::module &m)
rNormalCalculationUtils.CalculateNormals<ModelPart::ConditionsContainerType,true>(rModelPart, EnforceGenericAlgorithm);})
.def("CalculateNormals", [](NormalCalculationUtils& rNormalCalculationUtils, ModelPart& rModelPart){
rNormalCalculationUtils.CalculateNormals<ModelPart::ConditionsContainerType,true>(rModelPart);})
.def("CalculateElementNormals", [](NormalCalculationUtils& rNormalCalculationUtils,
Copy link
Member

Choose a reason for hiding this comment

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

The problem is that this is genarating an inconsistency, both Condictions/Elements should be defined even if that means that two methods do exactly the same.

Copy link
Contributor

Choose a reason for hiding this comment

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

Disclaimer: this is actually my change.

The problem is that this is genarating an inconsistency, both Condictions/Elements should be defined even if that means that two methods do exactly the same.

I don't quite get it, can you elaborate a bit plz? Currently, there are no functions exposed to python that would compute normals on Elements. They exclusively operate on Conditions. Am I missing something?

Copy link
Member

Choose a reason for hiding this comment

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

CalculateConditionNormals should be defined al well, even if it is the same as CalculateNormals, for the sake of consistency IMHO

Copy link
Contributor

@matekelemen matekelemen Jan 24, 2025

Choose a reason for hiding this comment

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

Ah I see now. Fine by me, but I guess the standard CalculateNormals (computing conditions' normals) should stay as well for backward compatibility, right?

Copy link
Member

Choose a reason for hiding this comment

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

Yep

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