Hi everyone! I'm new to FEniCS and would like to solve a PDE of the form $\partial_{tt} u - \Delta^2 u = 0$ using a space-time Galerkin method, i.e., I would like to treat the time like a space dimension.
I see in FEniCS that there is C0 interior penalty method to implement $\Delta^2 u = 0$. However in my case, I have to redefine the normal components used in the jump operator. I have written the following code for a 1D+1D (space+time) problem:
def myjump(v, n):
"UFL operator: Take the jump of *v* across a facet."
v = as_ufl(v)
r = len(v.ufl_shape)
if r == 0:
warning("not defined: myjump")
else:
return v('+')[0]*n('+')[0] + v('-')[0]*n('-')[0]
My question is how can I scale the following expression?
v('+')[0]*n('+')[0] + v('-')[0]*n('-')[0]
I cannot simply divide by n[0]
as it might divide the expression by zero, and I'm not also sure if division operation is defined with such data structure.