On Fri, Jan 24, 2014 at 10:44 AM, Jane Hung <jyh...@mit.edu> wrote:
> Actually I got it working in Ubuntu, but the parallel implementation doesn't
> give expected results, as in different from running in serial. The
> parallelization setup seems fine from the command line test on the site. Do
> periodic grids work when running in parallel?

As far as I can tell, they do not work in parallel. This simple test
doesn't do the right thing in parallel.

    import fipy as fp

    m = fp.PeriodicGrid2D(nx=10, ny=10, dx=1., dy=1.)
    v = fp.CellVariable(mesh=m, value=0.)
    v.setValue(1., where=(m.x < 1) & (m.y < 1))
    (fp.TransientTerm() == fp.DiffusionTerm()).solve(v, dt=0.1)

    from fipy.tools.debug import PRINT
    PRINT(v.value, stall=False)

It is clear that the grid is not communicating in the top to bottom
direction in parallel.

> If not, how could periodic
> boundary conditions be implemented?

Ideally, Gmsh would do this for us, but I don't believe that it has
any notion of periodicity. To make it work for the "sliced
partitioned" grids in FiPy is probably not that difficult, but I don't
have time to do this right now. It is just a question of extending the
overlaps to join along the top and bottom of the mesh. The left-right
overlaps already work being on the same processor since the
partitioning is only along the y-axis.

Hope that helps.

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
fipy@nist.gov
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to