MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / __init__

Method __init__

k_diffusion/sampling.py:306–313  ·  view source on GitHub ↗
(self, h, pcoeff, icoeff, dcoeff, order=1, accept_safety=0.81, eps=1e-8)

Source from the content-addressed store, hash-verified

304class PIDStepSizeController:
305 """A PID controller for ODE adaptive step size control."""
306 def __init__(self, h, pcoeff, icoeff, dcoeff, order=1, accept_safety=0.81, eps=1e-8):
307 self.h = h
308 self.b1 = (pcoeff + icoeff + dcoeff) / order
309 self.b2 = -(pcoeff + 2 * dcoeff) / order
310 self.b3 = dcoeff / order
311 self.accept_safety = accept_safety
312 self.eps = eps
313 self.errs = []
314
315 def limiter(self, x):
316 return 1 + math.atan(x - 1)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected