Skip to content

Conversation

@peyronq1
Copy link

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).

…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).
Copy link
Collaborator

@hugtalbot hugtalbot left a 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

Comment on lines +390 to +392
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;
Copy link
Collaborator

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:

Suggested change
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;

Comment on lines +399 to +402
/* this->computeCoAdjoint(
m_nodesExponentialSE3Vectors[index],
coAdjoint); // m_nodesExponentialSE3Vectors computed in apply
F_tot = coAdjoint * F_tot;
F_tot = coAdjoint * F_tot;*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

To remove ?

Comment on lines +517 to +525
/*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
Copy link
Collaborator

Choose a reason for hiding this comment

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

same ?

Comment on lines +532 to +537
/*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.*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

same ?

Comment on lines +607 to +613
/*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)*/

Copy link
Collaborator

Choose a reason for hiding this comment

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

same ?

Copy link
Member

@alxbilger alxbilger left a 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)
Copy link
Member

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.

@peyronq1
Copy link
Author

Nice to see you PRing @peyronq1 🔥 My 2 cents review, I let @adagolodjo look more closely

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!

@hugtalbot
Copy link
Collaborator

just a gentle ping @peyronq1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants