getfem-users
[Top][All Lists]
Advanced

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

[Getfem-users] Tests with functions which satisfies homogeneous Dirichle


From: Yassine ZAIM
Subject: [Getfem-users] Tests with functions which satisfies homogeneous Dirichlet boundary conditions
Date: Fri, 18 Mar 2016 16:50:33 +0000

Hello everyone,
I want know if some one has been trying already to change the exact solution, and the second member to a polynomes. I want make a test with a function which satisfies the homogeneous Dirichlet boundary conditions. 
So for exemple, for the Laplacian problem, N=2 dimensions, I make :

/* 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; }

But with these functions I can't find the good result, and the good order of convergence, I found the error : 
L2 error = 0.1676465135960112
H1 error = 0.6176167218760237
Linfty error = 0.3381665840490764
The same problem for the elastostatic problem also.
Thank you, in advance for your help.
 ​
--
ZAIM Yassine 
PhD Student in Applied Mathematics


reply via email to

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