GSoC Week 2

Hi there! It’s been two weeks into the coding period, & I have managed to flip some bits. I had a meeting with Jason and Sartaj on 30th April. We were discussing on the implementation of Singularity Functions. I have implemented them using the properties of Heaviside and Diracdelta under eval() method. But they suggested me to return Heaviside and Diracdelta directly instead of their properties only. This way we can reuse the functionality that has been already there in Sympy. I tried doing that,but I am having problems with the representation part.

With the former one:-
In [2]: SingularityFunction(x, 3, 4)
Out[2]:                          
       4      
<x - 3>
With the latter one:-
In [3]: SingularityFunction(x, 3, 4)
Out[4]: 
       4 
(x - 3) ⋅Heaviside(x - 3)

I have to figure out the representation part of Singularity Function class. If I can succeed, then we can follow the latter idea of implementation without any worry.

We further discussed a bit about the integrations of Singularity Functions.

Progress of Week 2

The major portion of this week went into working with the printing modules. Due to which I had to switch between the targets of this week and the next week.

  • In  PR 11139, I was finally able to figure out how to implement the pretty printing of derivatives of the DiracDelta Class similar to the one with latex printing. Hence, it got merged.
  • In PR 11178, I’ve enabled the pretty printing and latex printing of Singularity Functions and added their tests too. The output somewhat looks like (both in pretty printing and latex printing :
In [3]: SingularityFunction(x, 3, 4)
Out[3]:                          
       4      
<x - 3>

In [4]: SingularityFunction(x, -5, 4)
Out[4]:                          
       4      
<x + 5>

In [5]: SingularityFunction(x, 0, 4)
Out[6]:                          
   4      
<x>
  • I was looking into  PR 11192, it seems a great work to me. Docstrings are quite well defined.

Next Week

  • To get  PR 11103 and PR 11137 merged.
  • Integrations of Singularity Functions.
  • Improve the Implementation of Singularity Functions.

That’s all for now, looking forward to week 3.

Cheers. Happy Coding.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s