pmesh.abopt module

class pmesh.abopt.ParticleMeshEngine(pm, q=None)[source]

Bases: abopt.legacy.vmad2.Engine

add = add[source]
assign = assign[source]
assign_component = assign_component[source]
c2r = c2r[source]
decompose = decompose[source]
decompress = decompress[source]
get_x = get_x[source]
lowpass = lowpass[source]
multiply = multiply[source]
paint = paint[source]
r2c = r2c[source]
readout = readout[source]
residual = residual[source]
to_scalar = to_scalar[source]
transfer = transfer[source]
class pmesh.abopt.ParticleMeshVectorSpace(pm, q)[source]

Bases: abopt.base.VectorSpace

addmul(a, b, c, p=1)[source]

Defines the addmul operation.

either subclass this method or supply a method in the constructor, __init__

addmul(a, b, c, p) := a + b * c ** p

The result shall be a vector like b.

b is always a vector for this VectorSpace; though be aware that there can be multiple valid Python types defined on the same VectorSpace. For example, particle positions are straight numpy.ndarray, An overdensity field may be a ComplexField or a RealField object.

dot(a, b)[source]

defines the inner product operation.

dot(a, b) := a @ b

The result shall be a scalar floating point number.

a and b are always vector for this VectorSpace, and are guarenteed to be of the same Python type – if not there is a bug from upstream callers.

pmesh.abopt.check_grad(code, yname, xname, init, eps, rtol, atol=1e-12, verbose=False)[source]
pmesh.abopt.nyquist_mask(factor, v)[source]