-
Notifications
You must be signed in to change notification settings - Fork 23
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
base: master
Are you sure you want to change the base?
[BeamInterpolation] Generalize parameters per edge #169
Conversation
I found a problem. I'll remove the draft status when I'm done. EDIT - IMPORTANT: My problem was due to the usage of |
Hey @EulalieCoevoet |
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; |
There was a problem hiding this comment.
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)
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); |
There was a problem hiding this comment.
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
We can already set a
defaultYoungModulus
anddefaultPoissonRatio
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
andsmallRadius
? 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
.