Commit 5e7f1df7 authored by Andreas Dedner's avatar Andreas Dedner
Browse files

small fix

parent fa805c8a
......@@ -71,11 +71,15 @@ class InspectSharp:
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]
if len(self.SharpDef.omega)==2:
self.inspectDict['dimDomain'] = self.SharpDef.omega[1]
if len(self.SharpDef.omega)==3:
self.inspectDict['dimDomain'] = len(self.SharpDef.omega[0])
else:
print("The definition of omega is not consistent, "\
+"either provide a `dimDomain` attribute, "\
+"use a [[p0],[p1],[N]] tripple or "\
+"provide a (file name,dimDomain) pair")
except TypeError:
raise ValueError("The definition of omega isn't consistent")
......
......@@ -4,7 +4,7 @@ with open("README.md", "r") as fh:
long_description = fh.read()
setup(name="phasefield",
version="1.0",
version="1.0.1",
author="Matthew Collins and Andreas Dedner",
author_email="a.s.dedner@warwick.ac.uk",
description="Interface problem solver based on the phase-field methodology",
......
......@@ -9,7 +9,8 @@ from phasefield import PhaseModel
class Mcf:
"""Sharp definition for mean curvature flow."""
dimDomain = 2
# dimDomain = 2
omega = [[0,0],[2,2],[10,10]]
endTime = 0.125
saveStep = 0.001
mobility = 1
......@@ -44,4 +45,4 @@ if __name__ == "__main__":
phi = Coefficient(space)
phiN = Coefficient(space)
extend = lambda p: as_vector([p,1-p])
form = phaseField.setupPhase(extend(phi), extend(phiN), None, None, extend(vPhi), None)
form = phaseField.setupPhase(extend(phi), extend(phiN), None, None, as_vector([vPhi,0]), None)
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