forked from Conedy/Conedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsdeNode.h
47 lines (23 loc) · 1010 Bytes
/
sdeNode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef sdeNode_h
#define sdeNode_h sdeNode_h
#include <cmath>
//#include "gslNoise.h"
#include "containerNode.h"
using namespace std;
//#include "dynNode.h"
namespace conedy
{
//! --------------------------Node for Stochastic Differential Equations------------------------ //
class sdeNode : public containerNode<baseType, 4> {
public:
sdeNode ( networkElementType n, unsigned int dim) : containerNode<baseType, 4> ( n, dim ) { }
virtual void operator()(baseType x[], baseType dxdt[], baseType s[], baseType dsdx []) {throw "differential equation not defined for";};
static void dgl (baseType *x, baseType* dxdt, baseType *s, baseType *dsdx )
{
list<containerNode<baseType,4>*>::iterator it;
for ( it = nodeList.begin(); it != nodeList.end();it++ )
( * ( (sdeNode *)*it )) ( &x[ ( *it )->startPosGslOdeNodeArray], &dxdt[ ( *it )->startPosGslOdeNodeArray] , &s[ (*it)->startPosGslOdeNodeArray], &dsdx[ (*it)->startPosGslOdeNodeArray] ) ;
}
};
}
#endif