SyFi
0.3
|
00001 // Copyright (C) 2006-2009 Kent-Andre Mardal and Simula Research Laboratory 00002 // 00003 // This file is part of SyFi. 00004 // 00005 // SyFi is free software: you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation, either version 2 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // SyFi is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with SyFi. If not, see <http://www.gnu.org/licenses/>. 00017 00018 #ifndef LAGRANGEFE_IS_INCLUDED 00019 #define LAGRANGEFE_IS_INCLUDED 00020 00021 #include "FE.h" 00022 00023 namespace SyFi 00024 { 00025 00026 class Lagrange : public StandardFE 00027 { 00028 public: 00029 Lagrange(); 00030 Lagrange(Polygon& p, unsigned int order = 1); 00031 virtual ~Lagrange() {} 00032 00033 virtual void compute_basis_functions(); 00034 }; 00035 00036 class VectorLagrange : public StandardFE 00037 { 00038 protected: 00039 unsigned int size; 00040 public: 00041 VectorLagrange(); 00042 VectorLagrange(Polygon& p, unsigned int order = 1, unsigned int size = 0); 00043 ~VectorLagrange() {} 00044 00045 virtual void set_size(unsigned int size_); 00046 virtual void compute_basis_functions(); 00047 }; 00048 00049 class TensorLagrange : public StandardFE 00050 { 00051 protected: 00052 unsigned int size; 00053 public: 00054 TensorLagrange(); 00055 TensorLagrange(Polygon& p, unsigned int order = 1, unsigned int size = 0); 00056 ~TensorLagrange() {} 00057 00058 virtual void set_size(unsigned int size_); 00059 virtual void compute_basis_functions(); 00060 }; 00061 00062 GiNaC::ex lagrange(unsigned int order, Polygon& p, const std::string & a); 00063 GiNaC::lst lagrangev(unsigned int no_fields, unsigned int order, Polygon& p, const std::string & a); 00064 00065 } // namespace SyFi 00066 #endif