-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolvers.h
37 lines (27 loc) · 1.07 KB
/
Solvers.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
#ifndef _DEF_SOLVERS_H_DEFINED
#define _DEF_SOLVERS_H_DEFINED
#include <string>
#pragma once
class Plotter;
class MatUtils;
class Solvers
{
public:
Solvers();
~Solvers();
int SolveEigenPower(int N, double* M, int maxiter, int sleeptime, int reportintv);
int JacobiSolv(double *A, double *U, double *B, int N, int maxiter, int sleeptime, int reportintv);
int ConjugateGradSolv(double *A, double *U, double *B, int nn, int maxiter, int sleeptime, int reportintv);
void GauseSolve(double *A, double *B, double *X, int N);
int LaPlace(int n, double* boundry, int maxiterations, int sleeptime);
void setErrorFlag(int val) {outputError = val; }
private:
void ReportProgres(int k, int rfreq, double* u, int n, double error);
int MaxIteration;
void Decomp(double *A, double *B, int N);
int Pivot(double *A, double *B, int k, int N);
void Backsub(double *A, double *B, double* X, int nn);
MatUtils* pMatutils;
int outputError; // 0 - none, 1, solver convergence criteria, 2 also difference from baseline
};
#endif