@@ -75,7 +76,7 @@ class ExprIm3(dolfin.Expression):
#print " Im = " + str(Im)
#self.evalcount += 1
classExprGradIm2(dolfin.Expression):# for some reason this does not work with quadrature finite elements, hence the following scalar gradients definition
classExprGradIm2(dolfin.Expression):
def__init__(self,filename=None,Z=0.,**kwargs):
iffilenameisnotNone:
self.init_image(filename=filename)
...
...
@@ -97,60 +98,11 @@ class ExprGradIm2(dolfin.Expression): # for some reason this does not work with
classExprGradIm3(dolfin.Expression):# for some reason this does not work with quadrature finite elements, hence the following scalar gradients definition
classExprGradIm3(dolfin.Expression):
def__init__(self,filename=None,**kwargs):
iffilenameisnotNone:
self.init_image(filename=filename)
...
...
@@ -174,75 +126,12 @@ class ExprGradIm3(dolfin.Expression): # for some reason this does not work with
@@ -302,12 +191,12 @@ class ExprDefIm3(dolfin.Expression):
DefIm/=self.s
#print " DefIm = " + str(DefIm)
classExprGradDefIm2(dolfin.Expression):# for some reason this does not work with quadrature finite elements, hence the following scalar gradients definition
classExprGradDefIm2(dolfin.Expression):
def__init__(self,U,filename=None,Z=0.,**kwargs):
iffilenameisnotNone:
self.init_image(filename=filename)
self.U=U
self.UX=numpy.array([float()]*2)
self.UX=numpy.empty(2)
self.x=numpy.array([float()]*2+[Z])
definit_image(self,filename):
...
...
@@ -332,8 +221,7 @@ class ExprGradDefIm2(dolfin.Expression): # for some reason this does not work wi
#print " UX = " + str(self.UX)
self.U.eval(self.UX,X)
#print " UX = " + str(self.UX)
self.x[0]=X[0]+self.UX[0]
self.x[1]=X[1]+self.UX[1]
self.x[0:2]=X[0:2]+self.UX[0:2]
#print " x = " + str(self.x)
#print " GradDefIm = " + str(GradDefIm)
self.interpolator.Interpolate(self.x,GradDefIm)
...
...
@@ -341,91 +229,20 @@ class ExprGradDefIm2(dolfin.Expression): # for some reason this does not work wi
classExprGradDefIm3(dolfin.Expression):# for some reason this does not work with quadrature finite elements, hence the following scalar gradients definition