VectorLagrangeFE Class Reference

#include <LagrangeFE.h>

Inheritance diagram for VectorLagrangeFE:

StandardFE FE VectorDiscontinuousLagrangeFE List of all members.

Public Member Functions

 VectorLagrangeFE ()
 ~VectorLagrangeFE ()
virtual void set (int order)
virtual void set (Polygon &p)
virtual void set_size (int size_)
virtual void compute_basis_functions ()
virtual int nbf ()
virtual GiNaC::ex N (int i)
virtual GiNaC::ex dof (int i)

Protected Attributes

int size

Detailed Description

Definition at line 25 of file LagrangeFE.h.


Constructor & Destructor Documentation

VectorLagrangeFE::VectorLagrangeFE  )  [inline]
 

Definition at line 29 of file LagrangeFE.h.

00029 {}

VectorLagrangeFE::~VectorLagrangeFE  )  [inline]
 

Definition at line 30 of file LagrangeFE.h.

00030 {}


Member Function Documentation

void VectorLagrangeFE::compute_basis_functions  )  [virtual]
 

Reimplemented from StandardFE.

Reimplemented in VectorDiscontinuousLagrangeFE.

Definition at line 246 of file LagrangeFE.cpp.

References LagrangeFE::compute_basis_functions(), LagrangeFE::dof(), dof(), StandardFE::dofs, LagrangeFE::N(), LagrangeFE::nbf(), StandardFE::Ns, StandardFE::order, StandardFE::p, LagrangeFE::set(), and size.

Referenced by VectorDiscontinuousLagrangeFE::compute_basis_functions(), and main().

00246                                                 {
00247 
00248   if ( order < 1 ) {
00249     cout <<"Lagrangian elements must be of order 1 or higher."<<endl; 
00250     return; 
00251   }
00252 
00253 
00254   if ( p == NULL ) {
00255     cout <<"You need to set a polygon before the basisfunctions can be computed"<<endl; 
00256     return; 
00257   }
00258  
00259   LagrangeFE fe; 
00260   fe.set(order); 
00261   fe.set(*p); 
00262   fe.compute_basis_functions(); 
00263   GiNaC::lst zero_list; 
00264   for (int s=1; s<= size ; s++) {
00265     zero_list.append(0);  
00266   }
00267 
00268   for (int i=0; i< fe.nbf() ; i++) {
00269     for (int s=0; s< size ; s++) {
00270       GiNaC::lst Nis = zero_list;    
00271       Nis.let_op(s) = fe.N(i); 
00272       GiNaC::ex Nmat = GiNaC::matrix(size,1,Nis);
00273       Ns.insert(Ns.end(), Nmat);  
00274 
00275       GiNaC::lst dof = GiNaC::lst(fe.dof(i), s) ; 
00276       dofs.insert(dofs.end(), dof);  
00277     }
00278   }
00279 }

GiNaC::ex VectorLagrangeFE::dof int  i  )  [virtual]
 

Reimplemented from StandardFE.

Reimplemented in VectorDiscontinuousLagrangeFE.

Definition at line 297 of file LagrangeFE.cpp.

References StandardFE::dof().

Referenced by compute_basis_functions().

00297                                     {
00298   return StandardFE::dof(i);  
00299 }

GiNaC::ex VectorLagrangeFE::N int  i  )  [virtual]
 

Reimplemented from StandardFE.

Reimplemented in VectorDiscontinuousLagrangeFE.

Definition at line 302 of file LagrangeFE.cpp.

References StandardFE::N().

Referenced by VectorDiscontinuousLagrangeFE::N().

00302                                  {  
00303   return StandardFE::N(i); 
00304 }

int VectorLagrangeFE::nbf  )  [virtual]
 

Reimplemented from StandardFE.

Reimplemented in VectorDiscontinuousLagrangeFE.

Definition at line 242 of file LagrangeFE.cpp.

References StandardFE::nbf().

Referenced by VectorDiscontinuousLagrangeFE::nbf().

00242                            {
00243   return StandardFE::nbf();       
00244 }

void VectorLagrangeFE::set Polygon p  )  [virtual]
 

Reimplemented from StandardFE.

Reimplemented in VectorDiscontinuousLagrangeFE.

Definition at line 287 of file LagrangeFE.cpp.

References StandardFE::set().

00287                                        {
00288   StandardFE::set(p_); 
00289 }

void VectorLagrangeFE::set int  order  )  [virtual]
 

Reimplemented from StandardFE.

Reimplemented in VectorDiscontinuousLagrangeFE.

Definition at line 292 of file LagrangeFE.cpp.

References StandardFE::set().

Referenced by main().

00292                                       { 
00293   StandardFE::set(order_); 
00294 }

void VectorLagrangeFE::set_size int  size_  )  [virtual]
 

Reimplemented in VectorDiscontinuousLagrangeFE.

Definition at line 282 of file LagrangeFE.cpp.

References size.

Referenced by main(), and VectorDiscontinuousLagrangeFE::set_size().

00282                                           {
00283   size = size_; 
00284 }


Member Data Documentation

int VectorLagrangeFE::size [protected]
 

Definition at line 27 of file LagrangeFE.h.

Referenced by compute_basis_functions(), and set_size().


The documentation for this class was generated from the following files:
Generated on Tue Jun 13 13:18:43 2006 for SyFi by  doxygen 1.4.4