-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add tests to Cosserat. #114
base: master
Are you sure you want to change the base?
Conversation
class Test(unittest.TestCase): | ||
def test_example_scene(self): | ||
|
||
scene = Sofa.import_sofa_python_scene("/home/dmarchal/projects/dev/sofa1/plugins/Cosserat/docs/testScene/tuto_1.py") |
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 wonder how to replace the hard coded path... a DataRepository for Cosserat ?
It looks like it is a controller... (but in that cas why exposing it to python ?) Further refactoring should be added.
They are un-needed and bloat the namespace.
It is important to always keep only the neededs includes. Having un-needed includes: - slow down compilation time - increase (non linearly) the amount of file to recompile on change - make the code appears more complex and entangled that it is actually.
Refactor STEP3
namespace cosserat::controller | ||
{ | ||
namespace { | ||
using sofa::component::topology::container::dynamic::PointSetTopologyModifier; |
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.
Need #include <sofa/component/topology/container/dynamic/PointSetTopologyModifier.h>
@@ -95,7 +95,7 @@ class DiscreteCosseratMapping : public BaseCosseratMapping<TIn1, TIn2, TOut> { | |||
|
|||
public: | |||
////////////////////////////////////////////////////////////////////// |
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.
Can't do this any more using typename Inherit1::In1VecCoord;
#include <sofa/helper/ColorMap.h> | ||
|
||
#include <boost/math/special_functions/legendre.hpp> | ||
#include <sofa/core/trait/DataTypes.h> |
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.
Is not compiling. Maybe miss something ?
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.
This is something that was merge 4 days ago: sofa-framework/sofa#4788 so maybe you need a fresher sofa version.
The tests are splitted in two set.
The c++ tests are implemented in Cosserat.Core.Tests
The python tests are implemented in Cosserat.Scene.Tests
To add extra test please do: