SyFi 0.3
|
#include <P0.h>
Public Member Functions | |
TensorP0 () | |
TensorP0 (Polygon &p, unsigned int order=0, unsigned int size=0) | |
~TensorP0 () | |
virtual void | set_size (unsigned int size_) |
virtual void | compute_basis_functions () |
def | __init__ |
def | set_size |
def | compute_basis_functions |
Public Attributes | |
this | |
Protected Attributes | |
unsigned int | size |
Static Private Attributes | |
dictionary | __swig_setmethods__ = {} |
tuple | __setattr__ = lambdaself,name,value:_swig_setattr(self, TensorP0, name, value) |
dictionary | __swig_getmethods__ = {} |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, TensorP0, name) |
__repr__ = _swig_repr | |
__swig_destroy__ = _SyFi.delete_TensorP0 | |
__del__ = lambdaself:None; |
SyFi::TensorP0::TensorP0 | ( | ) |
Definition at line 136 of file P0.cpp.
References SyFi::StandardFE::description.
: StandardFE() { description = "TensorP0"; }
SyFi::TensorP0::TensorP0 | ( | Polygon & | p, |
unsigned int | order = 0 , |
||
unsigned int | size = 0 |
||
) |
Definition at line 141 of file P0.cpp.
References compute_basis_functions(), SyFi::nsd, and size.
: StandardFE(p, order) { size = size_ < 0 ? nsd: size_; compute_basis_functions(); }
def SyFi::TensorP0::__init__ | ( | self, | |
args | |||
) |
__init__(self) -> TensorP0 __init__(self, Polygon p, unsigned int order = 0, unsigned int size = 0) -> TensorP0 __init__(self, Polygon p, unsigned int order = 0) -> TensorP0 __init__(self, Polygon p) -> TensorP0
Reimplemented from SyFi::StandardFE.
Definition at line 2393 of file SyFi.py.
02393 : 02394 """ 02395 __init__(self) -> TensorP0 02396 __init__(self, Polygon p, unsigned int order = 0, unsigned int size = 0) -> TensorP0 02397 __init__(self, Polygon p, unsigned int order = 0) -> TensorP0 02398 __init__(self, Polygon p) -> TensorP0 02399 """ 02400 this = _SyFi.new_TensorP0(*args) 02401 try: self.this.append(this) 02402 except: self.this = this
void SyFi::TensorP0::compute_basis_functions | ( | ) | [virtual] |
Reimplemented from SyFi::StandardFE.
Definition at line 147 of file P0.cpp.
References SyFi::StandardFE::description, SyFi::StandardFE::dof(), SyFi::StandardFE::dofs, demos::crouzeixraviart::fe, SyFi::StandardFE::N(), SyFi::StandardFE::nbf(), SyFi::StandardFE::Ns, SyFi::StandardFE::p, run::s, size, and SyFi::StandardFE::str().
Referenced by TensorP0().
{ // 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 ( size == 0) { throw(std::logic_error("You need to set the size of the vector before the basisfunctions can be computed")); } P0 fe(*p); GiNaC::lst zero_list; for (unsigned int s=1; s<= size*size ; s++) { zero_list.append(0); } for (unsigned int i=0; i< fe.nbf() ; i++) { for (unsigned int r=0; r< size ; r++) { for (unsigned int s=0; s< size ; s++) { GiNaC::lst Nis = zero_list; Nis.let_op((size)*r + s) = fe.N(i); GiNaC::ex Nmat = GiNaC::matrix(size,size,Nis); Ns.insert(Ns.end(), Nmat); GiNaC::lst dof = GiNaC::lst(fe.dof(i), r, s) ; dofs.insert(dofs.end(), dof); } } } description = "Tensor" + fe.str(); }
def SyFi::TensorP0::compute_basis_functions | ( | self | ) |
compute_basis_functions(self)
Reimplemented from SyFi::StandardFE.
def SyFi::TensorP0::set_size | ( | self, | |
args | |||
) |
void SyFi::TensorP0::set_size | ( | unsigned int | size_ | ) | [virtual] |
SyFi::TensorP0::__del__ = lambdaself:None; [static, private] |
Reimplemented from SyFi::StandardFE.
tuple SyFi::TensorP0::__getattr__ = lambdaself,name:_swig_getattr(self, TensorP0, name) [static, private] |
Reimplemented from SyFi::StandardFE.
SyFi::TensorP0::__repr__ = _swig_repr [static, private] |
Reimplemented from SyFi::StandardFE.
tuple SyFi::TensorP0::__setattr__ = lambdaself,name,value:_swig_setattr(self, TensorP0, name, value) [static, private] |
Reimplemented from SyFi::StandardFE.
SyFi::TensorP0::__swig_destroy__ = _SyFi.delete_TensorP0 [static, private] |
Reimplemented from SyFi::StandardFE.
dictionary SyFi::TensorP0::__swig_getmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
dictionary SyFi::TensorP0::__swig_setmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
unsigned int SyFi::TensorP0::size [protected] |
Definition at line 38 of file P0.h.
Referenced by compute_basis_functions(), set_size(), and TensorP0().
Reimplemented from SyFi::StandardFE.