-
Notifications
You must be signed in to change notification settings - Fork 311
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
[All] Code cleaning of multiple classes #1116
Conversation
@@ -496,27 +496,27 @@ void HexahedronCompositeFEMForceFieldAndMass<T>::computeMechanicalMatricesByCond | |||
|
|||
|
|||
|
|||
_weights.resize( this->_nbVirtualFinerLevels.getValue() ); | |||
int finestLevel = this->_sparseGrid->getNbVirtualFinerLevels()-this->_nbVirtualFinerLevels.getValue(); | |||
_weights.resize( this->d_nbVirtualFinerLevels.getValue() ); |
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 be picky, internal variable of a class (like _weights or _finalWeights here) are named m_* (e.g. m_weights)
Very nice work @Wall-E-76 ! Impressive ! |
by adding the SOFA_GENERAL_ENGINE_API in front of the class def
[ci-build][with-all-tests] |
TODO was to bring TriangleInfo, TriangleState, EdgeInfo, VertexInfo back in TriangularFEMForceFieldOptim.h @marques-bruno seems to have done the jobs! 👍 |
Actually @Wall-E-76 did the TODO, thanks @Wall-E-76 👍 |
@@ -107,7 +107,7 @@ void TCapsuleModel<sofa::defaulttype::StdRigidTypes<3,MyReal> >::init() | |||
_mstate = dynamic_cast< core::behavior::MechanicalState<DataTypes>* > (getContext()->getMechanicalState()); | |||
if (_mstate==NULL) | |||
{ | |||
serr<<"TCapsuleModel requires a Rigid Mechanical Model" << sendl; | |||
msg_warning()<<"TCapsuleModel requires a Rigid Mechanical Model" << msgendl; |
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 think it is a msg_error, as the component init failed and so it is not usable.
this->Inherited::init(); | ||
|
||
_topology = this->getContext()->getMeshTopology(); | ||
|
||
if (_topology->getNbTriangles()==0) | ||
{ | ||
serr << "ERROR(FastTriangularBendingSprings): object must have a Triangular Set Topology."<<sendl; | ||
msg_error() << "ERROR(FastTriangularBendingSprings): object must have a Triangular Set Topology."<<msgendl; |
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.
the Error() can be remove as well as the msgendl
protected: | ||
NonUniformHexahedronFEMForceFieldAndMass(); | ||
|
||
public: | ||
|
||
void init() override; | ||
void reinit() override { serr<<"WARNING : non-uniform mechanical properties can't be updated, changes on mechanical properties (young, poisson, density) are not taken into account."<<sendl; } | ||
void reinit() override { msg_warning()<<"WARNING : non-uniform mechanical properties can't be updated, changes on mechanical properties (young, poisson, density) are not taken into account."<<msgendl; } |
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.
double warning in msg.
template <class DataTypes> | ||
void HexahedronCompositeFEMForceFieldAndMass<DataTypes>::reinit() | ||
{ | ||
msg_warning()<<"WARNING : composite mechanical properties can't be updated, changes on mechanical properties (young, poisson, density) are not taken into account."<<msgendl; |
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.
double warning in message
sorry for late review, just added some small picky comments. |
Done, time to move on with the PR! |
Code cleaning of multiple classes, by :
One commit for one or two clean classes.
This PR:
Reviewers will merge only if all these checks are true.