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 StandardFE::nbf();       
00066 }
00067 
00068 void VectorDiscontinuousLagrangeFE:: compute_basis_functions(){ 
00069   VectorLagrangeFE:: compute_basis_functions(); 
00070   for (int i=0; i< dofs.size(); i++) { 
00071     dofs[i] = GiNaC::lst(dofs[i], element); 
00072   }
00073 
00074 }
00075 
00076 
00077 void VectorDiscontinuousLagrangeFE:: set_size(int size_) {
00078   size = size_; 
00079 }
00080 
00081 
00082 void VectorDiscontinuousLagrangeFE:: set(Polygon& p_) {
00083   StandardFE::set(p_); 
00084 }
00085 
00086 
00087 void VectorDiscontinuousLagrangeFE:: set(int order_) { 
00088   StandardFE::set(order_); 
00089 }
00090 
00091 
00092 GiNaC::ex VectorDiscontinuousLagrangeFE:: dof(int i) {
00093   return StandardFE::dof(i);  
00094 }
00095 
00096 
00097 GiNaC::ex VectorDiscontinuousLagrangeFE::N(int i) {  
00098   return StandardFE::N(i); 
00099 }
00100 
00101 void VectorDiscontinuousLagrangeFE:: set_element_number(int element_) {
00102   element = element_; 
00103 }
00104 
00105 
00106 
00107 
00108 

Generated on Tue Apr 18 12:00:26 2006 for SyFi by  doxygen 1.4.4