SyFi 0.3
|
#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; |
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().
: StandardFE(p, order) { compute_basis_functions(); }
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.
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.
SyFi::Bubble::__del__ = lambdaself:None; [static, private] |
Reimplemented from SyFi::StandardFE.
tuple SyFi::Bubble::__getattr__ = lambdaself,name:_swig_getattr(self, Bubble, name) [static, private] |
Reimplemented from SyFi::StandardFE.
SyFi::Bubble::__repr__ = _swig_repr [static, private] |
Reimplemented from SyFi::StandardFE.
tuple SyFi::Bubble::__setattr__ = lambdaself,name,value:_swig_setattr(self, Bubble, name, value) [static, private] |
Reimplemented from SyFi::StandardFE.
SyFi::Bubble::__swig_destroy__ = _SyFi.delete_Bubble [static, private] |
Reimplemented from SyFi::StandardFE.
dictionary SyFi::Bubble::__swig_getmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
dictionary SyFi::Bubble::__swig_setmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented from SyFi::StandardFE.