hi, i have a short question,
i want to define the initial conditions for my characteristic function.
but I do not want to do this randomly, so I created conditions for my X expression as below.
X0 = Expression('0.4<=x[0]-x[1] and x[0]-x[1]<=0.6?+1:0', degree=0)
X = Expression('0.4=x[0]+x[1] and x[0]+x[1]<=0.6?+1:0', degree=0)
X = interpolate(X, W)
where W is FunctionSpace(mesh, “DG”, 0).
but I want that initial condition to be complex like having ones only in diagonals (like X shape in a unit box) and zero for the other parts. I couldn’t find a way to do that, how can i combine X0 and X? could you please help me? and is there any easier way to do that for a complex initial guess?
thanks