mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-09 07:11:42 +08:00
updates to recursion issues in reciprocal maps
This commit is contained in:
@@ -52,6 +52,8 @@ class Property(object):
|
||||
if mapping is None and prop.propertyLink is not None:
|
||||
linkName, linkMapClass = prop.propertyLink
|
||||
linkMap = linkMapClass(None)
|
||||
if getattr(self, '%sMap'%linkName, None) is None:
|
||||
return prop.defaultVal
|
||||
m = getattr(self, '%s'%linkName)
|
||||
return linkMap * m
|
||||
|
||||
|
||||
@@ -103,6 +103,8 @@ class TestPropMaps(unittest.TestCase):
|
||||
assert pm.sigmaDeriv is not None
|
||||
assert pm.rhoDeriv is not None
|
||||
|
||||
assert pm.mu == mu_0
|
||||
assert pm.mui == 1.0/mu_0
|
||||
assert pm.muMap is None
|
||||
assert pm.muDeriv is None
|
||||
assert pm.muiMap is None
|
||||
|
||||
Reference in New Issue
Block a user