getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Tests with functions which satisfies homogeneous Diri


From: Yves Renard
Subject: Re: [Getfem-users] Tests with functions which satisfies homogeneous Dirichlet boundary conditions
Date: Tue, 22 Mar 2016 13:03:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0



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

---------

reply via email to

[Prev in Thread] Current Thread [Next in Thread]