pyccel / sympde

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

Some fixes in Equation, Linear/BilinearForm, Interface and Union classes. #58

Closed yguclu closed 4 years ago

yguclu commented 4 years ago

@ratnania: Codacy complains about the syntax

values = [*trials, *tests]

which seems perfectly valid to me. I think we use this in many places, so I would not be happy to change it. What do you think?

yguclu commented 4 years ago

thanks for these changes/fixes. is it possible to add the following verification:

* check that the same boundary is not used in the weak formulation and strong condition (essential bc)

Yes, I can definitely add that. But are we totally sure that we will never have such a condition? I am thinking about the biharmonic equation for example...

ratnania commented 4 years ago

@ratnania: Codacy complains about the syntax

values = [*trials, *tests]

which seems perfectly valid to me. I think we use this in many places, so I would not be happy to change it. What do you think?

I think this has been changed in one of the latest Python versions. I'm not sure if this is true for all py3 versions.

ratnania commented 4 years ago

thanks for these changes/fixes. is it possible to add the following verification:

* check that the same boundary is not used in the weak formulation and strong condition (essential bc)

Yes, I can definitely add that. But are we totally sure that we will never have such a condition? I am thinking about the biharmonic equation for example...

Indeed, we need to compute the order of the operator (Laplacian -> 2, etc) to decide either or not we accept multiple bc (weak and strong) on the same boundary.

yguclu commented 4 years ago

This kind of verification of the input equation is very interesting, but we need to design it carefully. @saidctb pointed out to me that we should also check that no boundary conditions are applied on a boundary along a periodic direction. I suggest we create a separate issue, or even better a milestone.

ratnania commented 4 years ago

This kind of verification of the input equation is very interesting, but we need to design it carefully. @saidctb pointed out to me that we should also check that no boundary conditions are applied on a boundary along a periodic direction. I suggest we create a separate issue, or even better a milestone.

ok. issue created @issue#59

yguclu commented 4 years ago

@ratnania: Codacy complains about the syntax

values = [*trials, *tests]

which seems perfectly valid to me. I think we use this in many places, so I would not be happy to change it. What do you think?

I think this has been changed in one of the latest Python versions. I'm not sure if this is true for all py3 versions.

Yes, I think you are right. We test our code with Python-3.5, 3.6 and 3.7 and everything works fine. But I remember that some syntax constructs were not accepted on Python-3.4, and this is probably one of them.

From what I could gather Codacy uses Prospector, which in turn uses Pylint. Do you know how to tell Pylint which Python3 version it should accept?