--- /dev/null
+Removed: The deprecated member function
+LAPACKFullMatrix::apply_lu_factorization() has been removed. Use
+LAPACKFullMatrix::solve() instead.
+<br>
+(Daniel Arndt, 2020/03/27)
void
solve(LAPACKFullMatrix<number> &B, const bool transposed = false) const;
- /**
- * Solve the linear system with right hand side given by applying
- * forward/backward substitution to the previously computed LU
- * factorization. Uses LAPACK function Xgetrs.
- *
- * The flag transposed indicates whether the solution of the transposed
- * system is to be performed.
- *
- * @deprecated use solve() instead.
- */
- DEAL_II_DEPRECATED
- void
- apply_lu_factorization(Vector<number> &v, const bool transposed) const;
-
- /**
- * Solve the linear system with multiple right hand sides (as many as there
- * are columns in the matrix b) given by applying forward/backward
- * substitution to the previously computed LU factorization. Uses LAPACK
- * function Xgetrs.
- *
- * The flag transposed indicates whether the solution of the transposed
- * system is to be performed.
- *
- * @deprecated use solve() instead.
- */
- DEAL_II_DEPRECATED
- void
- apply_lu_factorization(LAPACKFullMatrix<number> &B,
- const bool transposed) const;
-
/**
* Compute eigenvalues of the matrix. After this routine has been called,
* eigenvalues can be retrieved using the eigenvalue() function. The matrix
-template <typename number>
-void
-LAPACKFullMatrix<number>::apply_lu_factorization(Vector<number> &v,
- const bool transposed) const
-{
- solve(v, transposed);
-}
-
-
-
-template <typename number>
-void
-LAPACKFullMatrix<number>::apply_lu_factorization(LAPACKFullMatrix<number> &B,
- const bool transposed) const
-{
- solve(B, transposed);
-}
-
-
-
template <typename number>
number
LAPACKFullMatrix<number>::determinant() const
const Vector<number> &src) const
{
dst = src;
- matrix->apply_lu_factorization(dst, false);
+ matrix->solve(dst, false);
}
const Vector<number> &src) const
{
dst = src;
- matrix->apply_lu_factorization(dst, true);
+ matrix->solve(dst, true);
}
Assert(mem != nullptr, ExcNotInitialized());
Vector<number> *aux = mem->alloc();
*aux = src;
- matrix->apply_lu_factorization(*aux, false);
+ matrix->solve(*aux, false);
dst = *aux;
}
Assert(mem != nullptr, ExcNotInitialized());
Vector<number> *aux = mem->alloc();
*aux = src;
- matrix->apply_lu_factorization(*aux, true);
+ matrix->solve(*aux, true);
dst = *aux;
}
// LAPACKFullMatrix::compute_lu_factorization
-// LAPACKFullMatrix::apply_lu_factorization
+// LAPACKFullMatrix::solve
#include <deal.II/lac/lapack_full_matrix.h>
#include <deal.II/lac/vector.h>
M.vmult(v, u);
M.Tvmult(y, x);
M.compute_lu_factorization();
- M.apply_lu_factorization(v, false);
- M.apply_lu_factorization(y, true);
+ M.solve(v, false);
+ M.solve(y, true);
v -= u;
y -= x;
// ---------------------------------------------------------------------
-// Tests LAPACKFullMatrix::apply_lu_factorization in two different variants
+// Tests LAPACKFullMatrix::solve in two different variants
#include <deal.II/lac/lapack_full_matrix.h>
#include <deal.II/lac/vector.h>
for (unsigned int transpose = 0; transpose < 2; ++transpose)
{
LAPACKFullMatrix<double> rhs(rhs_orig);
- A.apply_lu_factorization(rhs, transpose);
+ A.solve(rhs, transpose);
for (unsigned int i = 0; i < 3; ++i)
{
Vector<double> check(n);
for (unsigned int j = 0; j < n; ++j)
check(j) = rhs_orig(j, i);
- A.apply_lu_factorization(check, transpose);
+ A.solve(check, transpose);
for (unsigned int j = 0; j < n; ++j)
Assert(std::abs(check(j) - rhs(j, i)) < 1e-13, ExcInternalError());
}
v = 1.0;
v(n - 1) = 0.0;
// LU factorization can only be applied if state == lu!
- A.apply_lu_factorization(v, false);
+ A.solve(v, false);
deallog << "apply lu factorization succeeded with norm " << v.l2_norm()
<< std::endl;