On Wed, Jun 10, 2009 at 8:55 AM, Mike Atkins<[email protected]> wrote:
>
>
> On Wed, Jun 10, 2009 at 2:51 AM, david wende <[email protected]> wrote:
>>
>> What do you mean by rank-0 variable? I have seen the term (and rank-1)
>> in the fipy manual but not any explanation as to its meaning.
>
> By default a CellVariable is rank-0. Essentially rank-0 means that the
> variable is scalar valued over the mesh. In order to make a source term, you
> need to use a rank-0 CellVariable.

By rank we mean <http://en.wikipedia.org/wiki/Tensor#Tensor_rank>.
Probably need a more explicit description of Variables in the manual.

>> Is there a way (during the solve loop) of observing the error?
>
> I'm not quite sure what you mean by this, but if you read section 5.3 of the
> fipy manual you might get some idea of what to do.

You might want something like this

while res > 1e-3:
   res = eqn.sweep(var, dt=dt)

sweep() (used instead of solve()) returns the unnormalized L2
residual. You can use this to determine number of sweeps and time
steps etc.

Cheers

-- 
Daniel Wheeler

Reply via email to