Commit fa805c8a authored by Andreas Dedner's avatar Andreas Dedner
Browse files

add the option to provide a dimDomain option to the sharp class instead of omega

parent 93d8abe0
......@@ -65,13 +65,19 @@ class InspectSharp:
# If the user has provided the domain as a dgf file use the second parameter
# as the dimension of the domain
try:
### mynote: this isn't general enough
self.inspectDict['dimDomain'] = self.SharpDef.omega.dimgrid
except AttributeError:
try:
self.inspectDict['dimDomain'] = self.SharpDef.omega[1]
except TypeError:
raise ValueError("The definition of omega isn't consistent")
self.inspectDict['dimDomain'] = self.SharpDef.dimDomain
except AttributeError:
try:
assert len(self.SharpDef.omega)==2,\
"The definition of omega is not consistent, "\
+"either provide a `dimDomain` attribute or use, "\
+"or provide a (file name,dimDomain) pair"
self.inspectDict['dimDomain'] = self.SharpDef.omega[1]
except TypeError:
raise ValueError("The definition of omega isn't consistent")
# otherwise continue and assume the useris providing a cartesian domain
# first check all three parameters are the same size
......
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