Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
GSoC 2017 Application Bhavishya : Efficient Equation of Motion Generation
- Name : Bhavishya
- University : Indian Institute of Technology, Kanpur
- Branch : Computer Science and Engineering
- Position : Freshman
- Email-Id : email@example.com
- IRC(Nick,at freenode): bhavishya
- Blog : For maintaining log of my work.
I am a Computer Science (C.S.E) Freshman at Indian Institute of Technology Kanpur,India.There is great tradition of FOSS at my college and which motivated me to pursue open-source development, and finally leading to G-SoC. It seems to me that I might do open source probably for my whole life-time.And GSoC could be my first big opportunity.The idea that code written by myself could be a part of industry(and hence could reach to so many users) intrigues me.
To achieve the aforementioned, I started looking out for organisations, and with sympy I got my perfect match.The versatility of sympy really struck me, it is capable of doing almost all the stuff that very heavy-weight software(like matlab,octave etc.) do.And another major reason for me choosing sympy has been Physics. Physics and open-source ,at the same time would be simply too much fun.
- Tools : vim, git, github, cmake(c-Lion)
- Frameworks : Django(beginner)(made a blog too),Docker(beginner),Kubernetes(beginner)
- OS : Arch Linux,Mac -OS(Sierra),Ubuntu,CentOS
Contributions to Open-Source :
- To sympy :
PR made :
- To SymEngine :
- I'm working on CSE(Common Subexpression Elimination)#issue1219
Issues made :
- To hyper -h2 : Wrote tests for hyper-h2-protocol stack.
- To coala : Discussed various issues, wrote example bears and also contributed to documentation.
- To Mailman : Read about internet protocols,RFCs and various implementations to solve security issues of Mailman(To generate encrypted lists,using python crypto libraries like OpenSSL).Also suggested various threat models and their remedies.Also deployed mailman on specific domain by using POSTFIX.Also deployed docker(containers) to test my code.
General Programming :
- Linux : I am a linux junkie with experience with Arch Linux and various distros(ubuntu,CentOS etc.).I have also done LFS(Linux from Scratch,implementing and compiling all packages from scratch).
- Recently made a package manager in python(used beautifulsoup,requests module) using Kahn's algorithm(for topsort) for my LFS project.
- I made a student-search(totally in bash) for my college by scraping data from web.It had the all the details of a particular student even his photo displayed in the terminal itself.
- Also wrote python-scripts that could communicate among themselves using zeromq thus playing passing the parcel game(pass nos. following Collatz Conj.).
- Implemented MQTT script in Lua for creation of local network(using arduino and bluetooth module)
- Have successfully completed/doing following CS, math and PHYSICS courses :
- C programming
- Linear Algebra
- Classical Mechanics
PHYSICS -specific :
- Got AIR(all india rank) - 169 in JEE Advanced(Entrance Test for getting admission to IITs)
- Got selected for INPHO(Indian national Physics Olympiad, path to IPhO)(top 1% in India)
- Cleared INAO(Astronomy olympiad,involved huge portions of classical mechanics)
Experience with Physics, Python and C++ :
- Books Read (Core Physics) : Feynman Lectures,I.E Irodov, Krotov, Klepner ,David Morin, Griffiths.
- For Python(following) : The hitchhiker's guide, official docs.
- For C++(following) : Book from Bjarne Stroustrup.
Project Proposal :
To improve efficiency of EoM(Eq. of motion generation) by improving upon the sympy(mechanics package),refactoring code,profiling slow functions and implementing similar modules in C++(for SymEngine).Providing wrappers for(these modules in C++) ease of use in Sympy and reaching certain benchmarks(complex multibody problems in python for now.)
Though Sympy is an amazing library but it lacks one very important feature --speed(explicitly when performing complex operations), but SymEngine(which is a C implementation of sympy) comes out to be a nice solution, but it still needs to implement the physics package(this project aims at building the mechanics package).At the end following is expected :
- Profiling of slower-functions and implementation of their improved forms in sympy
- Implementation of sympy.physics.vector and sympy.physics.mechanics packages equivalents for SymEngine
- Testing of SymEngine to complete benchmarks setup(These are existing ones) but I intend to create new benchmarks in python.(May include multiple-body problems or any problems that at present are difficult to do with sympy or are time inefficient)
Implementation Timeline :
Increasing Acquaintance with SymEngine and cmake(Already started with on various issues with isuruf).Deciding upon the order of implementation of various modules to be implemented in SymEngine(for example,to increase my acquaintance,I started with CSE(Common Subexpression Elimination) implementation for Symengine.) and hunt for slower functions in mechanics package in sympy.Discussion with mentors,to weed out any conflicts that may arise in implementation of proposal.Also deciding upon a more stringent workplan.
Start code refactoring and under constant vigil(of mentors), implement fixes along the way, Performing speed-tests to find slower functions and, if possible, replace them(or at least perform simplifications over them).Complete the python refactoring part and start implementation for SymEngine.
- Implementation of basic data types like ReferenceFrame(CoordinateSystem),dynamic_symbols etc. This would be followed by implementation of following curl,divergence,gradient,scalar_potential,scalar_potential_difference. I think, I would create similar objects in c++, define the corresponding methods.And now we could move to more complex types like Dyadic(complex as it involves tensors and tensor products),orient angular variables etc.
Completion of implementations of functions and classes(physics.vector module). If everything's on track, by this week the whole vector module would be completed.Also the whole module needs to be documented(I have used sphinx till now,but the tool could be discussed in bonding phase.)
Start implementing various data types in mechanics module which would be :
- Rigid Body
- Linear Momentum
- Angular Momentum
- Using momenta functions in Mechanics
- Kinetic Energy
- Potential Energy
- Lagrangian All these would be straight implementations of already existing types.
Complete addition and also start working on functions(present in function.py,since earlier on, the code was refactored and improved upon)now the implementation would mostly follow already existing python implementation.Document everything done till now, submit report for Phase I.
Complete any function implementation left.Implement Kane’s Method & Lagrange’s method and also the linearization module.So the present algorithms(are appropriate and since have been improved upon in bonding period and python code improvement period) on lines of sympy would be implemented.
Implement various constructs like rigid-body, finally completing the systems package.For example,The sympy docs have got a portion dedicated to potential issues with linearization, similar realisations could be achieved for symengine, if tests are also written(not very exhaustive though,since would take much time,but a reasonable standard which could be decided upon during community-bonding.)
Try to complete the tests by this week.Also since a reasonable amount of code would have added by then, thus start benchmarking of code(this could help in achieving those realisations pertaining to speed.)
This would be a buffer weak.Documentation for whatever done till now also submit report for PHASE -II.
Tests need to be written for everything done till now also initiate implementing wrappers for the code which is tested till now.One very important aspect(which enormously increases the ease in use of symengine) is wrappers. As proposed earlier, wrappers for the new modules added needs to be implemented in python.
Test to be written in python for complex multiple body systems, and appropriate corrections to be made. Also the work for wrappers should approach completion.Prepare for merge.
Firstly the whole implementation should reach the benchmark fixed earlier on.Also tests for wrappers constructed.Running travis CI and improving upon anything thats broken. Secondly documentation to be given the final shape. Ready for merge. Prepare for final project report. Finalising the project and submission of the final project report which would include my contribution and what else could be done in coming time(may be for future G-SoCers). Also if something offtrack happens it needs to get fixed during this duration And at last push the changes.
Post - GSoC :
I would like to explore the complex mathematical portions of sympy and as I read more about Number Theory, Combinatorics and Graph Theory, would contribute in that domain too.Though I haven't done much Machine Learning till now but I would love to work on incorporating some kind of ML API in sympy.Also I'll be maintaining a blog to help for future G-SoCers. I would also like to participate in various events organised by sympy.
- The timeline proposed would be flexible(I'll try hard to finish work before the committed dates so that I could document(which is a weak link in symengine currently) and test everything properly.)
- Also I dont have any commitments During this summers and I can give any amount of time(humanely possible) to complete this project.