|
From: | Yassine ZAIM |
Subject: | Re: [Getfem-users] Tests with functions which satisfies homogeneous Dirichlet boundary conditions |
Date: | Tue, 22 Mar 2016 16:54:59 +0000 |
Dear Yassine ZAIM,
The test program "Laplacian" solves the problem
- \Delta u = f
+ boundary conditions
where \Delta is the Laplace operator.
The consequence is that the right-hand side has the wrong sign in your _expression_.
Yves.
Le 18/03/2016 17:50, Yassine ZAIM a écrit :
/* exact solution */scalar_type sol_u(const base_node &x) { return (pow(x[0],2) - pow(x[0],1))*pow(x[1],1); }
/* righ hand side */scalar_type sol_f(const base_node &x){ return 2*pow(x[1],1); }
/* gradient of the exact solution */base_small_vector sol_grad(const base_node &x){ base_small_vector res(2);res[0] = (2*pow(x[0],1) - 1)*pow(x[1],1);res[1] = pow(x[0],2) - pow(x[0],1);return res; }
-- Yves Renard (address@hidden) tel : (33) 04.72.43.87.08 Pole de Mathematiques, INSA-Lyon fax : (33) 04.72.43.85.29 20, rue Albert Einstein 69621 Villeurbanne Cedex, FRANCE http://math.univ-lyon1.fr/~renard ---------
[Prev in Thread] | Current Thread | [Next in Thread] |