SyFi 0.3
SyFi::Bubble Class Reference

#include <Bubble.h>

Inheritance diagram for SyFi::Bubble:
SyFi::StandardFE SyFi::StandardFE SyFi::FE SyFi::FE SyFi::FE SyFi::FE SyFi::_object SyFi::_object SyFi::_object SyFi::_object

List of all members.

Public Member Functions

 Bubble ()
 Bubble (Polygon &p, unsigned int order=3)
virtual ~Bubble ()
virtual void compute_basis_functions ()
def __init__
def compute_basis_functions

Public Attributes

 this

Static Private Attributes

dictionary __swig_setmethods__ = {}
tuple __setattr__ = lambdaself,name,value:_swig_setattr(self, Bubble, name, value)
dictionary __swig_getmethods__ = {}
tuple __getattr__ = lambdaself,name:_swig_getattr(self, Bubble, name)
 __repr__ = _swig_repr
 __swig_destroy__ = _SyFi.delete_Bubble
 __del__ = lambdaself:None;

Detailed Description

Proxy of C++ SyFi::Bubble class

Definition at line 12 of file Bubble.h.


Constructor & Destructor Documentation

SyFi::Bubble::Bubble ( )

Definition at line 15 of file Bubble.cpp.

References SyFi::StandardFE::description.

                      : StandardFE()
        {
                description = "Bubble";
        }
SyFi::Bubble::Bubble ( Polygon p,
unsigned int  order = 3 
)

Definition at line 20 of file Bubble.cpp.

References compute_basis_functions().

virtual SyFi::Bubble::~Bubble ( ) [inline, virtual]

Definition at line 17 of file Bubble.h.

{}
def SyFi::Bubble::__init__ (   self,
  args 
)
__init__(self) -> Bubble
__init__(self, Polygon p, unsigned int order = 3) -> Bubble
__init__(self, Polygon p) -> Bubble

Reimplemented from SyFi::StandardFE.

Definition at line 2609 of file SyFi.py.

02609                              : 
02610         """
02611         __init__(self) -> Bubble
02612         __init__(self, Polygon p, unsigned int order = 3) -> Bubble
02613         __init__(self, Polygon p) -> Bubble
02614         """
02615         this = _SyFi.new_Bubble(*args)
02616         try: self.this.append(this)
02617         except: self.this = this

Member Function Documentation

void SyFi::Bubble::compute_basis_functions ( ) [virtual]

Reimplemented from SyFi::StandardFE.

Definition at line 25 of file Bubble.cpp.

References SyFi::barycenter_tetrahedron(), SyFi::barycenter_triangle(), SyFi::StandardFE::description, SyFi::StandardFE::dofs, SyFi::StandardFE::N(), SyFi::Polygon::no_vertices(), SyFi::StandardFE::Ns, SyFi::StandardFE::p, SyFi::Polygon::str(), SyFi::Polygon::vertex(), and SyFi::x.

Referenced by Bubble().

        {

                // remove previously computed basis functions and dofs
                Ns.clear();
                dofs.clear();

                if ( p == NULL )
                {
                        throw(std::logic_error("You need to set a polygon before the basisfunctions can be computed"));
                }

                if ( p->str().find("ReferenceLine") != string::npos )
                {
                        Ns.insert(Ns.end(), x*(1-x));
                        description = "Bubble_1D";
                }
                else if ( p->str().find("Triangle") != string::npos )
                {

                        GiNaC::ex b = barycenter_triangle(p->vertex(0), p->vertex(1), p->vertex(2));
                        GiNaC::ex N = GiNaC::numeric(1);
                        for (unsigned int d=0; d< b.nops(); d++)
                        {
                                N = N*b.op(d).rhs();
                        }
                        Ns.insert(Ns.end(), N);

                        description = "Bubble_2D";

                }
                else if ( p->str().find("Tetrahedron") != string::npos )
                {
                        GiNaC::ex b = barycenter_tetrahedron(p->vertex(0), p->vertex(1),
                                p->vertex(2), p->vertex(3));
                        GiNaC::ex N = GiNaC::numeric(1);
                        for (unsigned int d=0; d< b.nops(); d++)
                        {
                                N = N*b.op(d).rhs();
                        }
                        Ns.insert(Ns.end(), N);

                        description = "Bubble_3D";
                }

                // create and insert dof
                GiNaC::lst midpoint = GiNaC::lst();
                for (unsigned int d=0; d< p->vertex(1).nops(); d++)
                {
                        midpoint.append(GiNaC::numeric(0));
                }
                for (unsigned int i=1; i<= p->no_vertices(); i++)
                {
                        for (unsigned int d=0; d< p->vertex(i-1).nops(); d++)
                        {
                                midpoint.let_op(d)  += p->vertex(i-1).op(d);
                        }
                }

                for (unsigned int d=0; d< p->vertex(1).nops(); d++)
                {
                        midpoint.let_op(d)  = midpoint.op(d)/p->no_vertices();
                }

                dofs.insert(dofs.end(), midpoint);
        }
def SyFi::Bubble::compute_basis_functions (   self)
compute_basis_functions(self)

Reimplemented from SyFi::StandardFE.

Definition at line 2620 of file SyFi.py.

02621                                      :
02622         """compute_basis_functions(self)"""
02623         return _SyFi.Bubble_compute_basis_functions(self)


Member Data Documentation

SyFi::Bubble::__del__ = lambdaself:None; [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2619 of file SyFi.py.

tuple SyFi::Bubble::__getattr__ = lambdaself,name:_swig_getattr(self, Bubble, name) [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2607 of file SyFi.py.

SyFi::Bubble::__repr__ = _swig_repr [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2608 of file SyFi.py.

tuple SyFi::Bubble::__setattr__ = lambdaself,name,value:_swig_setattr(self, Bubble, name, value) [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2604 of file SyFi.py.

SyFi::Bubble::__swig_destroy__ = _SyFi.delete_Bubble [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2618 of file SyFi.py.

dictionary SyFi::Bubble::__swig_getmethods__ = {} [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2605 of file SyFi.py.

dictionary SyFi::Bubble::__swig_setmethods__ = {} [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2602 of file SyFi.py.

Reimplemented from SyFi::StandardFE.

Definition at line 2613 of file SyFi.py.


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