Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSMLIB refactor #311

Closed
wd15 opened this issue Sep 19, 2014 · 5 comments
Closed

LSMLIB refactor #311

wd15 opened this issue Sep 19, 2014 · 5 comments

Comments

@wd15
Copy link
Contributor

wd15 commented Sep 19, 2014

Outstanding items for the LSMLIB refactor:

  • Introduce doctest directives for LSMLIB requirement.

  • Try to remove fipy/models/levelset as much as possible.

    • Noticed that if some of the distanceVariable returned fields are CellVariables than a lot of the extra fudge in models/levelset can be removed.
    • Moved gapFillMesh.py to examples/levelSet/electroChem/ with r5175
    • removed fipy/models/levelSet/advection and fipy/models/levelSet/electroChem.
    • Done
  • Review changes to LSMLIB.

  • Set up mixed mesh examples to use lsmlib.

  • Add lsmlib branch to test suite.

    • Installed LSMLIB on spica and tests pass.
  • Introduce an elecrochemistry parallel example.

    • Not doing this.
    • Parallel will come as part of the next cycle.
  • Test for efficiency.

    • Did this as part of the poster for scipy and is more efficient.
  • ~~Possibly introduce scikit-fmm as well. The author has introduced
    extension velocities in the last few days. ~~

    • Do this on another branch.
    • All done.
  • Update documentation to reflect lsmlib requirements.

    • Done
  • Document the pylsmlib functions.

    • Done
  • 3D example

    • As part of next cycle
  • Give Jon details of lsmlib installation for python 3 test computer

    • Installation is documentes so can be done when he chooses.
  • Yunbo noticed some weird scaling issues with small meshes. See http://thread.gmane.org/gmane.comp.python.fipy/2528.

    • It passes the fipy test which has some very small elements.
    • Not bothering with this until we have a more detailed test bug.

    Imported from trac ticket #432, created by wd15 on 03-13-2012 at 12:42, last modified: 09-30-2013 at 21:44

@wd15
Copy link
Contributor Author

wd15 commented Sep 19, 2014

Replying to [wd15](issue #311):

Outstanding items for the LSMLIB refactor:

  • Introduce doctest directives for LSMLIB requirement.

Done with r5161.

  • Try to remove fipy/models/levelset as much as possible.
  • Review changes to LSMLIB.
  • Set up mixed mesh examples to use lsmlib.
  • Add lsmlib branch to test suite.

Installed LSMLIB on spica. init.py was missing r5162

Done.

  • Introduce an elecrochemistry parallel example.
  • Test for efficiency.
  • Possibly introduce scikit-fmm as well. The author has introduced
    extension velocities in the last few days.
  • Update documentation to reflect lsmlib requirements

Trac comment by wd15 on 03-14-2012 at 12:58

@wd15
Copy link
Contributor Author

wd15 commented Sep 19, 2014

Pull request for Jon's review

The following changes since commit d68c0e547f03c449f2656a4d4048b7866f1c87d8:

  Merge branch 'ticket473-Gmsh-no-tags' into develop (2012-10-05 08:47:41 -0400)

are available in the git repository at:

  ssh://git@code.matforge.org/nist/fipy.git lsmlib

Daniel Wheeler (63):
creating branch for lsmlib
* Added lmslib wrappers      * Set up the _calcDistanceFunction calculations to use computeDistanceFuction2d from lsmlib
* All tests now pass with the lsmlib distance function
* All tests pass.      * All grids now use lsmlib for extension velocities.      * Masks now correctly pass a NULL pointer when not being used.
Added LSMLIB doctest directive.
Added __init__.py.
GapFillMesh and TrenchMesh examples now work with lsmlib.
Exclusively using LSMLIB for all distance function and extension velocities.
Cleaning up DistanceVariable
Fixed two test cases that were brocken in parallel in parallel.
merged log:trunk@5155:5173 to [lsmlib](../tree/lsmlib)@5173
* Moved gapFillMesh.py into examples.
Made the result of DistanceVariable.cellInterfaceAreas a Variable that depends on DistanceVariable.
Removed metalIonSourceVariable.py
Moved advectionTerm.py to terms.
Moved higherOrderAdvectionTerm.py to terms.
Removed advectionEquation.py
Removed HigherOrderConvectionEquation.
* HigherOrderAdvectionTerm is now the AdvectionTerm.      * AdvectionTerm is now the FirstOrderAdvectionTerm.
Moved surfactantBulkDiffustionEquation to examples.
Moved mayaviSurfactantViewer.py to examples.
Moved adsorbingSurfactantEquation.py to examples.
Removed surfactantEquation.py.
* Moved the surfactant convection coeff to variables.      * Moved the MatplotlibSurfactantViewer to examples.
* Moved surfactantVariable.py variables.
Removing old imports
Cleaning up imports.
Deleting surfactant directory
fipy/models is now empty
Removing test anf __init__.py from models.
Removing fipy/models
Fixed broken DistanceVariable imports.
Removing stray examples.
Resurrecting deleted example.
Resurrecting deleted example.
Resurrecting deleted example.
Changes to run in parllel and cleaned up arguments.
merged log:trunk@5173:5239 to [lsmlib](../tree/lsmlib)@5239
GapFillMesh and TrenchMesh switched from classes to functions.
* gapFillMesh.py nas classes instead of functions as some attributes require storage.      * All tests now pass      * The current version should work in parllel but is untested presently.
Tests run and pass in parllel
* Reinstated the GapFillMesh pickling tests.      * The mesh is only pickled in serial.      * The Gmsh import classes require some work for pickling in parallel.
* Separated TrenchMesh and GapFillMesh into different files.
A mesh was being instantiated with a serial mesh and making the tests hang with three processors.
Changed the name of the doctest directive form LSMLIB to LSM and introduced LSMORDER1
Common interface for LSMLIB and skfmm
Merge branch 'develop' into lsmlib
Removing the LSMLIB cython wrapper to LSMLIB.
Merge branch 'develop' into lsmlib
levelset.py uses the pylsmlib package in LSMLIB
All tests pass with new version of pylsmlib
Use `distance` function for call to pylsmlib
Move contents of `levelset.py` back to `distanceVariable.py`
Now using the pylsmlib inteface for calling extension velocities
Changing sign and type of extension mask
Changing extensionMask to u0mask due to change in pylsmlib interface.
Removing the LSMORDER1 doctest directives
Created unifying interface for LSMLIB and Scikit-fmm.
Adding a test for a bug in both LSMLIB and Scikit-fmm.
Merge branch 'develop' into lsmlib
Adding missing LSM doctest directives.
Adding Scikit-fmm and LSMLIB installation instructions.
Merge branch 'lsmlib-doc' into lsmlib

 INSTALLATION.txt                                   |   38 ++
 documentation/GUIDELINES.txt                       |    4 +
 documentation/USAGE.txt                            |    9 +
 examples/levelSet/advection/circle.py              |   15 +-
 examples/levelSet/advection/mesh1D.py              |    8 +-
 examples/levelSet/advection/trench.py              |    8 +-
 examples/levelSet/distanceFunction/circle.py       |    4 +-
 examples/levelSet/distanceFunction/interior.py     |    9 +-
 examples/levelSet/distanceFunction/mesh1D.py       |    6 +-
 examples/levelSet/distanceFunction/square.py       |    9 +-
 .../electroChem}/adsorbingSurfactantEquation.py    |  151 +++----
 .../{surfactant => electroChem}/adsorption.py      |    2 +
 .../electroChem/gapFillDistanceVariable.py         |   66 +++
 examples/levelSet/electroChem/gapFillMesh.py       |  177 +++++++
 examples/levelSet/electroChem/gold.py              |   43 +-
 examples/levelSet/electroChem/howToWriteAScript.py |   39 +-
 examples/levelSet/electroChem/leveler.py           |   63 ++-
 .../levelSet/electroChem}/lines.py                 |    0
 .../electroChem}/matplotlibSurfactantViewer.py     |    0
 .../electroChem}/mayaviSurfactantViewer.py         |    4 +-
 .../electroChem/metalIonDiffusionEquation.py       |   43 ++-
 .../levelSet/electroChem/simpleTrenchSystem.gz     |  Bin 8352 -> 9977 bytes
 .../levelSet/electroChem/simpleTrenchSystem.py     |   20 +-
 .../surfactantBulkDiffusionEquation.py             |   59 +--
 examples/levelSet/electroChem/test.py              |    5 +
 examples/levelSet/electroChem/trenchMesh.py        |  169 +++++++
 examples/levelSet/surfactant/circle.py             |   16 +-
 examples/levelSet/surfactant/expandingCircle.py    |   18 +-
 examples/levelSet/surfactant/square.py             |   20 +-
 examples/levelSet/surfactant/test.py               |    1 -
 fipy/__init__.py                                   |    2 -
 fipy/models/__init__.py                            |    3 -
 fipy/models/levelSet/__init__.py                   |   10 -
 fipy/models/levelSet/advection/__init__.py         |    6 -
 .../models/levelSet/advection/advectionEquation.py |   76 ---
 .../advection/higherOrderAdvectionEquation.py      |   57 ---
 fipy/models/levelSet/distanceFunction/__init__.py  |    3 -
 .../distanceFunction/levelSetDiffusionEquation.py  |   85 ----
 fipy/models/levelSet/electroChem/__init__.py       |    6 -
 fipy/models/levelSet/electroChem/gapFillMesh.py    |  373 ---------------
 .../levelSet/electroChem/metalIonSourceVariable.py |   98 ----
 fipy/models/levelSet/electroChem/test.py           |   49 --
 fipy/models/levelSet/surfactant/__init__.py        |   14 -
 .../levelSet/surfactant/surfactantEquation.py      |  118 -----
 fipy/solvers/pysparse/linearLUSolver.py            |    2 -
 fipy/terms/__init__.py                             |    8 +-
 .../advectionTerm.py}                              |   38 +-
 .../firstOrderAdvectionTerm.py}                    |   25 +-
 fipy/terms/test.py                                 |    2 +
 fipy/test.py                                       |    3 +-
 fipy/tests/testClass.py                            |    6 +-
 fipy/tests/testProgram.py                          |    2 +-
 fipy/tools/vector.py                               |    2 +-
 fipy/variables/__init__.py                         |    6 +
 .../distanceVariable.py                            |  487 ++++++++------------
 .../test.py => variables/interfaceAreaVariable.py} |   59 ++-
 .../test.py => variables/interfaceFlagVariable.py} |   42 ++-
 .../levelSetDiffusionVariable.py                   |    0
 .../surfactantConvectionVariable.py}               |   18 +-
 .../surfactant => variables}/surfactantVariable.py |    6 +-
 fipy/variables/test.py                             |    6 +-
 61 files changed, 1044 insertions(+), 1574 deletions(-)
 rename {fipy/models/levelSet/surfactant => examples/levelSet/electroChem}/adsorbingSurfactantEquation.py (76%)
 rename examples/levelSet/{surfactant => electroChem}/adsorption.py (97%)
 create mode 100644 examples/levelSet/electroChem/gapFillDistanceVariable.py
 create mode 100755 examples/levelSet/electroChem/gapFillMesh.py
 rename {fipy/models/levelSet/surfactant => examples/levelSet/electroChem}/lines.py (100%)
 rename {fipy/models/levelSet/surfactant => examples/levelSet/electroChem}/matplotlibSurfactantViewer.py (100%)
 rename {fipy/models/levelSet/surfactant => examples/levelSet/electroChem}/mayaviSurfactantViewer.py (98%)
 rename {fipy/models => examples}/levelSet/electroChem/metalIonDiffusionEquation.py (76%)
 rename {fipy/models/levelSet/surfactant => examples/levelSet/electroChem}/surfactantBulkDiffusionEquation.py (61%)
 create mode 100644 examples/levelSet/electroChem/trenchMesh.py
 delete mode 100644 fipy/models/__init__.py
 delete mode 100644 fipy/models/levelSet/__init__.py
 delete mode 100644 fipy/models/levelSet/advection/__init__.py
 delete mode 100644 fipy/models/levelSet/advection/advectionEquation.py
 delete mode 100644 fipy/models/levelSet/advection/higherOrderAdvectionEquation.py
 delete mode 100644 fipy/models/levelSet/distanceFunction/__init__.py
 delete mode 100644 fipy/models/levelSet/distanceFunction/levelSetDiffusionEquation.py
 delete mode 100644 fipy/models/levelSet/electroChem/__init__.py
 delete mode 100755 fipy/models/levelSet/electroChem/gapFillMesh.py
 delete mode 100755 fipy/models/levelSet/electroChem/metalIonSourceVariable.py
 delete mode 100755 fipy/models/levelSet/electroChem/test.py
 delete mode 100644 fipy/models/levelSet/surfactant/__init__.py
 delete mode 100644 fipy/models/levelSet/surfactant/surfactantEquation.py
 rename fipy/{models/levelSet/advection/higherOrderAdvectionTerm.py => terms/advectionTerm.py} (85%)
 mode change 100755 => 100644
 rename fipy/{models/levelSet/advection/advectionTerm.py => terms/firstOrderAdvectionTerm.py} (89%)
 rename fipy/{models/levelSet/distanceFunction => variables}/distanceVariable.py (52%)
 rename fipy/{models/levelSet/test.py => variables/interfaceAreaVariable.py} (62%)
 mode change 100755 => 100644
 rename fipy/{models/test.py => variables/interfaceFlagVariable.py} (61%)
 mode change 100755 => 100644
 rename fipy/{models/levelSet/distanceFunction => variables}/levelSetDiffusionVariable.py (100%)
 rename fipy/{models/levelSet/surfactant/convectionCoeff.py => variables/surfactantConvectionVariable.py} (89%)
 rename fipy/{models/levelSet/surfactant => variables}/surfactantVariable.py (95%)

Trac comment by wd15 on 10-17-2012 at 11:48

@guyer
Copy link
Member

guyer commented Sep 19, 2014

I am not approving the merge because there are still [http://build.cmi.kent.edu:8010/builders/Mac_OS_X%7Efull/builds/41/steps/trial/logs/problems failures if lsmlib or skfmm aren't installed].

Otherwise, the changes look reasonable (I particularly like the change from things like buildHigherOrderAdvectionEquation() to TransientTerm() + FirstOrderAdvectionTerm(extensionVelocityVariable)).

Trac comment by guyer on 12-07-2012 at 13:48

@wd15
Copy link
Contributor Author

wd15 commented Sep 19, 2014

This has been merged into develop with 47184e1

Trac comment by wd15 on 12-19-2012 at 14:13

@guyer
Copy link
Member

guyer commented Sep 19, 2014

Marking milestone

Trac comment by guyer on 09-30-2013 at 21:44

@wd15 wd15 closed this as completed Sep 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants