47template <base::concepts::real_scalar_dense_vector Vector>
78 template <base::concepts::invocable<const vector_type&, vector_type&>
90 "No iteration needed. residual_norm={}", residual_norm);
95 coeff_function(
p_,
ap_);
97 if (abs(as_dot) < std::numeric_limits<scalar_type>::min()) {
99 this->
logger(),
"No further iteration can be done.");
108 if (abs(as_norm2) < std::numeric_limits<scalar_type>::min()) {
121 "Finished iterations: iterations={}, residual_norm={}",
164 template <base::concepts::invocable<const vector_type&, vector_type&>
Class of tags of logs without memory management.
Class to incorporate logging in algorithms.
logging_mixin(log_tag_view tag)
Constructor.
auto logger() const noexcept -> const num_collect::logging::logger &
Access to the logger.
Class of error tolerances hairer1993.
Class to solve linear equations using BiCGstab golub2013.
auto tolerances(const error_tolerances< vector_type > &val) -> bicgstab &
Set the error tolerances.
Eigen::MatrixX< scalar_type > matrix_type
Type of matrices.
index_type max_iterations_
Maximum number of iterations.
void initialize(CoeffFunction &&coeff_function, const vector_type &rhs, const vector_type &solution)
Initialize.
static constexpr index_type default_max_iterations
Default maximum number of iterations.
typename vector_type::Scalar scalar_type
Type of scalars.
void solve(CoeffFunction &&coeff_function, const vector_type &rhs, vector_type &solution)
Solve.
index_type iterations_
Number of iterations.
vector_type residual_
Residual.
error_tolerances< vector_type > tolerances_
Tolerances.
static constexpr auto default_tolerance_rate
Default rate of tolerance in this solver.
auto iterations() -> index_type
Get the number of iterations.
Vector vector_type
Type of vectors.
scalar_type tolerance_rate_
Rate of tolerance in this solver.
Definition of error_tolerances class.
Definition of index_type type.
Definition of invocable concept.
Definition of log_tag_view class.
Definition of macros for logging.
#define NUM_COLLECT_LOG_WARNING(LOGGER,...)
Write a warning log.
#define NUM_COLLECT_LOG_DEBUG(LOGGER,...)
Write a debug log.
Definition of logging_mixin class.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of internal implementations.
constexpr auto bicgstab_tag
Log tag.
Definition of real_scalar_dense_vector concept.