Hi,
I would like to solve a periodic BC problem (with real values on the LHS) using Dedalus. However a "Factor is exactly singular" error keeps popping.
I am aware of other threads dealing with this problem but since I don't have BCs I don't see how to relate it to my situation.
As I am very new to Dedalus and spectral methods I am sure the error is right under my nose but I can't seem to find it.
Here is my code:
Lx, Ly = (28, 28)
x_basis = de.Fourier('x', 152, interval=(0, Lx))
y_basis = de.Fourier('y', 152, interval=(0, Ly))
domain = de.Domain([x_basis, y_basis], grid_dtype=np.float64)
def func():
return one
Gfunc=de.operators.GeneralFunction(domain, 'g', func)
de.operators.parseables["f"] = Gfunc
problem = de.LBVP(domain, variables=['u'])
problem.substitutions["uxx"] = "dx(dx(u))"
problem.substitutions["uyy"] = "dy(dy(u))"
problem.substitutions["uxxxx"] = "dx(dx(dx(dx(u))))"
problem.substitutions["uyyyy"] = "dy(dy(dy(dy(u))))"
problem.add_equation("uxx + uyy + uxxxx + uyyyy = f ")
solver = problem.build_solver()
solver.solve()
Where "one" is a numpy.ndarray of shape (28,28) composed of ones and zeros (describing a shape).
Do you have an idea where the error comes from ?
Kind regards,
Josquin