This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Problem with dual-mixed Poisson demo

0 votes

I intended on using fenics/dolfin for an application similar to Darcy flow --- the dual-mixed Poisson demo seems like an excellent place to start. However, I'm running into some issues running the demo. Unfortunately, I don't have VTK installed yet so the visualization stuff isn't working.

Begin with the Poisson demo --- I added the lines:

Array<double> pnt(2);
pnt[0] = 0.25;
pnt[1] = 0.25;

Array<double> val(2);

u.eval(val, pnt);

std::cout << std::endl << pnt << std::endl;
std::cout << val << std::endl << std::endl;

to the end of main.cpp and got the (expected (?)) output:

<Point x = 0.25 y = 0.25 z = 0>
<Point x = 0.154712 y = 0 z = 0>

However, adding the same lines to main.cpp of the dual-mixed Poisson example gives:

<Point x = 0.25 y = 0.25 z = 0>
<Point x = nan y = 0 z = 0>

Does anyone know why I'm getting 'nan'?

asked Sep 28, 2016 by davisad FEniCS Novice (470 points)

Side note: I get the same 'nan' result using the mixed-poisson (not just mixed-poisson-dual).

Did you find a solution to your problem? I am also getting nan after the first Newton iteration for a non-linear mixed problem.

Short answer --- no.

I solved the problem I cared about by using FEniCS's nonlinear solver (basically, tweaking the nonlinear Poission demo to fit my problem). However, I never got the mixed-Poisson or mixed-Poisson-dual demos to work properly.

...