SyFi  0.3
SpaceTimeElement.h
Go to the documentation of this file.
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 TIMEELEMENT_IS_INCLUDED
00019 #define TIMEELEMENT_IS_INCLUDED
00020 
00021 #include "FE.h"
00022 
00023 namespace SyFi
00024 {
00025 
00026         class SpaceTimeDomain : public Polygon
00027         {
00028                 Line* time_line;
00029                 Polygon* polygon;
00030                 public:
00031                         SpaceTimeDomain(Line& time_line_, Polygon& polygon_);
00032                         SpaceTimeDomain(const SpaceTimeDomain& space_time_domain_);
00033 
00034                         Polygon& get_space_domain() const { return *((*polygon).copy()); }
00035                         Line& get_time_domain() const { return *((*time_line).copy()); }
00036 
00037                         virtual unsigned int no_space_dim() const;
00038 
00039                         virtual Line line(unsigned int i) const;
00040 
00041                         virtual GiNaC::ex repr(Repr_format = SUBS_PERFORMED) const;
00042                         virtual const std::string str() const;
00043 
00044                         virtual GiNaC::ex integrate(GiNaC::ex f, Repr_format format = SUBS_PERFORMED);
00045 
00046                         virtual SpaceTimeDomain* copy() const;
00047         };
00048 
00049         class SpaceTimeElement : public StandardFE
00050         {
00051                 int order;
00052                 Line* time_line;
00053                 StandardFE* fe;
00054 
00055                 public:
00056                         SpaceTimeElement();
00057                         SpaceTimeElement(Line* time_line_, unsigned int order_, StandardFE* fe_);
00058                         virtual ~SpaceTimeElement() {}
00059 
00060                         void set_time_domain(Line* line);
00061                         void set_order_in_time(unsigned int order);
00062                         void set_spatial_element(StandardFE* fe);
00063                         virtual void compute_basis_functions();
00064         };
00065 
00066 }                                                                // namespace SyFi
00067 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator