Skip to content

Commit 24339bc

Browse files
committed
Add IntegratorEuler for double
1 parent 2682f7b commit 24339bc

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

include/sot/core/integrator-euler-impl.hh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@
5757

5858
namespace dynamicgraph {
5959
namespace sot {
60-
DECLARE_SPECIFICATION(IntegratorEulerVectorMatrix,dg::Vector,dg::Matrix)
61-
DECLARE_SPECIFICATION(IntegratorEulerVectorDouble,dg::Vector,double)
60+
DECLARE_SPECIFICATION(IntegratorEulerDoubleDouble,double,double)
61+
DECLARE_SPECIFICATION(IntegratorEulerVectorDouble,Vector,double)
62+
DECLARE_SPECIFICATION(IntegratorEulerVectorMatrix,Vector,Matrix)
6263
}
6364
}
6465

include/sot/core/integrator-euler.hh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class IntegratorEuler
5252
{
5353

5454
public:
55-
virtual const std::string& getClassName( void ) const { return dg::Entity::getClassName(); }
55+
virtual const std::string& getClassName( void ) const;
5656
static std::string getTypeName( void ) { return "Unknown"; }
5757
static const std::string CLASS_NAME;
5858

@@ -67,7 +67,7 @@ class IntegratorEuler
6767
: IntegratorAbstract<sigT,coefT>( name )
6868
, derivativeSOUT(boost::bind(&IntegratorEuler<sigT,coefT>::derivative,this,_1,_2),
6969
SOUT,
70-
"sotIntegratorAbstract("+name+")::output(vector)::derivativesout")
70+
"sotIntegratorEuler("+name+")::output(vector)::derivativesout")
7171
{
7272
this->signalRegistration( derivativeSOUT );
7373

@@ -114,7 +114,6 @@ public:
114114
// Step 1
115115
tmp1 = inputMemory[0];
116116
inputMemory[0] = SIN.access(time);
117-
sum.resize(tmp1.size());
118117
sum = num[0] * inputMemory[0];
119118
// End of step 1. Here, sum is b_0 X
120119

src/matrix/integrator-euler.t.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,15 @@ using namespace dynamicgraph;
4646
using namespace std;
4747
namespace dynamicgraph {
4848
namespace sot {
49+
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_EULER(IntegratorEuler,double,double,
50+
"IntegratorEulerDoubleDouble")
4951
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_EULER(IntegratorEuler,Vector,Matrix,
5052
"IntegratorEulerVectorMatrix")
5153
SOT_FACTORY_TEMPLATE_ENTITY_PLUGIN_EULER(IntegratorEuler,Vector,double,
5254
"IntegratorEulerVectorDouble")
55+
56+
template class IntegratorEuler<double,double>;
57+
template class IntegratorEuler<Vector,double>;
58+
template class IntegratorEuler<Vector,Matrix>;
5359
} // namespace sot
5460
} // namespace dynamicgraph

0 commit comments

Comments
 (0)