Hopsan
|
Public Types | |
typedef double(NumericalIntegrationSolver::*) | callback_function(int) |
Public Member Functions | |
NumericalIntegrationSolver (Component *pParentComponent, std::vector< double > *pStateVars, double tolerance=1e-6, size_t maxIter=1000) | |
Constructor for solver utility using numerical integration methods. | |
void | solve (int solver) |
Solves a system using numerical integration. | |
void | solveForwardEuler () |
Solves a system using forward Euler method. | |
void | solveMidpointMethod () |
Solves a system using midpoint method. | |
void | solveBackwardEuler () |
Solves a system using implicit Euler. | |
void | solveTrapezoidRule () |
Solves a system using trapezoid rule of integration. | |
void | solveRungeKutta () |
Solves a system using Runge-Kutta (RK4) | |
void | solveDormandPrince () |
Solves a system using Dormand-Prince. | |
void | solvevariableTimeStep () |
Solves a system using trapezoid rule with variable step size (experimental, do not use) | |
double | findRoot (int i) |
Static Public Member Functions | |
static const std::vector< HString > | getAvailableSolverTypes () |
Returns a list of available integration methods. | |
NumericalIntegrationSolver | ( | Component * | pParentComponent, |
std::vector< double > * | pStateVars, | ||
double | tolerance = 1e-6, | ||
size_t | maxIter = 1000 ) |
Constructor for solver utility using numerical integration methods.
pParentComponent | Pointer to parent component |
pStateVars | Pointer to vector with state variables |
tolerance | Tolerance (for Newton-Rhapson with implicit methods) |
maxIter | Maximum number of iterations with Newton-Rhapson |
void solve | ( | int | solver | ) |
Solves a system using numerical integration.
solverType | Integration method to use |