12 #ifndef __UT_MatrixSolver_H__
13 #define __UT_MatrixSolver_H__
25 #define USE_OLD_LUDECOMP 0
54 return LUDecompOld(a, index, d, tol);
61 return LUBackSubOld(a, index, b);
67 return LUDecompRect(a, index, d, tol);
73 return LUDecompBackSub(a, index, b);
103 template <
typename S>
133 template <
typename S>
162 template <
typename S>
173 template <
typename S>
201 template <
typename S>
209 T starttol = 1e-2,
int startiter = 5,
211 T doubletol = 1e-4,
int finaliter = 50);
246 T &retdet,
T &detu,
T &detv);
259 return (
A(p,q) * (
B(r,s) * C(t,u) -
B(t,u) * C(r,s)) -
260 B(p,q) * (
A(r,s) * C(t,u) -
A(t,u) * C(r,s)) +
261 C(p,q) * (
A(r,s) *
B(t,u) -
A(t,u) *
B(r,s)) );
265 template <
typename S>
275 template <
typename S>
277 template <
typename S>
281 void findGivens(
T a,
T b,
T &
c,
T &
s,
301 int maxIteration = 30);
317 int maxIteration = 30);
323 int maxIteration = 30);
333 template <
typename S>
335 int maxIterstion = 30);
338 template <
typename S>
343 template <
typename S>
347 template <
typename S>
355 template <
typename S>
357 int udeg,
int vdeg,
int tdeg,
T &u,
T &
v);
361 template <
typename S>
394 template <
typename S>
411 template <
typename S>
419 T tol = 1e-5,
int maxiter = 50);
435 template <
typename S>
444 T tol = 1e-5,
int maxiter = 50);
456 template <
typename T>
480 void setMultVec(
const MatrixOp &op);
488 void setTransposeMultVec(
const MatrixOp &op);
495 void setPreconditioner(
const MatrixOp &op);
499 void setPreconditioner(
const UT_VectorT<T> &invertedDiagonal);
507 bool LhasUnitDiagonal =
false,
bool UhasUnitDiagonal =
false);
511 void setTransposePreconditioner(
const MatrixOp &op);
512 void setTransposePreconditioner(
const UT_VectorT<T> &invertedDiagonal);
553 exint myMaxIterations;
560 MatrixOp myTransposePreconditionerOp;
582 T tol=1e-3,
int normType=2,
int maxIter=-1);
609 T tol=1e-3,
int normType=2,
int maxIter=-1);
634 template <
typename AMult,
typename AtASolve>
635 T PCGLS(
const AMult &amult,
const AtASolve &atasolve,
637 fpreal tol = -1.0,
int norm_type = 2,
int max_iter = -1);
657 T tol=1e-3,
int normType=2,
int maxIter=-1);
UT_MatrixSolverT< fpreal > UT_MatrixSolverR
void LUBackSub(const UT_MatrixT< T > &a, const UT_Permutation &index, UT_VectorT< S > &b)
GLboolean GLboolean GLboolean GLboolean a
UT_MatrixIterSolverT< fpreal64 > UT_MatrixIterSolverD
UT_Functor2< void, const UT_VectorT< T > &, UT_VectorT< T > & > MatrixOp
**But if you need a result
GLdouble GLdouble GLdouble q
UT_SparseMatrixCSRT< T > SparseMatrixType
UT_MatrixSolverT< fpreal32 > UT_MatrixSolverF
GLsizei GLboolean transpose
UT_Functor2< bool, exint, T > StopConditionOp
UT_MatrixSolverT< fpreal64 > UT_MatrixSolverD
typename UT_TypePromoteT< T >::PreciseType UT_PreciseT
STATIC_INLINE uint64_t H(uint64_t x, uint64_t y, uint64_t mul, int r)
UT_MatrixIterSolverT< fpreal > UT_MatrixIterSolverR
GLboolean GLboolean GLboolean b
UT_MatrixIterSolverT< fpreal64 > UT_MatrixIterSolver
int LUDecomp(UT_MatrixT< T > &a, UT_Permutation &index, T &d, T tol=1e-20)
UT_MatrixIterSolverT< fpreal32 > UT_MatrixIterSolverF
T det3x3(const UT_MatrixT< T > &A, const UT_MatrixT< T > &B, const UT_MatrixT< T > &C, int p, int q, int r, int s, int t, int u)
UT_Functor2< UT_PreciseT< T >, const UT_VectorT< T > &, UT_VectorT< T > & > MatrixDotOp
GLubyte GLubyte GLubyte GLubyte w
UT_MatrixSolverT< fpreal64 > UT_MatrixSolver