Hello,

I have a regular 2D Cartesian uniformly spaced mesh.

Due to some peculiarities of the physical system that I am currently working 
with, the variable of interest in one of my PDEs, (fiPy CellVariable), is 
undefined in certain interior node locations, i.e. we need to constrain them to 
a value of float('nan'), when solving this PDE.

It is not satisfactory to merely constrain them to have a value of 0.0 in these 
interior co-ordinates, because a) It is physically inaccurate since the values 
are not defined here and b) Because we need to couple this PDE to other PDEs, 
the incorrect 0.0 values will propagate to other PDEs, thereby 
polluting/corrupting their solutions too.  And hence, the full system of


However, the following code snippet was deemed to be illegal when I tried it 
out, since FiPy was checking for cellvariables to be strictly numeric (got a 
value < eps error)

phi.constrain(float('nan'),mesh.y<=1.5)



How else can we enforce NaNs in these interior nodes in FiPy ?



Best Regards,

Krishna


_______________________________________________
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