luca-heltai / ePICURE

Python Isogeometric CUrve REconstruction
GNU General Public License v2.0
10 stars 23 forks source link

ePICURE

Python Isogeometric CUrve REconstruction

This is the final project for the course Applied Mathematics: an Introduction to Numerical Analysis and Sientific Computing. It consists of several small sub-projects, that will combine together in an open source software for curve resconstruction, analysis and simulation. We will apply this to micro-swimming problems, but several other applications are possible...

The students should be familiar with

Objects

At each time frame, an object can be described by

The full time dependent evolution of an object (a stroke) is described by a curve in time for each of the numbers above (a path). The time curves are polynomial curves, or NURBS curves. In any case, they can be described by coefficients times basis functions.

Short Instructions for contributions

Each contribution should be done on a feature branch of a forked repository, then a pull request should be issued, which will be merged by me on mainline. Take a look at this page for a very good explanation on possible git workflows: https://www.atlassian.com/git/tutorials/comparing-workflows/. We will be adopting the forking workflow:

Components that should be implemented

Each component should have a well documented interface. An example is given for the VectorSpace interface, but all other interfaces should have an equally detailed interface, which should be discussed in the issues section of the git-hub repository.

No contribution will be accepted without a small unit test!. I'm using nose to do unit testing: https://nose.readthedocs.org/en/latest/. In particular it is enough to write a test file in the directory ./tests. If the filename contains the word Test or test surrounded by _ it will be executed as a unit. If it contains functions whose name contains test or Test (surrounded by _ or at end/begin of the name)

Naming Conventions

Defensive Programming

Defensive programming is a term that we use frequently when we talk about writing code while in the mindset that errors will happen. Here, errors can come in two ways: first, I can make a mistake myself while writing a functions; and secondly, someone else can make a mistake while calling my function. In either case, I would like to write my code in such a way that errors are (i) as unlikely as possible, (ii) that the python interpreter can already find some of the mistakes, and (iii) that the remaining mistakes are relatively easy to find, for example because the program aborts. Defensive programming is then a set of strategies that make these goals more likely.

Over time, we have learned a number of techniques to this end, some of which we list here:


  def compare_lists(left, right):
      # do something with left and right for each element

then make sure that you abort your program if the lists are not compatible:


  def compare_lists(left, right):
      assert len(left) == len(right)
      # do something with left and right for each element

Take a look at https://wiki.python.org/moin/UsingAssertionsEffectively for a more detailed discussion.

Notice that you can turn off assertion automatically: if Python is started with the -O option, then assertions will be stripped out and not evaluated, so you are not adding any overhead to your code. You are only making your life easier...

License:

Please see the file ./LICENSE for details

Continuous Integration Status:

Build Status