MyraMath
mixed_refine.h
Go to the documentation of this file.
1 // ========================================================================= //
2 // This file is part of MyraMath, copyright (c) 2014-2019 by Ryan A Chilton //
3 // and distributed by MyraCore, LLC. See LICENSE.txt for license terms. //
4 // ========================================================================= //
5 
6 #ifndef MYRAMATH_ITERATIVE_MIXED_REFINE_H
7 #define MYRAMATH_ITERATIVE_MIXED_REFINE_H
8 
15 #include <myramath/MYRAMATH_EXPORT.h>
16 
17 #include <vector>
18 
19 namespace myra {
20 
21 // Forward declarations.
22 template<class Number> class Action;
23 template<class Number> class MatrixRange;
24 template<class Number> class VectorRange;
25 
27 // Overwrites B with X. Returns residual history in relative frobenius norm, |A*X-B|/|B|.
28 // Can specify desired tolerance and maximum allowed iterations, both are defaulted.
29 MYRAMATH_EXPORT std::vector<double> mixed_refine(const Action<NumberD>& A, const Action<NumberS>& M, const MatrixRange<NumberD>& B, double tolerance = 1.0e-12, int iterations = 20);
30 MYRAMATH_EXPORT std::vector<double> mixed_refine(const Action<NumberZ>& A, const Action<NumberC>& M, const MatrixRange<NumberZ>& B, double tolerance = 1.0e-12, int iterations = 20);
31 
33 // Overwrites b with x. Returns residual history in relative frobenius norm, |A*x-b|/|b|.
34 // Can specify desired tolerance and maximum allowed iterations, both are defaulted.
35 MYRAMATH_EXPORT std::vector<double> mixed_refine(const Action<NumberD>& A, const Action<NumberS>& M, const VectorRange<NumberD>& b, double tolerance = 1.0e-12, int iterations = 20);
36 MYRAMATH_EXPORT std::vector<double> mixed_refine(const Action<NumberZ>& A, const Action<NumberC>& M, const VectorRange<NumberZ>& b, double tolerance = 1.0e-12, int iterations = 20);
37 
38 } // namespace myra
39 
40 #endif
Definition: syntax.dox:1
Various utility functions/classes related to scalar Number types.