Commit e9621aa7 authored by Gordian Edenhofer's avatar Gordian Edenhofer
Browse files

correlated_field.py: add_fluctuations input checks

parent 2e872c5d
...@@ -470,12 +470,22 @@ class CorrelatedFieldMaker: ...@@ -470,12 +470,22 @@ class CorrelatedFieldMaker:
prefix = str(prefix) prefix = str(prefix)
# assert isinstance(target_subdomain[space], (RGSpace, HPSpace, GLSpace) # assert isinstance(target_subdomain[space], (RGSpace, HPSpace, GLSpace)
fluct = LognormalTransform(fluctuations_mean, fluctuations_stddev, ve = "{0}_mean and {0}_stddev must be strictly positive"
self._prefix + prefix + 'fluctuations', N) if fluctuations_mean > 0. and fluctuations_stddev > 0.:
flex = LognormalTransform(flexibility_mean, flexibility_stddev, fluct = LognormalTransform(fluctuations_mean, fluctuations_stddev,
self._prefix + prefix + 'flexibility', N) self._prefix + prefix + 'fluctuations', N)
asp = LognormalTransform(asperity_mean, asperity_stddev, else:
self._prefix + prefix + 'asperity', N) raise ValueError(ve.format("fluctuations"))
if flexibility_mean > 0. and flexibility_stddev > 0.:
flex = LognormalTransform(flexibility_mean, flexibility_stddev,
self._prefix + prefix + 'flexibility', N)
else:
raise ValueError(ve.format("flexibility"))
if asperity_mean > 0. and asperity_stddev > 0.:
asp = LognormalTransform(asperity_mean, asperity_stddev,
self._prefix + prefix + 'asperity', N)
else:
raise ValueError(ve.format("asperity"))
avgsl = NormalTransform(loglogavgslope_mean, loglogavgslope_stddev, avgsl = NormalTransform(loglogavgslope_mean, loglogavgslope_stddev,
self._prefix + prefix + 'loglogavgslope', N) self._prefix + prefix + 'loglogavgslope', N)
......
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