A Python interface to the DDalphaAMG multigrid solver library
This package provides a Python interface to DDalphaAMG. DDalphaAMG is a solver library for inverting Wilson Clover and Twisted Mass fermions from lattice QCD. It provides an implementation of an adaptive aggregation-based algebraic multigrid ($\alpha$AMG) method.
Installation
NOTE: lyncs_DDalphaAMG requires a working MPI installation.
This can be installed via apt-get:
sudo apt-get install libopenmpi-dev openmpi-bin
OR using conda:
conda install -c anaconda mpi4py
The package can be installed via pip:
pip install [--user] lyncs_DDalphaAMG
Documentation
The functions provided by the DDalphaAMG API are available in the Solver class lyncs_DDalphaAMG.Solver.
Please, use help(Solver) to see an overview of the functionalities.
In the following we present some examples on the usage of the package.
from lyncs_DDalphaAMG import Solver
# Creating the solver
solver = Solver(global_lattice=[4, 4, 4, 4],
kappa=0.125)
# Reading the configurations
conf = solver.read_configuration("test/conf.random")
plaq = solver.set_configuration(conf)
print("Plaquette:", plaq)
# Computing the solution of a random vector
vector = solver.random()
result = solver.solve(vector)
The above example is run locally and all the fields are numpy arrays.
The Solver class is also Dask compatible and by giving a distributed communicator, as in the following example, the solver instance is now distributed remotely on the dask workers and all the fields are Dask arrays.
from lyncs_mpi import Client
# Creating a client with 4 workers
client = Client(num_workers = 4)
comm = client.create_comm()
procs = [2, 2, 1, 1]
comm = comms.create_cart(procs)
solver = Solver(global_lattice=[4, 4, 4, 4],
comm = comm,
kappa=0.125)
# Continues as above
Metadata
Release files for lyncs-DDalphaAMG 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lyncs_DDalphaAMG-0.1.2.tar.gz | 12.4 kB | Without provenance | Details |
Release files / lyncs_DDalphaAMG-0.1.2.tar.gz
| Download URL | lyncs_DDalphaAMG-0.1.2.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e20993cc2d5ed73c395def09afd002d6bba2467f75463306a545118a434d0ca
|
|
BLAKE2b-256 checksum How to use checksums |
5285c70a43c16466b5e6da5f1d690a16e66e82b399608e0cc3a7b36f1c88f6e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Security for lyncs-DDalphaAMG 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.