pyccel / sympde

Symbolic calculus for partial differential equations (and variational forms)
http://sympde.readthedocs.io/
MIT License
20 stars 4 forks source link

Equation with RHS identicaly equal to 0 #116

Open ratnania opened 2 years ago

ratnania commented 2 years ago

When calling

equation = find(u, forall=v, lhs=a(u, v), rhs=l(v), bc=bc)

with l a LinearForm associated to a load equal to 0 (meaning f=0) we get the following error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-25-b67ad67ac997> in <module>
----> 1 test_poisson_2d_dir0_13_diri_24(PSYDAC_BACKEND_GPYCCEL)

<ipython-input-24-8c463e5b3c89> in test_poisson_2d_dir0_13_diri_24(backend)
      7     dir_nonzero_boundary = get_boundaries(2, 4)
      8 
----> 9     run_poisson_2d(solution, f, dir_zero_boundary,
     10             dir_nonzero_boundary, ncells=[2**2, 2**2], degree=[2, 2], backend=backend)

<ipython-input-17-54db547b3b16> in run_poisson_2d(solution, f, dir_zero_boundary, dir_nonzero_boundary, ncells, degree, backend, comm)
     38 
     39     # Variational model
---> 40     equation = find(u, forall=v, lhs=a(u, v), rhs=l(v), bc=bc)
     41 
     42     # Error norms

TypeError: 'Zero' object is not callable