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

[BeamInterpolation] Generalize parameters per edge #169

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

Conversation

EulalieCoevoet
Copy link
Collaborator

@EulalieCoevoet EulalieCoevoet commented Feb 17, 2025

We can already set a defaultYoungModulus and defaultPoissonRatio per edge.
This PR generalizes this option to all parameters:

  • radius
  • innerRadius
  • lengthY
  • lengthZ
  • massDensity (AdaptiveBeamForceFieldAndMass.inl)

Question: Should we remove the options sideLength, largeRadius and smallRadius? They are not used, since square and elliptic cross-section are not implemented.
EDIT: If you agree, we should also remove the elliptic and square options from Data<OptionsGroup> crossSectionShape.

@fredroy fredroy added the pr: status to review To notify reviewers to review this pull-request label Feb 19, 2025
@fredroy fredroy changed the title [BeamInterpolation] Generalizes parameters per egde [BeamInterpolation] Generalizes parameters per edge Feb 19, 2025
@fredroy fredroy changed the title [BeamInterpolation] Generalizes parameters per edge [BeamInterpolation] Generalize parameters per edge Feb 19, 2025
@EulalieCoevoet EulalieCoevoet marked this pull request as draft February 21, 2025 19:31
@EulalieCoevoet
Copy link
Collaborator Author

EulalieCoevoet commented Feb 21, 2025

I found a problem. I'll remove the draft status when I'm done.

EDIT - IMPORTANT: My problem was due to the usage of linkpath (in the python script) to fill the data. In that case, this PR breaks the behavior. The usage of linkpath was already broken for the data defaultYoungModulus and defaultPoissonRatio. I don't know what we could do about that.

@EulalieCoevoet EulalieCoevoet marked this pull request as ready for review February 24, 2025 10:46
@hugtalbot
Copy link
Contributor

Hey @EulalieCoevoet
we forgot to notify you last week : tests are failing on the CI

@EulalieCoevoet
Copy link
Collaborator Author

Yes sorry. I just fixed it and added more tests.

Data<helper::OptionsGroup> crossSectionShape;

/// Circular Cross Section
Data<Real> d_radius;
Data<Real> d_innerRadius;
Real m_defaultRadius;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to be lost in the report but it has been noted that it seems all the m_default* are constant (and even static) so they should be mark as constexpr (and initialized inline)

Comment on lines +206 to +211
checkDataSize(m_defaultRadius, d_radius, nbEdges);
checkDataSize(m_defaultInnerRadius, d_innerRadius, nbEdges);
checkDataSize(m_defaultLengthY, d_lengthY, nbEdges);
checkDataSize(m_defaultLengthZ, d_lengthZ, nbEdges);
checkDataSize(m_defaultYoungModulus, d_defaultYoungModulus, nbEdges);
checkDataSize(m_defaultPoissonRatio, d_poissonRatio, nbEdges);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These calls change the m_defaultvalues based on the d_values set by the user.

See line 193 :

defaultValue = values[0]; // if the sizes mismatch again at runtime, will use this default value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: status to review To notify reviewers to review this pull-request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants