P0 Class Reference

#include <P0.h>

Inheritance diagram for P0:

StandardFE FE List of all members.

Public Member Functions

 P0 ()
 ~P0 ()
virtual void compute_basis_functions ()

Detailed Description

Definition at line 6 of file P0.h.


Constructor & Destructor Documentation

P0::P0  )  [inline]
 

Definition at line 8 of file P0.h.

00008 {}

P0::~P0  )  [inline]
 

Definition at line 9 of file P0.h.

00009 {}


Member Function Documentation

void P0::compute_basis_functions  )  [virtual]
 

Reimplemented from StandardFE.

Definition at line 3 of file P0.cpp.

References StandardFE::dofs, Polygon::no_vertices(), StandardFE::Ns, StandardFE::p, and Polygon::vertex().

Referenced by main().

00003                                   {
00004   // insert basis function
00005   Ns.insert(Ns.end(), GiNaC::numeric(1)); 
00006 
00007   // create and insert dof
00008   GiNaC::ex midpoint; 
00009   for (int i=1; i<= p->no_vertices(); i++) {   
00010     midpoint += p->vertex(i-1);
00011   }
00012   midpoint /= p->no_vertices(); 
00013   dofs.insert(dofs.end(), midpoint); 
00014 }


The documentation for this class was generated from the following files:
Generated on Mon Jan 9 18:08:09 2006 for SyFi by  doxygen 1.4.4