Lattice matrices
qcd.latmat holds a set of lattice fields as the columns of a matrix, with the linear algebra a deflation space needs: projection onto the span, reconstruction from it, orthogonalization and a QR. It is the storage behind mdwf:qlmdefl_mixed_solver, and it can hold its vectors in single precision and in a blocked layout, which is what makes a large eigenspace fit.
qcd.latmat.create
qcd.latmat.create(L, lftype, nvec [, options]) --> latmat
lftype names the field type held in each column, as a string: one of "lattice.real", "lattice.complex", "lattice.color.vector", "lattice.color.matrix", "lattice.dirac.fermion" or "lattice.dirac.propagator" — the same spellings type() uses. nvec is the number of columns. The options:
| Key | Meaning |
|---|
prec | "single" or "double" (the default) | sublat | "full" or an even/odd preconditioned sublattice | array | the length, when each column is an array of fields (an Ls for MDWF) | block | a list of #L block sizes, which turns on the blocked layout | nc, ns | the color and spin counts |
| Method | Meaning |
|---|
m:insert(i, V) | stores a field (or a list) as column i | m:extract(i) | reads column i back | m:extract_block(i) | reads block-basis vector i | m:vec_proj(V) | the coefficients of V in the basis | m:recon_vec(a) | the field with those coefficients | m:proj(V) | V projected onto the span | m:ortho(V) | V with its component in the span removed | m:veclist_proj({V}) | the coefficient matrix of a list | m:recon_veclist(M) | the list with those coefficients | m:proj_veclist({V}) | each projected | m:ortho_veclist({V}) | each orthogonalized | m:qr_inplace_() | QR-factorizes the stored vectors in place | m:dotr_inplace_(R) | multiplies them by an upper-triangular R | m:keep_range(j0, j1) | keeps columns [j0, j1) | m:drop_range(j0, j1) | drops them |
The two _inplace_ methods modify the object, as the trailing underscore says. Entries below the diagonal of dotr_inplace_'s argument are ignored.
qcd.latmat.read_df_blk_clehner
qcd.latmat.read_df_blk_clehner(...) --> latmat
Reads a compressed blocked eigenspace in C. Lehner's format for domain-wall fermions.
qcd.latmat.la_benchmark
qcd.latmat.la_benchmark(...)
A benchmark of the internal linear algebra.
qcd.latmat.qlm_sandbox
qcd.latmat.qlm_sandbox(...)
A development scratch entry point. Not part of the stable interface.
|