* Solve primal problem only.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
protected:
/**
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverBicgstab<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* Solve the linear system $Ax=b$ for x.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
/**
* Connect a slot to retrieve the CG coefficients. The slot will be called
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverCG<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* = \frac{1}{2} \mathbf x^{T} \mathbf A \mathbf x - \mathbf x^{T} \mathbf b$.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
protected:
/**
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverFIRE<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* Solve the linear system $Ax=b$ for x.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
/**
* Connect a slot to retrieve the estimated condition number. Called on each
* Solve the linear system $Ax=b$ for x.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
private:
/**
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverGMRES<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverFGMRES<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* Solve the linear system <code>Ax=b</code> for x.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
protected:
/**
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverIDR<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* Solve the linear system $Ax=b$ for x.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
/**
* @addtogroup Exceptions
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverMinRes<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* Solve the linear system $Ax=b$ for x.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
/**
* Interface for derived class. This function gets the current iteration
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverQMRS<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* residual.
*/
template <typename MatrixType, typename RelaxationType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const RelaxationType &R);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ requires(const RelaxationType &R, VectorType &a, VectorType &b) {
+ R.step(a, b);
+ }))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const RelaxationType &R);
};
//----------------------------------------------------------------------//
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename RelaxationType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ requires(const RelaxationType &R, VectorType &a, VectorType &b) {
+ R.step(a, b);
+ }))
void SolverRelaxation<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,
* Solve the linear system $Ax=b$ for x.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
/**
* Solve $A^Tx=b$ for $x$.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- Tsolve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &preconditioner);
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_transpose_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_transpose_linear_operator_on<PreconditionerType, VectorType>))
+ void Tsolve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &preconditioner);
/**
* Set the damping-coefficient. Default is 1., i.e. no damping.
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverRichardson<VectorType>::solve(
const MatrixType &A,
VectorType &x,
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_transpose_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_transpose_linear_operator_on<PreconditionerType, VectorType>))
void SolverRichardson<VectorType>::Tsolve(
const MatrixType &A,
VectorType &x,
* SolverName was specified in the constructor.
*/
template <typename MatrixType, typename PreconditionerType>
- void
- solve(const MatrixType &A,
- VectorType &x,
- const VectorType &b,
- const PreconditionerType &precond) const;
+ DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
+ void solve(const MatrixType &A,
+ VectorType &x,
+ const VectorType &b,
+ const PreconditionerType &precond) const;
/**
* Select a new solver. Note that all solver names used in this class are
template <typename VectorType>
DEAL_II_CXX20_REQUIRES(concepts::is_vector_space_vector<VectorType>)
template <typename MatrixType, typename PreconditionerType>
+DEAL_II_CXX20_REQUIRES(
+ (concepts::is_linear_operator_on<MatrixType, VectorType> &&
+ concepts::is_linear_operator_on<PreconditionerType, VectorType>))
void SolverSelector<VectorType>::solve(const MatrixType &A,
VectorType &x,
const VectorType &b,