C++ library for solving large sparse linear systems with algebraic multigrid method
Minor fixes
relaxation::as_block
, and coarsening::as_scalar
. See the "Using near null-space components" tutorial for more details.backend::reinterpret_as_rhs()
helper function for easy reinterpretation of scalar vectors as block-valued.prm.solver.ns_search=true
ignores trivial solution for zero RHS.
Useful in search of the null-space vectors of the systemamgcl::mpi::amg
preconditioner is implemented! This works much better than subdomain deflation which is now considered deprecated. See examples/mpi/mpi_amg.cpp
and some benchmarks in https://doi.org/10.1134/S1995080219050056 (https://arxiv.org/abs/1811.05704).typedef amgcl::make_solver<
amgcl::runtime::amg<Backend>,
amgcl::runtime::iterative_solver<Backend>
> Solver;
one should now
typedef amgcl::make_solver<
amgcl::amg<
Backend,
amgcl::runtime::coarsening::wrapper,
amgcl::runtime::relaxation::wrapper
>,
amgcl::runtime::solver::wrapper<Backend>
> Solver;
This allows to reuse the same amgcl::amg
implementation both for compile-time and runtime interfaces and greatly reduces compilation time and memory requirements for the library.boost::property_tree::ptree
for defining runtime parameters.
It should be possible to use the compile-time interface completely Boost-free. This also means that one should replace all uses of boost::tie
and boost::make_tuple
in amgcl-related code with std::tie
and std::make_tuple
. For example:
Solver solve(std::tie(n, ptr, col, val));
std::tie(iters, error) = solve(f, x);
amgcl::backend::bytes()
function that returns (sometimes approximately) the amount of memory allocated for an amgcl object. std::string amgcl::backend::human_readable_memory(size_t)
converts bytes to a human-readable size string (e.g. 1024 is converted to 1 K
).epetra_map
was moved to the adapter
namespace.amgcl::make_scaling_solver
has been replaced with amgcl::scaled_problem
adapter.amgcl::mpi::amg
preconditioner is implemented! This works much better than subdomain deflation which is now considered deprecated. See examples/mpi/mpi_amg.cpp
and some benchmarks in https://doi.org/10.1134/S1995080219050056 (https://arxiv.org/abs/1811.05704).typedef amgcl::make_solver<
amgcl::runtime::amg<Backend>,
amgcl::runtime::iterative_solver<Backend>
> Solver;
one should now
typedef amgcl::make_solver<
amgcl::amg<
Backend,
amgcl::runtime::coarsening::wrapper,
amgcl::runtime::relaxation::wrapper
>,
amgcl::runtime::solver::wrapper<Backend>
> Solver;
This allows to reuse the same amgcl::amg
implementation both for compile-time and runtime interfaces, and greately reduces compilation time and memory requirements for the library.boost::property_tree::ptree
for defining runtime parameters.
It should be possible to use the compile-time interface completely Boost-free. This also means that one should replace all uses of boost::tie
and boost::make_tuple
in amgcl-related code with std::tie
and std::make_tuple
. For example:
Solver solve(std::tie(n, ptr, col, val));
std::tie(iters, error) = solve(f, x);
amgcl::backend::bytes()
function that returns (sometimes approximately) the amount of memory allocated for an amgcl object. std::string amgcl::backend::human_readable_memory(size_t)
converts bytes to a human-readable size string (e.g. 1024 is converted to 1 K
).epetra_map
was moved to adapter
namespace.amgcl::make_scaling_solver
has been replaced with amgcl::scaled_problem
adapter.This is marked as pre-release, because the documentation still needs to be updated.
smoothed_aggregation.aggr.eps_strong
from 0 to 0.08. This should work better for anisotropic cases.mpi::subdomain_deflation
.[1] Fokkema, Diederik R. Enhanced implementation of BiCGstab (l) for solving linear systems of equations. Universiteit Utrecht. Mathematisch Instituut, 1996.
adapter::reorder
for matrices and vectors. Allows to
transparently apply Cuthill-McKee reordering to the system matrix and
RHS before solution.Kuu
matrix with its inverted
diagonal.smoothed_aggregation
.
This improves convergence rate at the cost of setup time.
The total time is usually improved, but may suffer on GPGPU backends.mpi::subdomain_deflation
preconditioner.mpi::subdomain_deflation
.amgcl::put(ptree p, string s)
where s
has key=value
format.
This makes parsing of command line parameters easier.ilu0
, iluk
, ilut
), and got rid of now obsolete parallel_ilu0
smoother. Parallel algorithm is based on level scheduling approach and is automatically selected when there are four or more OpenMP threads.gauss_seidel
, and got rid of obsolete multicolor_gauss_seidel
smoother. Parallel algorithm is based on level scheduling approach and is automatically selected when there are four or more OpenMP threads.Mostly a bug fix release.
amgcl::amg
constructor starts the setup process in a new thread. As soon
as constructor returns, the instance is ready to be used as a
preconditioner. Initially its just a single-level smoother, but when as
the new (coarser) levels are constructed, they are put to use.
In case of GPGPU backends, this should allow to overlap work between
host CPU doing setup and the compute device doing the solution. In some
cases a 2x speedup of the overall solution has been achieved.amgcl::amgcl
imported target, so that users may just
find_package(amgcl)
add_executable(myprogram myprogram.cpp)
target_link_libraries(myprogram amgcl::amgcl)
to build a program using amgcl. The imported target brings necessary
compile and link options automatically.