* fichier : ipol1.dgibi ************************************************************************ * Section : Mathematiques Fonctions ************************************************************************ * * Fichier DGIBI pour tester l'operateur 'IPOL' avec un nuage * la methode utilisée est celle des éléments finis diffus avec * des polynomes d'ordre 1 * l'interpolation de toutes les fonctions lineaire est donc exacte * opti dime 2 ; * * support géométrique p1 = 0. 0. ; p2 = 0. 1. ; p3 = 1. 1. ; p4 = 1. 0. ; qua1 = manu qua4 p1 p2 p3 p4 ; * * champs argumets chp1 = manu chpo p1 2 'X' 0.26 'Y' 0.26 ; mo1 = modele qua1 mecanique elastique ; chml1 = manu 'CHML' mo1 'X' 0.25 'Y' 0.25 ; * * le nuage stocke la fonction f(x,y)=z=x+y+1 * nua1 = nuage 'X'*'FLOTTANT' 'Y'*'FLOTTANT' 'Z'*'FLOTTANT' 0. 0. 1. 1. 0. 2. 1. 1. 3. 0. 1. 2. 2. 3. 6. 0.5 0.5 2. 1.8 -0.2 2.6 1000. 0. 1001. ; fmax = 1000. ; tol1 = ('VALE' 'PREC') '*' 4. '*' fmax ; 'MESS' 'tol1 =' tol1 ; * * avec un chpoint chpi1 = ipol nua1 chp1 ; * on doit obtenir un chpo constant valant z = 1.52 ; un52 = extr chpi1 p1 'Z' ; si ( (abs (un52 - 1.52)) > tol1 ) ; erreur 'Mauvaise interpolation'; finsi ; * * avec un chamelem chmli1 = ipol nua1 chml1 ; * on doit obtenir un chml constant valant z = 1.5' ; un5 = extr chmli1 'Z' 1 1 1 ; si ( (abs (un5 - 1.5)) > tol1 ) ; erreur 'Mauvaise interpolation'; finsi ; * fin;