SyFi  0.3
SyFi::SpaceTimeDomain Class Reference

#include <SpaceTimeElement.h>

Inheritance diagram for SyFi::SpaceTimeDomain:
SyFi::Polygon

List of all members.

Public Member Functions

 SpaceTimeDomain (Line &time_line_, Polygon &polygon_)
 SpaceTimeDomain (const SpaceTimeDomain &space_time_domain_)
Polygonget_space_domain () const
Lineget_time_domain () const
virtual unsigned int no_space_dim () const
virtual Line line (unsigned int i) const
virtual GiNaC::ex repr (Repr_format=SUBS_PERFORMED) const
virtual const std::string str () const
virtual GiNaC::ex integrate (GiNaC::ex f, Repr_format format=SUBS_PERFORMED)
virtual SpaceTimeDomaincopy () const

Private Attributes

Linetime_line
Polygonpolygon

Detailed Description

Definition at line 26 of file SpaceTimeElement.h.


Constructor & Destructor Documentation

SyFi::SpaceTimeDomain::SpaceTimeDomain ( Line time_line_,
Polygon polygon_ 
)

Definition at line 27 of file SpaceTimeElement.cpp.

References SyFi::Polygon::copy(), SyFi::Line::copy(), polygon, and time_line.

Referenced by copy().

        {
                time_line = time_line_.copy();
                polygon = polygon_.copy();
        }

Definition at line 38 of file SpaceTimeElement.cpp.

References SyFi::Polygon::copy(), SyFi::Line::copy(), get_space_domain(), get_time_domain(), polygon, and time_line.

        {

                if (time_line)
                {
                        delete time_line;
                }
                if (polygon)
                {
                        delete polygon;
                }

                time_line = domain.get_time_domain().copy();
                polygon   = domain.get_space_domain().copy();
        }

Member Function Documentation

Implements SyFi::Polygon.

Definition at line 33 of file SpaceTimeElement.cpp.

References SpaceTimeDomain().

        {
                return new SpaceTimeDomain(*this);
        }

Definition at line 34 of file SpaceTimeElement.h.

Referenced by SpaceTimeDomain().

{ return *((*polygon).copy()); }

Definition at line 35 of file SpaceTimeElement.h.

Referenced by SpaceTimeDomain().

{ return *((*time_line).copy()); }
GiNaC::ex SyFi::SpaceTimeDomain::integrate ( GiNaC::ex  f,
Repr_format  format = SUBS_PERFORMED 
) [virtual]

Implements SyFi::Polygon.

Definition at line 77 of file SpaceTimeElement.cpp.

References SyFi::Polygon::integrate(), SyFi::Line::integrate(), polygon, SyFi::t, time_line, and SyFi::x.

        {
                GiNaC::ex intf;

                // integrate in space
                intf = polygon->integrate(f, format);

                // integrate in time ((x,y,z) are now integrated away)
                intf = intf.subs( t == x );
                intf = time_line->integrate(intf , format);

                return intf;

        }
Line SyFi::SpaceTimeDomain::line ( unsigned int  i) const [virtual]

Reimplemented from SyFi::Polygon.

Definition at line 64 of file SpaceTimeElement.cpp.

        {
                //FIXME
                // Could use the convention that the time line is the first line, the
                // next lines are the lines in the polygon
                return Line();
        }
unsigned int SyFi::SpaceTimeDomain::no_space_dim ( ) const [virtual]

Implements SyFi::Polygon.

Definition at line 59 of file SpaceTimeElement.cpp.

References SyFi::Polygon::no_space_dim(), and polygon.

        {
                return polygon->no_space_dim() +1;
        }
GiNaC::ex SyFi::SpaceTimeDomain::repr ( Repr_format  format = SUBS_PERFORMED) const [virtual]

Implements SyFi::Polygon.

Definition at line 72 of file SpaceTimeElement.cpp.

References polygon, SyFi::Polygon::repr(), SyFi::Line::repr(), SyFi::t, and time_line.

        {
                return GiNaC::lst(time_line->repr(t, format), polygon->repr(format));
        }
const std::string SyFi::SpaceTimeDomain::str ( ) const [virtual]

Implements SyFi::Polygon.

Definition at line 54 of file SpaceTimeElement.cpp.

References polygon, and SyFi::Polygon::str().

        {
                return "Time" + polygon->str();
        }

Member Data Documentation

Definition at line 28 of file SpaceTimeElement.h.

Referenced by integrate(), repr(), and SpaceTimeDomain().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator