is_linear_expression checks whether the expression given in a LinearForm (or a BilinearForm resp.ly) instance is actually linear (bi-linear resp.ly). For some expressions, known to be linear, the check is really slow or even stuck in a loop. This might be due to the current version used of sympy in sympde.
As an example, you may import Laplacian from psydac.examples.poisson_2d_mapping and TargetMapping from sympde.topology.analytical_mapping and run
params = dict(c1 = 0, c2 = 0, k = 0.3, D = 0.2)
mapping = TargetMapping('F', **params)
lapl = Laplacian(mapping)
s, t = mapping.logical_coordinates
x, y = mapping.expressions
k = params['k']
D = params['D']
kx = 2 * pi / (1 - k + D)
ky = 2 * pi / (1 + k)
phi = (1 - s**8) * sin(kx * (x - 0.5)) * cos(ky * y)
rho = - lapl(phi)
logical_domain = Square('Omega', bounds1 = (0, 1), bounds2 = (0, 2 * pi))
domain = mapping(logical_domain)
V0 = ScalarFunctionSpace('V0', domain)
u0, v0 = elements_of(V0, names = 'u0, v0')
rhs = LinearForm(v0, integral(domain, rho * v0))
is_linear_expressionchecks whether the expression given in aLinearForm(or aBilinearFormresp.ly) instance is actually linear (bi-linear resp.ly). For some expressions, known to be linear, the check is really slow or even stuck in a loop. This might be due to the current version used of sympy in sympde.As an example, you may import
Laplacianfrompsydac.examples.poisson_2d_mappingandTargetMappingfromsympde.topology.analytical_mappingand run