fe_ex1.cpp File Reference

#include <SyFi.h>

Go to the source code of this file.

Functions

void usage (FE &fe)
int main ()


Function Documentation

int main  ) 
 

Definition at line 19 of file fe_ex1.cpp.

References LagrangeFE::compute_basis_functions(), LagrangeFE::set(), and usage().

00019           { 
00020   int order = 2; 
00021   Triangle triangle(lst(0,0), lst(1,0), lst(0,1));   
00022   LagrangeFE fe; 
00023   fe.set(order); 
00024   fe.set(triangle); 
00025   fe.compute_basis_functions(); 
00026 
00027   usage(fe); 
00028 
00029 }

void usage FE fe  ) 
 

Definition at line 3 of file fe_ex1.cpp.

References FE::dof(), grad(), FE::N(), and FE::nbf().

Referenced by main().

00003                    { 
00004   ex Ni; 
00005   ex gradNi; 
00006   ex dofi; 
00007   for (int i=1; i<= fe.nbf() ; i++) { 
00008     Ni = fe.N(i); 
00009     gradNi = grad(Ni); 
00010     dofi = fe.dof(i); 
00011     cout <<"The basis function, N("<<i<<")="<<Ni<<endl; 
00012     cout <<"The gradient of N("<<i<<")="<<gradNi<<endl; 
00013     cout <<"The corresponding dof, L("<<i<<")="<<dofi<<endl; 
00014   }
00015 }


Generated on Tue Nov 22 11:10:23 2005 for SyFi by  doxygen 1.4.4