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 21 of file fe_ex1.cpp.

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

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

void usage FE fe  ) 
 

Definition at line 5 of file fe_ex1.cpp.

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

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


Generated on Mon Jan 9 18:08:08 2006 for SyFi by  doxygen 1.4.4