I think the more direct approach is to edit the numpy array qb.dat.data.

E.g. something like qb.dat.data[np.isnan(qb.dat.data)] = 0

On 17 June 2016 at 03:52, Francis Poulin <fpoulin@uwaterloo.ca> wrote:
Hello,

I want to define an initial condition for a field that I am pretty sure will have nan's.  It does in python so I'm pretty sure that it will in firedrake as well.

In python I know how to remove that nan's by doing the following.

qb[np.isnan(qb)] = 0.

Is there a way of doing this in firedrake?

Cheers, Francis


------------------
Francis Poulin                    
Associate Professor
Department of Applied Mathematics
University of Waterloo

email:           fpoulin@uwaterloo.ca
Web:            https://uwaterloo.ca/poulin-research-group/
Telephone:  +1 519 888 4567 x32637