Commit ffac9b09 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

NestedBlockState.mcmc_sweep(): add support for different parameters for different levels

parent 813cf5c7
......@@ -443,6 +443,10 @@ class NestedBlockState(object):
dS = 0
nmoves = 0
c = kwargs.get("c", None)
if c is not None and not isinstance(c, collections.Iterable):
c = [c] * len(self.levels)
for l in range(len(self.levels)):
if check_verbose(verbose):
print(verbose_pad(verbose) + "level:", l)
......@@ -468,7 +472,13 @@ class NestedBlockState(object):
if l < len(self.levels) - 1:
self.levels[l + 1]._state.sync_emat()
ret = algo(self.levels[l], **overlay(kwargs, entropy_args=eargs))
if c is None:
args = overlay(kwargs, entropy_args=eargs)
else:
args = overlay(kwargs, entropy_args=eargs, c=c[l])
ret = algo(self.levels[l], **args)
dS += ret[0]
nmoves += ret[1]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment