On Wed, Oct 8, 2008 at 5:53 PM, Angus Hendrick <[EMAIL PROTECTED]>wrote:

> Thanks much for that, it was very helpful.  I'll proceed to update fipy and
> numpy in an organized fashion and make sure I don't break anything.  I
> believe PyAMG requires svn versions of numpy, so probably not ready for
> prime time.  However, my my impression is that it is a black-box solver
> system (suitable for people like me), as opposed to PyTrillinos which from
> the reading I've done seems to require a little more careful handling and
> setup.  I'd be interested to hear how challenging it is to get up and
> running with PyTrillinos.
>

PyTrilinos is also a black-box system as far as fipy is concerned. It can be
a pain to install, but that is getting better.
Once it is installed correctly, running a script with the "--Trilinos" flag
will set the solvers to use trilinos instead of pysparse.

It is probably the case that PyAMG is using the scipy sparse matrices. We
probably need to set up fipy so it can use the sparse tools in scipy and
then move onto PyAMG after that.


>
> Retreating to more mundane topics, I'm solving the heat equation on a grid
> of discontinuous conductivities.  Though I initially thought of the problem
> as having a conductivity in every cell, I realized that this is only a
> "shadow" of the problem as it is solved by FiPy, since the cell variables
> are converted to face variables.  To make sure I had control over this
> process, I went ahead and explicitly created a FaceVariable conductivity and
> used the getHarmonicFaceValue (vice getArithmeticFaceValue) to convert my
> CellVariable conductivities into the appropriate FaceVariable values.
>

Why are you explicitly creating a FaceVariable? The method
getHarmonicFaceValue will return a FaceVariable that updates itself whenever
the CellVariable values change. Everything is updated implicitly.


>
> Based on how the solver is thinking about the problem, I've concluded that
> the right way to visualize the results is by plotting big dots whose colors
> correspond to temperatures at the cell centers, and then connect the dots by
> lines whose widths are proportional to the conductivities between the
> cells.  My question is this:  since i'm using a rectangular non-square mesh,
> do I need to adjust the face values I stored by some geometric parameter to
> get the right conductivities for my visualization?
>

I'm a little confused. Let me get it straight. You are solving the heat
equation on a regular square or rectangular mesh. Correct? You want to plot
dots with color at the cell centers. You then want to drawlines between cell
centers with widths that are proportional to the size of the conductivities
at the faces. One thing is that it might be nicer to make the length of the
lines proportional to the conductivity. In answer to your question, the
conductivity at the faces is correct as calculated by getHarmonicFaceValues
so I'm not sure why that needs to be modified.

-- 
Daniel Wheeler

Reply via email to