NEDISS: Network Diffusion and Synchronization Simulator
DifferentialEquations
GeneralDifferentialEquation.h
1
//
2
// Created by m4zz31 on 2/11/21.
3
//
4
5
#ifndef CPPPROJCT_GENERALDIFFERENTIALEQUATION_H
6
#define CPPPROJCT_GENERALDIFFERENTIALEQUATION_H
7
8
#include <functional>
9
#include <vector>
10
11
#include "../Utils/differential_equations_aux.h"
12
13
14
15
struct
FlowSpecs
{
16
std::vector<double> T1;
17
std::vector<double> T2;
18
std::vector<double> T3;
19
std::vector<double> T4;
20
int
N, j1, j2, j3, j4;
21
double
result;
22
FlowSpecs
(){};
23
FlowSpecs
(std::vector<double> T1,
24
std::vector<double> T2,
25
std::vector<double> T3,
26
std::vector<double> T4,
27
int
N): T1(std::move(T1)), T2(std::move(T2)), T3(std::move(T3)), T4(std::move(T4)), N(N){};
28
};
29
30
// The purpose of this class is to potentially support dumb-typing
31
// PDEs and SDEs and convert them through a general function "BuildForSolver" :-)
32
class
GeneralDifferentialEquation
{
33
public
:
34
int
type;
// 0 is ODE, UPGRADES: 1 is PDE, 2 could be SDE :-)
35
bool
RequiresBuilding =
false
;
// true if it requires building :-)
36
FlowSpecs
Specs;
37
GeneralDifferentialEquation
(
int
type): type(type) {};
38
39
void
UpdateFlowSpecs(std::vector<double> &T1,
40
std::vector<double> &T2,
41
std::vector<double> &T3,
42
std::vector<double> &T4,
43
int
N);
44
void
Reset();
45
void
BuildForSolver();
46
};
47
48
49
50
#endif
//CPPPROJCT_GENERALDIFFERENTIALEQUATION_H
51
GeneralDifferentialEquation
Definition:
GeneralDifferentialEquation.h:32
FlowSpecs
Definition:
GeneralDifferentialEquation.h:15
Generated by
1.9.2