Re: Taking Dot Product of faceGrad

2014-01-28 Thread Daniel Wheeler
On Fri, Jan 24, 2014 at 7:23 PM, Jane Hung jyh...@mit.edu wrote: Could you give more details about how to extend the overlaps along the top and bottom of the mesh? Should it be something like this mesh=Grid2D(nx=500,ny=500,dx=0.25, dy=0.25, overlap=2) ? How could you specify the top and bottom

Re: Taking Dot Product of faceGrad

2014-01-27 Thread Jane Hung
Another issue: I tried this Cahn Hilliard example http://pastebin.com/9UZJ2h24 with trilinos instead of pysparse, and the results seem to differ. The phase separation doesn't seem to occur with the trilinos solver. On Fri, Jan 24, 2014 at 7:23 PM, Jane Hung jyh...@mit.edu wrote: Could you give

Re: Taking Dot Product of faceGrad

2014-01-27 Thread Guyer, Jonathan E. Dr.
In examples/cahnHilliard/mesh2D.py, we call eq.solve(..., solver=LinearLUSolver()). I don't know why the default Trilinos solver (probably GMRES) doesn't show the same evolution, but it's possibly the nonlinearities in the 2nd-order DiffusionTerm mean we should be sweeping and GMRES is more

Re: Taking Dot Product of faceGrad

2014-01-24 Thread Daniel Wheeler
On Wed, Jan 22, 2014 at 10:37 AM, J Hung jyh...@mit.edu wrote: I decided to try it on Ubuntu and got this error python -c from fipy.solvers.scipy import DefaultSolver; \ print DefaultSolver --no-pysparse Traceback (most recent call last): File string, line 1, in module File

Re: Taking Dot Product of faceGrad

2014-01-24 Thread Jane Hung
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? If not, how could periodic

Re: Taking Dot Product of faceGrad

2014-01-24 Thread Daniel Wheeler
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

Re: Taking Dot Product of faceGrad

2014-01-21 Thread Jane Hung
Is there a way to use Trilinos with windows? PyTrilinos doesn't seem to be compatible. When I tried to install Fipy with Trilinos on OSX, I can't seem to run anything since even python -c from fipy import *; fipy.test() gives an AttributeError and in the diffusion/mesh1D.py file, it gives a

Re: Taking Dot Product of faceGrad

2014-01-21 Thread Daniel Wheeler
On Tue, Jan 21, 2014 at 11:08 AM, Jane Hung jyh...@mit.edu wrote: Is there a way to use Trilinos with windows? PyTrilinos doesn't seem to be compatible. I've never built Trilinos on Windows, but it is supported according to the docs. You might want to email the Trilinos mailing list if you are

Re: Taking Dot Product of faceGrad

2014-01-16 Thread Jane Hung
I'm using PySparse On Jan 15, 2014, at 10:27 PM, Guyer, Jonathan E. Dr. jonathan.gu...@nist.gov wrote: On Jan 14, 2014, at 2:05 PM, Jane Hung jyh...@mit.edu wrote: The vector formulation is still rather slow (much much slower than with just one equation). Is that expected? I'm not sure.

Re: Taking Dot Product of faceGrad

2014-01-16 Thread Guyer, Jonathan E. Dr.
My tests show the coupled variant is actually faster (with Trilinos). As mentioned in ticket 658, the PySparse LU solver uses a lot of memory for this problem (it always uses a lot, but it's particularly high here). It's generally quite fast, but if it needs a substantial fraction of the RAM

Re: Taking Dot Product of faceGrad

2014-01-15 Thread Guyer, Jonathan E. Dr.
On Jan 14, 2014, at 2:05 PM, Jane Hung jyh...@mit.edu wrote: The vector formulation is still rather slow (much much slower than with just one equation). Is that expected? I'm not sure. We'll do some tests. What solver suite are you using? PySparse or Trilinos?

Re: Taking Dot Product of faceGrad

2014-01-14 Thread Jane Hung
Update: The mesh2DCoupled example did work, but I had to change the grid dimensions make it look like the pictures online. However, it's also incredibly slow. I left it running overnight and it only reached elapsed time of about 0.6. It being so slow for a simple system may explain why it can't

Re: Taking Dot Product of faceGrad

2014-01-14 Thread Guyer, Jonathan E. Dr.
Coupled Cahn Hilliard has known problems: http://matforge.org/fipy/ticket/582 I don't know whether the issues described in that ticket are the source of what you're seeing, but it can't help. For your problem, you may want to base what you're doing on the vector formulation in that example. On

Re: Taking Dot Product of faceGrad

2014-01-14 Thread Jane Hung
The vector formulation is still rather slow (much much slower than with just one equation). Is that expected? On Jan 14, 2014 12:10 PM, Guyer, Jonathan E. Dr. jonathan.gu...@nist.gov wrote: Coupled Cahn Hilliard has known problems: http://matforge.org/fipy/ticket/582 I don't know whether the

Re: Taking Dot Product of faceGrad

2014-01-13 Thread Jane Hung
Yes, restricting the time step works. However, whenever I split up the equation (like d(phi)/dt = Xi, Xi= laplacian(phi)), it is never able to run. Also, when I run the Cahn-Hilliard mesh2DCoupled example, the results are that the concentration becomes more and more homogeneous rather than phase

Re: Taking Dot Product of faceGrad

2014-01-11 Thread Guyer, Jonathan E. Dr.
It looks to be stable up to time steps of about 25. You are using the exponentially increasing stepper from our Cahn Hilliard examples, which are unconditionally stable (and we have them top out at 100). Because of the explicit terms in your splitting, you should keep your time steps below the

Re: Taking Dot Product of faceGrad

2014-01-10 Thread Jane Hung
I tried to start with a simpler system, and it seems like I get the same problem if I split up the equations at all. Anyway, I started with a 1 equation system http://pastebin.com/X5tT1RUB and would like to see the phase separation, but after time ~2000 (see the video

Re: Taking Dot Product of faceGrad

2013-12-29 Thread Jane Hung
I'm also getting RuntimeError. To get over this, is there a way to represent the system a different way or does the system itself too complicated? What do you mean by know the answer? I have an idea of what the time evolution of the variables should look like in the 2D case, but I don't have an

Re: Taking Dot Product of faceGrad

2013-12-20 Thread Jane Hung
Now that I've changed it as you mentioned, it says Can't expand MemType 0. What can I do about this? http://pastebin.com/buFS1NRu On Fri, Dec 20, 2013 at 10:24 AM, Daniel Wheeler daniel.wheel...@gmail.comwrote: On Fri, Dec 20, 2013 at 9:13 AM, Jane Hung jyh...@mit.edu wrote: That definitely

Re: Taking Dot Product of faceGrad

2013-12-19 Thread Daniel Wheeler
On Wed, Dec 18, 2013 at 1:37 PM, Jane Hung jyh...@mit.edu wrote: OK, I can write the equations with grad instead of faceGrad, but it doesn't seem like the equations can be solved with what I've tried. I tried to use eq.solve, which gives a TypeError, This could be a FiPy issue if it works with

Re: Taking Dot Product of faceGrad

2013-12-19 Thread Guyer, Jonathan E. Dr.
On Dec 19, 2013, at 12:59 PM, Daniel Wheeler daniel.wheel...@gmail.com wrote: I tried this and the residuals decrease quite a bit. Would you expect the residuals to approach zero at every time step? This seldom happens with non-linear equations. The absolute magnitude of the residuals isn't

Re: Taking Dot Product of faceGrad

2013-12-19 Thread Daniel Wheeler
On Thu, Dec 19, 2013 at 1:33 PM, Guyer, Jonathan E. Dr. jonathan.gu...@nist.gov wrote: Do 4th order diffusion terms even work with coupled? I thought they didn't. You're right, I forgot. So Jane, you'll need to split the equations as I suggested. Your current implementation combining fourth

Re: Taking Dot Product of faceGrad

2013-12-18 Thread Daniel Wheeler
On Mon, Dec 16, 2013 at 4:30 PM, J Hung jyh...@mit.edu wrote: Hi, I'm trying to find the best way to write my equation, which involves not only diffusion terms in terms of two order parameters phi and psi, but also terms like grad(phi) dot grad(laplacian(psi)). Since all these terms are being

Re: Taking Dot Product of faceGrad

2013-12-18 Thread Jane Hung
OK, I can write the equations with grad instead of faceGrad, but it doesn't seem like the equations can be solved with what I've tried. I tried to use eq.solve, which gives a TypeError, and to use sweep, which does not converge in the while loop. I've linked the 2 versions of my code: sweep

Taking Dot Product of faceGrad

2013-12-16 Thread J Hung
Hi, I'm trying to find the best way to write my equation, which involves not only diffusion terms in terms of two order parameters phi and psi, but also terms like grad(phi) dot grad(laplacian(psi)). Since all these terms are being added together, I'm trying to use faceGrad to make terms like