DiscontinuousLagrangeFE.cpp

Go to the documentation of this file.
00001 #include "DiscontinuousLagrangeFE.h"
00002 #include "ElementComputations.h"
00003 
00004 DiscontinuousLagrangeFE:: DiscontinuousLagrangeFE() : LagrangeFE() {
00005   element = 0; 
00006 }
00007 
00008 int DiscontinuousLagrangeFE:: nbf() {
00009   return StandardFE::nbf();       
00010 }
00011 
00012 void DiscontinuousLagrangeFE:: compute_basis_functions() { 
00013 
00014   if ( order < 1 ) {
00015     cout <<"Discontinuous Lagrangian elements must be of order 1 or higher."<<endl; 
00016     return; 
00017   }
00018 
00019 
00020   if ( p == NULL ) {
00021     cout <<"You need to set a polygon before the basisfunctions can be computed"<<endl; 
00022     return; 
00023   }
00024  
00025 
00026   LagrangeFE:: compute_basis_functions(); 
00027   for (int i=0; i< dofs.size(); i++) { 
00028     dofs[i] = GiNaC::lst(dofs[i], element); 
00029   }
00030 }
00031 
00032 
00033 
00034 void DiscontinuousLagrangeFE:: set(Polygon& p_) {
00035   StandardFE::set(p_); 
00036 }
00037 
00038 void DiscontinuousLagrangeFE:: set_element_number(int element_) {
00039   element = element_; 
00040 }
00041 
00042 void DiscontinuousLagrangeFE:: set(int order_) { 
00043   StandardFE::set(order_); 
00044 }
00045 
00046 
00047 GiNaC::ex DiscontinuousLagrangeFE:: dof(int i) {
00048   return StandardFE::dof(i);  
00049 }
00050 
00051 
00052 GiNaC::ex DiscontinuousLagrangeFE::N(int i) {  
00053   return StandardFE::N(i); 
00054 }
00055 
00056 // ------------VectorDiscontinuousLagrangeFE --- 
00057 
00058 VectorDiscontinuousLagrangeFE:: VectorDiscontinuousLagrangeFE() : 
00059         VectorLagrangeFE() {
00060   element = 0; 
00061 }
00062 
00063 
00064 int VectorDiscontinuousLagrangeFE:: nbf() {
00065   return VectorLagrangeFE::nbf();       
00066 }
00067 
00068 void VectorDiscontinuousLagrangeFE:: compute_basis_functions(){ 
00069 
00070   VectorLagrangeFE:: compute_basis_functions(); 
00071 
00072   for (int i=0; i< dofs.size(); i++) { 
00073     dofs[i] = GiNaC::lst(dofs[i], element); 
00074   }
00075 
00076 }
00077 
00078 
00079 void VectorDiscontinuousLagrangeFE:: set_size(int size_) {
00080   VectorLagrangeFE::set_size(size_);  
00081 }
00082 
00083 
00084 void VectorDiscontinuousLagrangeFE:: set(Polygon& p_) {
00085   StandardFE::set(p_); 
00086 }
00087 
00088 
00089 void VectorDiscontinuousLagrangeFE:: set(int order_) { 
00090   StandardFE::set(order_); 
00091 }
00092 
00093 
00094 GiNaC::ex VectorDiscontinuousLagrangeFE:: dof(int i) {
00095   return StandardFE::dof(i);  
00096 }
00097 
00098 
00099 GiNaC::ex VectorDiscontinuousLagrangeFE::N(int i) {  
00100   return VectorLagrangeFE::N(i); 
00101 }
00102 
00103 void VectorDiscontinuousLagrangeFE:: set_element_number(int element_) {
00104   element = element_; 
00105 }
00106 
00107 
00108 
00109 
00110 

Generated on Tue Jun 13 13:18:38 2006 for SyFi by  doxygen 1.4.4