#include <Bubble.h>
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; |
Proxy of C++ SyFi::Bubble class
Definition at line 12 of file Bubble.h.
SyFi::Bubble::Bubble | ( | ) |
Definition at line 15 of file Bubble.cpp.
References SyFi::StandardFE::description.
00015 : StandardFE() 00016 { 00017 description = "Bubble"; 00018 }
SyFi::Bubble::Bubble | ( | Polygon & | p, | |
unsigned int | order = 3 | |||
) |
Definition at line 20 of file Bubble.cpp.
References compute_basis_functions().
00020 : StandardFE(p, order) 00021 { 00022 compute_basis_functions(); 00023 }
virtual SyFi::Bubble::~Bubble | ( | ) | [inline, virtual] |
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
def SyFi::Bubble::compute_basis_functions | ( | self | ) |
compute_basis_functions(self)
Reimplemented from SyFi::StandardFE.
Definition at line 2620 of file SyFi.py.
02620 : 02621 """compute_basis_functions(self)""" 02622 return _SyFi.Bubble_compute_basis_functions(self) 02623 Bubble_swigregister = _SyFi.Bubble_swigregister
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().
00026 { 00027 00028 // remove previously computed basis functions and dofs 00029 Ns.clear(); 00030 dofs.clear(); 00031 00032 if ( p == NULL ) 00033 { 00034 throw(std::logic_error("You need to set a polygon before the basisfunctions can be computed")); 00035 } 00036 00037 if ( p->str().find("ReferenceLine") != string::npos ) 00038 { 00039 Ns.insert(Ns.end(), x*(1-x)); 00040 description = "Bubble_1D"; 00041 } 00042 else if ( p->str().find("Triangle") != string::npos ) 00043 { 00044 00045 GiNaC::ex b = barycenter_triangle(p->vertex(0), p->vertex(1), p->vertex(2)); 00046 GiNaC::ex N = GiNaC::numeric(1); 00047 for (unsigned int d=0; d< b.nops(); d++) 00048 { 00049 N = N*b.op(d).rhs(); 00050 } 00051 Ns.insert(Ns.end(), N); 00052 00053 description = "Bubble_2D"; 00054 00055 } 00056 else if ( p->str().find("Tetrahedron") != string::npos ) 00057 { 00058 GiNaC::ex b = barycenter_tetrahedron(p->vertex(0), p->vertex(1), 00059 p->vertex(2), p->vertex(3)); 00060 GiNaC::ex N = GiNaC::numeric(1); 00061 for (unsigned int d=0; d< b.nops(); d++) 00062 { 00063 N = N*b.op(d).rhs(); 00064 } 00065 Ns.insert(Ns.end(), N); 00066 00067 description = "Bubble_3D"; 00068 } 00069 00070 // create and insert dof 00071 GiNaC::lst midpoint = GiNaC::lst(); 00072 for (unsigned int d=0; d< p->vertex(1).nops(); d++) 00073 { 00074 midpoint.append(GiNaC::numeric(0)); 00075 } 00076 for (unsigned int i=1; i<= p->no_vertices(); i++) 00077 { 00078 for (unsigned int d=0; d< p->vertex(i-1).nops(); d++) 00079 { 00080 midpoint.let_op(d) += p->vertex(i-1).op(d); 00081 } 00082 } 00083 00084 for (unsigned int d=0; d< p->vertex(1).nops(); d++) 00085 { 00086 midpoint.let_op(d) = midpoint.op(d)/p->no_vertices(); 00087 } 00088 00089 dofs.insert(dofs.end(), midpoint); 00090 }
SyFi::Bubble::__del__ = lambdaself:None; [static, private] |
tuple SyFi::Bubble::__getattr__ = lambdaself,name:_swig_getattr(self, Bubble, name) [static, private] |
SyFi::Bubble::__repr__ = _swig_repr [static, private] |
tuple SyFi::Bubble::__setattr__ = lambdaself,name,value:_swig_setattr(self, Bubble, name, value) [static, private] |
SyFi::Bubble::__swig_destroy__ = _SyFi.delete_Bubble [static, private] |
dictionary SyFi::Bubble::__swig_getmethods__ = {} [static, private] |
dictionary SyFi::Bubble::__swig_setmethods__ = {} [static, private] |