SyFi  0.3
SyFi::Polygon Class Reference

#include <Polygon.h>

Inheritance diagram for SyFi::Polygon:
SyFi::Box SyFi::Line SyFi::Rectangle SyFi::Simplex SyFi::SpaceTimeDomain SyFi::Tetrahedron SyFi::Triangle SyFi::ReferenceBox SyFi::ReferenceLine SyFi::ReferenceRectangle SyFi::ReferenceTetrahedron SyFi::ReferenceTriangle

List of all members.

Public Member Functions

virtual ~Polygon ()
virtual unsigned int no_space_dim () const =0
virtual unsigned int no_vertices () const
virtual GiNaC::ex vertex (unsigned int i) const
virtual GiNaC::ex repr (Repr_format format=SUBS_PERFORMED) const =0
virtual const std::string str () const =0
virtual GiNaC::ex integrate (GiNaC::ex f, Repr_format format=SUBS_PERFORMED)=0
virtual Polygoncopy () const =0
virtual Line line (unsigned int i) const
virtual Triangle triangle (unsigned int i) const
virtual Rectangle rectangle (unsigned int i) const

Protected Member Functions

 Polygon (const std::string &subscript_="", unsigned int no_vert=0)
 Polygon (const Polygon &polygon)

Protected Attributes

std::string subscript
GiNaC::exvector p

Detailed Description

Definition at line 40 of file Polygon.h.


Constructor & Destructor Documentation

SyFi::Polygon::Polygon ( const std::string &  subscript_ = "",
unsigned int  no_vert = 0 
) [protected]
SyFi::Polygon::Polygon ( const Polygon polygon) [protected]

Definition at line 46 of file Polygon.cpp.

References p, and vertex().

                                               :
        subscript(polygon.str()),
                p(polygon.no_vertices())
        {
                for (unsigned int i=0; i<p.size(); i++)
                {
                        p[i] = polygon.vertex(i);
                }
        }
virtual SyFi::Polygon::~Polygon ( ) [inline, virtual]

Definition at line 50 of file Polygon.h.

{}

Member Function Documentation

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

Reimplemented in SyFi::Box, SyFi::Tetrahedron, SyFi::Rectangle, SyFi::Triangle, and SyFi::SpaceTimeDomain.

Definition at line 70 of file Polygon.cpp.

        {
                throw std::logic_error("line not implemented for this polygon subclass");
        }
unsigned int SyFi::Polygon::no_vertices ( ) const [virtual]

Definition at line 56 of file Polygon.cpp.

References p.

Referenced by SyFi::barycenter(), SyFi::Bubble::compute_basis_functions(), SyFi::P0::compute_basis_functions(), main(), and SyFi::Simplex::repr().

        {
                return p.size();
        }
Rectangle SyFi::Polygon::rectangle ( unsigned int  i) const [virtual]

Reimplemented in SyFi::Box.

Definition at line 80 of file Polygon.cpp.

        {
                throw std::logic_error("rectangle not implemented for this polygon subclass");
        }
Triangle SyFi::Polygon::triangle ( unsigned int  i) const [virtual]

Reimplemented in SyFi::Tetrahedron.

Definition at line 75 of file Polygon.cpp.

        {
                throw std::logic_error("triangle not implemented for this polygon subclass");
        }

Member Data Documentation


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