Ok, yes that makes it work in both cases.  Thanks for taking a look at it.

Dave

On Sep 2, 2013, at 1:54 AM, Martin Sandve Alnæs <[email protected]> wrote:

> It's a bug in tensor representation. As a temporary fix, try setting:
>   parameters["form_compiler"]["representation"] = "quadrature"
> at the top to disable tensor representation.
> 
> Martin
> 
> 
> 
> On 2 September 2013 10:26, Cotter, Colin J <[email protected]> 
> wrote:
> Hi Dave,
>   This term can't be integrated exactly because it is not polynomial, so my 
> first guess would be that different quadrature rules are used for those two 
> different expressions (if you don't suggest a quadrature rule then FFC tries 
> to guess one from the expression). Try fixing the quadrature rule in that 
> term and see if the results are still different.
> 
> all the best
> --Colin
> From: [email protected] [[email protected]] on 
> behalf of David Bernstein [[email protected]]
> Sent: 01 September 2013 20:35
> To: [email protected]
> Subject: [FEniCS] Question about nonlinear problem
> 
> Hi Everyone, Recently I wrote a fenics python code for solving a nonlinear 
> advection diffusion equation which worked very well.  However, I came across 
> one issue which I couldn't resolve and which is illustrated by the attached 
> code (simpler than original project but still seems to contain the problem).
> 
> The example problem is identical to the one described here
> 
> http://fenicsproject.org/documentation/tutorial/nonlinear.html
> 
> except that the nonlinear term q(u) is (1-u)^(-2), i.e., the PDE is
> 
> grad(grad(u)/(1-u)^2) = -f
> 
> The attached code gives different results if q is written as "(1-u)**(-2)" 
> and "(1/(1-u))**2".  Is there a reason for this?  I would have thought they 
> should be equivalent.
> 
> Thanks,
> Dave
> 
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
> 
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics
> 
> 
> _______________________________________________
> fenics mailing list
> [email protected]
> http://fenicsproject.org/mailman/listinfo/fenics

_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to