-
Notifications
You must be signed in to change notification settings - Fork 27
Rewrite the force transfer of applyJT functions in the DiscreteCosserat mapping #159
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
base: master
Are you sure you want to change the base?
Conversation
…pressed in the global frame. Small change required in the computation of the tangentExp in the case of bending and twist only (the base linear def along X should be 1).
hugtalbot
left a comment
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.
Nice to see you PRing @peyronq1 🔥
My 2 cents review, I let @adagolodjo look more closely
| std::cout<<"Global F = " << global_F_Vec[s] <<" at s = " << s <<std::endl; | ||
| std::cout<<"temp = " << temp <<" at s = " << s <<std::endl; | ||
| std::cout<<"f = " << f <<" at s = " << s <<std::endl; |
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.
Possibly to remove or using msg API:
| std::cout<<"Global F = " << global_F_Vec[s] <<" at s = " << s <<std::endl; | |
| std::cout<<"temp = " << temp <<" at s = " << s <<std::endl; | |
| std::cout<<"f = " << f <<" at s = " << s <<std::endl; | |
| std::cout<<"Global F = " << global_F_Vec[s] <<" at s = " << s <<std::endl; | |
| std::cout<<"temp = " << temp <<" at s = " << s <<std::endl; | |
| std::cout<<"f = " << f <<" at s = " << s <<std::endl; |
| /* this->computeCoAdjoint( | ||
| m_nodesExponentialSE3Vectors[index], | ||
| coAdjoint); // m_nodesExponentialSE3Vectors computed in apply | ||
| F_tot = coAdjoint * F_tot; | ||
| F_tot = coAdjoint * F_tot;*/ |
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.
To remove ?
| /*const auto _T = Frame(frame[childIndex].getCenter(), | ||
| frame[childIndex].getOrientation()); | ||
| Mat6x6 P_trans = (this->buildProjector(_T)); | ||
| P_trans.transpose(); | ||
|
|
||
| Mat6x6 co_adjoint; | ||
| this->computeCoAdjoint( | ||
| m_framesExponentialSE3Vectors[childIndex], | ||
| co_adjoint); // m_framesExponentialSE3Vectors[s] computed in apply | ||
| co_adjoint);*/ // m_framesExponentialSE3Vectors[s] computed in apply |
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.
same ?
| /*Vec6 local_F = | ||
| co_adjoint * P_trans * | ||
| valueConst; // constraint direction in local frame of the beam. | ||
| valueConst;*/ // constraint direction in local frame of the beam. | ||
|
|
||
| /*Vec3 f = matB_trans * temp * | ||
| local_F; // constraint direction in the strain space.*/ |
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.
same ?
| /*Mat6x6 coAdjoint; | ||
| this->computeCoAdjoint( | ||
| m_nodesExponentialSE3Vectors[i - 1], | ||
| coAdjoint); // m_nodesExponentialSE3Vectors computed in apply | ||
| CumulativeF = coAdjoint * CumulativeF; | ||
| // transfer to strain space (local coordinates) | ||
| // transfer to strain space (local coordinates)*/ | ||
|
|
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.
same ?
alxbilger
left a comment
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.
I recommend to clean your code:
- Remove commented code
- Remove the traces (
cout)
| } | ||
|
|
||
| template <class TIn1, class TIn2, class TOut> | ||
| auto DiscreteCosseratMapping<TIn1, TIn2, TOut>::getTildeMatrix(const Vec3 &u) |
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.
Check if it is the same function than sofa::type::Mat::crossProductMatrix. If it is, you can remove this function and use crossProductMatrix instead.
Thank you! But don't congratulate me yet haha. We are working on improvements with Younes but I am not sure he expected me to do a PR on the master branch. I will look at this with him. Thank you for the review! |
|
just a gentle ping @peyronq1 |
Rewrite the force transfer of applyJT functions considering forces expressed in the global frame. Small change required in the computation of the tangentExp in the case of bending and twist only (the base linear def along X should be 1).