Commit b606c5a7 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

update to newer mtl4 version

parent 1fa45cd6
......@@ -82,7 +82,7 @@ namespace AMDiS
/// A Multiplication operator returns a multiplication-expresssion.
/// Calls \ref mult internally.
template <class VectorIn>
mtl::vector::mat_cvec_multiplier<Self, VectorIn>
mtl::vec::mat_cvec_multiplier<Self, VectorIn>
operator*(VectorIn const& v) const
{
return {*this, v};
......
......@@ -39,7 +39,7 @@ namespace AMDiS
using field_type = typename BaseMatrix::value_type;
/// The type of the inserter used when filling the matrix. NOTE: need not be public
using Inserter = mtl::matrix::inserter<BaseMatrix, mtl::operations::update_plus<value_type>>;
using Inserter = mtl::mat::inserter<BaseMatrix, mtl::operations::update_plus<value_type>>;
public:
/// Constructor. Constructs new BaseMatrix.
......@@ -148,9 +148,9 @@ namespace AMDiS
void clearDirichletRows(std::vector<char> const& dirichletNodes, bool apply)
{
// Define the property maps
auto row = mtl::matrix::row_map(*matrix);
auto col = mtl::matrix::col_map(*matrix);
auto value = mtl::matrix::value_map(*matrix);
auto row = mtl::mat::row_map(*matrix);
auto col = mtl::mat::col_map(*matrix);
auto value = mtl::mat::value_map(*matrix);
// iterate over the matrix
for (auto r : mtl::major_of(*matrix)) { // rows or columns
......
......@@ -29,7 +29,7 @@ namespace itl
A.getRowRanges(r_rows);
for (size_t i = 0; i < _N; i++)
inv_diag[r_rows[i]] = mtl::matrix::diagonal(A[i][i]);
inv_diag[r_rows[i]] = mtl::mat::diagonal(A[i][i]);
for (size_type i = 0; i < num_rows(A); ++i)
inv_diag[i]= reciprocal(inv_diag[i]);
......@@ -73,7 +73,7 @@ namespace itl
}
protected:
mtl::vector::dense_vector<value_type> inv_diag;
mtl::vec::dense_vector<value_type> inv_diag;
};
......
......@@ -61,11 +61,11 @@ namespace itl
Scalar rho, bnrm2, temp, hr;
Size k, kmax(std::min(size(x), Size(iter.max_iterations() - iter.iterations())));
Vector w(resource(x)), r(b - A*x);
mtl::matrix::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::matrix::multi_vector<Vector> Z(Vector(resource(x), zero), kmax+1);
mtl::matrix::dense2D<Scalar> H(kmax+1, kmax);
mtl::mat::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::mat::multi_vector<Vector> Z(Vector(resource(x), zero), kmax+1);
mtl::mat::dense2D<Scalar> H(kmax+1, kmax);
mtl::vector::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
mtl::vec::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
bnrm2 = two_norm(b);
if (bnrm2 == zero)
......
......@@ -52,7 +52,7 @@ namespace itl
using mtl::iall;
using mtl::imax;
using mtl::signum;
using mtl::vector::dot;
using mtl::vec::dot;
using mtl::conj;
typedef typename mtl::Collection<Vector>::value_type Scalar;
typedef typename mtl::Collection<Vector>::size_type Size;
......@@ -63,10 +63,10 @@ namespace itl
Scalar rho, bnrm2, temp, alpha, beta;
Size k, kmax(std::min(size(x), Size(iter.max_iterations() - iter.iterations())));
Vector w(solve(R, b)), r(b - A*x);
mtl::matrix::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::matrix::multi_vector<Vector> Z(Vector(resource(x), zero), kmax+1);
mtl::vector::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
mtl::matrix::dense2D<Scalar> H(kmax, kmax);
mtl::mat::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::mat::multi_vector<Vector> Z(Vector(resource(x), zero), kmax+1);
mtl::vec::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
mtl::mat::dense2D<Scalar> H(kmax, kmax);
bnrm2 = two_norm(b);
if (bnrm2 == zero)
......
......@@ -45,8 +45,8 @@ namespace itl
Vector r(b - A * x);
Vector uk(size(x), zero), ck(size(x), zero);
mtl::matrix::multi_vector<Vector> C(Vector(resource(x), zero), kmax);
mtl::matrix::multi_vector<Vector> U(Vector(resource(x), zero), kmax);
mtl::mat::multi_vector<Vector> C(Vector(resource(x), zero), kmax);
mtl::mat::multi_vector<Vector> U(Vector(resource(x), zero), kmax);
Scalar res(two_norm(r));
Scalar alpha(zero), beta(zero), gamma(zero);
......
......@@ -59,9 +59,9 @@ namespace itl
Scalar rho, hr, bnrm2, temp;
Size k, kmax(std::min(size(x), Size(iter.max_iterations() - iter.iterations())));
Vector w(b - A *x), r(solve(L,w));
mtl::matrix::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::vector::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
mtl::matrix::dense2D<Scalar> H(kmax+1, kmax);
mtl::mat::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::vec::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
mtl::mat::dense2D<Scalar> H(kmax+1, kmax);
bnrm2 = two_norm(b);
if (bnrm2 == zero)
......
......@@ -52,7 +52,7 @@ namespace itl
using mtl::iall;
using mtl::imax;
using mtl::signum;
using mtl::vector::dot;
using mtl::vec::dot;
using mtl::conj;
typedef typename mtl::Collection<Vector>::value_type Scalar;
typedef typename mtl::Collection<Vector>::size_type Size;
......@@ -63,9 +63,9 @@ namespace itl
Scalar rho, bnrm2, temp, beta;
Size k, kmax(std::min(size(x), Size(iter.max_iterations() - iter.iterations())));
Vector w(b - A *x), r(solve(L,w));
mtl::matrix::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::vector::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
mtl::matrix::dense2D<Scalar> H(kmax, kmax);
mtl::mat::multi_vector<Vector> V(Vector(resource(x), zero), kmax+1);
mtl::vec::dense_vector<Scalar> sn(kmax, zero), cs(kmax, zero), s(kmax+1, zero), y(kmax, zero); // replicated in distributed solvers
mtl::mat::dense2D<Scalar> H(kmax, kmax);
bnrm2 = two_norm(b);
if (bnrm2 < dbl_tol)
......
......@@ -108,7 +108,7 @@ namespace itl
}
protected:
mtl::vector::dense_vector<value_type> inv_diag;
mtl::vec::dense_vector<value_type> inv_diag;
};
/// Solve approximately a sparse system in terms of inverse lumped diagonal
......
......@@ -36,7 +36,7 @@ extern "C" {
namespace mtl
{
namespace matrix
namespace mat
{
/// Namespace for Umfpack solver
......@@ -630,7 +630,7 @@ namespace mtl
}
}
} // namespace mtl::matrix
} // namespace mtl::mat
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment