C++ library for solving large sparse linear systems with algebraic multigrid method
MIT License
Minor fixes
Published by ddemidov over 2 years ago
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.Published by ddemidov over 3 years ago
prm.solver.ns_search=true
ignores trivial solution for zero RHS.Published by ddemidov almost 4 years ago
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 greatly reduces compilation time and memory requirements for the library.boost::property_tree::ptree
for defining runtime parameters.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.Published by ddemidov almost 5 years ago
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.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.
Published by ddemidov over 6 years ago
smoothed_aggregation.aggr.eps_strong
mpi::subdomain_deflation
.[1] Fokkema, Diederik R. Enhanced implementation of BiCGstab (l) for
solving linear systems of equations. Universiteit Utrecht.
Mathematisch Instituut, 1996.
Published by ddemidov about 7 years ago
adapter::reorder
for matrices and vectors. Allows toKuu
matrix with its invertedsmoothed_aggregation
.mpi::subdomain_deflation
mpi::subdomain_deflation
.amgcl::put(ptree p, string s)
where s
has key=value
format.Published by ddemidov over 7 years ago
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.Published by ddemidov over 7 years ago
Mostly a bug fix release.
Published by ddemidov over 7 years ago
amgcl::amg
constructor starts the setup process in a new thread. As soonamgcl::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 necessaryPublished by ddemidov about 8 years ago
Published by ddemidov over 8 years ago
amgcl/amgcl.hpp
-> amgcl/amg.hpp
mpi::make_solver
.Published by ddemidov almost 9 years ago
boost::property_tree
). So the following code:boost::property_tree::ptree prm;
typedef amgcl::runtime::make_solver< amgcl::backend::builtin<double> > Solver;
Solver S(amgcl::runtime::coarsening::smoothed_aggregation,
amgcl::runtime::relaxation::spai0,
amgcl::runtime::solver::bicgstab,
A, prm);
would have to be changed to
boost::property_tree::ptree prm;
typedef amgcl::runtime::make_solver< amgcl::backend::builtin<double> > Solver;
prm.put("precond.coarsening.type", amgcl::runtime::coarsening::smoothed_aggregation);
prm.put("precond.relaxation.type", amgcl::runtime::relaxation::spai0);
prm.put("solver.type", amgcl::runtime::solver::bicgstab);
Solver S(A, prm);
This is done as part of the effort to generalize use of preconditioners
in the library, so that any preconditioner supported by AMGCL could be
uniformly constructed with the system matrix and the parameters.
amg::top_matrix()
method was renamed to amg::system_matrix()
for the same reason.
The use of preconditioners in AMGCL was generalized. A class that may be used
as a preconditioner should have the following properties:
backend_type
for its backend.params
containing its parameters.system_matrix()
A preconditioner may be used in the following contexts:
make_solver
class.Added amgcl::as_preconditioner<Backend, Relaxation>
and amgcl::runtime::as_preconditioner<Backend>
wrapper classes that allow to use smoothers as preconditioners.
Added ILUT(p,tau) smoother/preconditioner.
Implemented Chow and Patel version of parallel ILU. This allowed to enable
ILU-type smoothers on all backends, but may not work as well as serial version
for some problems.
Provided a wrapper for cuSPARSE implementation of ILU0 on CUDA backend.
Added adapter for complex-valued matrices. This uses an equivalent real
formulation (ERF) for the matrix so that it may be solved with AMGCL.
Added zero copy matrix adapter for CRS matrices. The adapter allows to skip
copy and thus save some memory for matrices that are binary compatible with
internal AMGCL storage. Basically, that means that row pointer and column
number arrays should be either signed or unsigned ptrdiff_t
.
Provided wrapper interface for Fortran.
Published by ddemidov almost 9 years ago
This is the last release before API-breaking 0.7.0
Published by ddemidov over 9 years ago
apply()
methods, so that they may be used asPublished by ddemidov almost 10 years ago
amgcl::backend::map()
for ublas::compressed_matrix
and allowsamgcl::make_solver
,amgcl::runtime::make_solver
, and amgcl::mpi::subdmain_deflation
classes.params::amg
, and the solver parameters -- through params::solver
.Published by ddemidov about 10 years ago
Minor bug fixes
Published by ddemidov about 10 years ago
This is a rather big release with lots of new features.
crs_builder
backend. The backend is similar to crs_tuple
in the sensecrs_builder
does not need fully constructed matrix in CRS format (whichEpetra_CrsMatrix
from Trilinos project.amgcl::runtime
namespace that allow for runtimepip install pyamgcl
Published by ddemidov over 10 years ago
This is a major change in the library interface and implementation.
The code base has been rewritten from scratch to decouple various components of
the AMG method, such as backends, coarseners, smoothers, and iterative solvers.
This makes extending the library much easier. See the README for more information.
Published by ddemidov over 10 years ago
The main purpose of this release is to make a snapshot of the current library API before switching to v2 branch.
Some changes that were made since the last release: