weymouth / lily-pad

Real-time two-dimensional fluid dynamics simulations in Processing. Initiated by Dr G D Weymouth:
https://github.com/weymouth/
MIT License
162 stars 78 forks source link

Chen yongxin #4

Closed chenyongxin closed 9 years ago

chenyongxin commented 9 years ago

New pull-request (1) Revert LilyPad.pde to it's original state. (2) Make the example code more concise.

  1. Add CircleArray.pde to set up circular arrangement of cylinders which are similar to Eames’ paper. New .pde file contains two class: CircleArray and CircleArrangement.
  2. Add SaveData2.pde which is simplified from SaveData to save Drag/Lift coefficients.
weymouth commented 9 years ago

I would make some changes to your new classes.

First, CircleArrangement should extends CircleArray. Then CircleArrangement will be very short (just an initialization part) and it will be easy to make other extensions later if needed.

Second, if savedata2 is only for CircleArray, then I think it should be part of that class, not its own class. In general, a utility class for something like saving data should apply to the broadest possible set of classes so it can be as reusable as possible.

weymouth commented 9 years ago

Have you made those changes?