Hello,
I am working on a 2D scalar field problem (like temperature) and I was wondering if there was a way to take the derivative of the trial function for only one direction. For my problem, when converting the strong form into the weak (variational) form, one of the terms is an integral of the form
∫<!-- ∫ -->
∂<!-- ∂ -->
T
∂<!-- ∂ -->
z
d
s
I've come up with a work around but I was wondering if there was a more straightforward or preferred method. The way I have it now is to define a vector function space, create a variable n that is only equal to one in one direction and perform the dot product of n with grad(T)
W = VectorFunctionSpace(mesh, "P", 2)
n = Function(W)
n.assign(Constant((0, 1)))
b = dot(grad(T), n) * ds(1)
Also, ds is only in the z direction.