SyFi 0.3
|
00001 // Copyright (C) 2006-2009 Kent-Andre Mardal and Simula Research Laboratory. 00002 // Licensed under the GNU GPL Version 2, or (at your option) any later version. 00003 00004 #ifndef TIMEELEMENT_IS_INCLUDED 00005 #define TIMEELEMENT_IS_INCLUDED 00006 00007 #include "FE.h" 00008 00009 namespace SyFi 00010 { 00011 00012 class SpaceTimeDomain : public Polygon 00013 { 00014 Line* time_line; 00015 Polygon* polygon; 00016 public: 00017 SpaceTimeDomain(Line& time_line_, Polygon& polygon_); 00018 SpaceTimeDomain(const SpaceTimeDomain& space_time_domain_); 00019 00020 Polygon& get_space_domain() const { return *((*polygon).copy()); } 00021 Line& get_time_domain() const { return *((*time_line).copy()); } 00022 00023 virtual unsigned int no_space_dim() const; 00024 00025 virtual Line line(unsigned int i) const; 00026 00027 virtual GiNaC::ex repr(Repr_format = SUBS_PERFORMED) const; 00028 virtual const std::string str() const; 00029 00030 virtual GiNaC::ex integrate(GiNaC::ex f, Repr_format format = SUBS_PERFORMED); 00031 00032 virtual SpaceTimeDomain* copy() const; 00033 }; 00034 00035 class SpaceTimeElement : public StandardFE 00036 { 00037 int order; 00038 Line* time_line; 00039 StandardFE* fe; 00040 00041 public: 00042 SpaceTimeElement(); 00043 SpaceTimeElement(Line* time_line_, unsigned int order_, StandardFE* fe_); 00044 virtual ~SpaceTimeElement() {} 00045 00046 void set_time_domain(Line* line); 00047 void set_order_in_time(unsigned int order); 00048 void set_spatial_element(StandardFE* fe); 00049 virtual void compute_basis_functions(); 00050 }; 00051 00052 } // namespace SyFi 00053 #endif