#include <Lagrange.h>
Public Member Functions | |
TensorLagrange () | |
TensorLagrange (Polygon &p, unsigned int order=1, unsigned int size=0) | |
~TensorLagrange () | |
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, TensorLagrange, name, value) |
dictionary | __swig_getmethods__ = {} |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, TensorLagrange, name) |
__repr__ = _swig_repr | |
__swig_destroy__ = _SyFi.delete_TensorLagrange | |
__del__ = lambdaself:None; |
Proxy of C++ SyFi::TensorLagrange class
Definition at line 35 of file Lagrange.h.
SyFi::TensorLagrange::TensorLagrange | ( | ) |
Definition at line 446 of file Lagrange.cpp.
References SyFi::StandardFE::description.
00446 : StandardFE() 00447 { 00448 description = "TensorLagrange"; 00449 }
SyFi::TensorLagrange::TensorLagrange | ( | Polygon & | p, | |
unsigned int | order = 1 , |
|||
unsigned int | size = 0 | |||
) |
Definition at line 451 of file Lagrange.cpp.
References compute_basis_functions(), SyFi::nsd, and size.
00451 : StandardFE(p, order) 00452 { 00453 size = size_ < 0 ? nsd: size_; 00454 compute_basis_functions(); 00455 }
SyFi::TensorLagrange::~TensorLagrange | ( | ) | [inline] |
def SyFi::TensorLagrange::__init__ | ( | self, | ||
args | ||||
) |
__init__(self) -> TensorLagrange __init__(self, Polygon p, unsigned int order = 1, unsigned int size = 0) -> TensorLagrange __init__(self, Polygon p, unsigned int order = 1) -> TensorLagrange __init__(self, Polygon p) -> TensorLagrange
Reimplemented from SyFi::StandardFE.
Definition at line 2179 of file SyFi.py.
02179 : 02180 """ 02181 __init__(self) -> TensorLagrange 02182 __init__(self, Polygon p, unsigned int order = 1, unsigned int size = 0) -> TensorLagrange 02183 __init__(self, Polygon p, unsigned int order = 1) -> TensorLagrange 02184 __init__(self, Polygon p) -> TensorLagrange 02185 """ 02186 this = _SyFi.new_TensorLagrange(*args) 02187 try: self.this.append(this) 02188 except: self.this = this
def SyFi::TensorLagrange::compute_basis_functions | ( | self | ) |
compute_basis_functions(self)
Reimplemented from SyFi::StandardFE.
Definition at line 2195 of file SyFi.py.
02195 : 02196 """compute_basis_functions(self)""" 02197 return _SyFi.TensorLagrange_compute_basis_functions(self) 02198 TensorLagrange_swigregister = _SyFi.TensorLagrange_swigregister
void SyFi::TensorLagrange::compute_basis_functions | ( | ) | [virtual] |
Reimplemented from SyFi::StandardFE.
Definition at line 457 of file Lagrange.cpp.
References SyFi::Lagrange::compute_basis_functions(), SyFi::StandardFE::description, SyFi::StandardFE::dof(), SyFi::StandardFE::dofs, demos::crouzeixraviart::fe, SyFi::StandardFE::N(), SyFi::StandardFE::nbf(), SyFi::StandardFE::Ns, SyFi::StandardFE::order, SyFi::StandardFE::p, run::s, SyFi::StandardFE::set_order(), SyFi::StandardFE::set_polygon(), size, and SyFi::StandardFE::str().
Referenced by TensorLagrange().
00458 { 00459 00460 // remove previously computed basis functions and dofs 00461 Ns.clear(); 00462 dofs.clear(); 00463 00464 if ( order < 1 ) 00465 { 00466 throw(std::logic_error("Lagrangian elements must be of order 1 or higher.")); 00467 } 00468 00469 if ( p == NULL ) 00470 { 00471 throw(std::logic_error("You need to set a polygon before the basisfunctions can be computed")); 00472 } 00473 00474 if ( size == 0) 00475 { 00476 throw(std::logic_error("You need to set the size of the vector before the basisfunctions can be computed")); 00477 } 00478 00479 Lagrange fe; 00480 fe.set_order(order); 00481 fe.set_polygon(*p); 00482 fe.compute_basis_functions(); 00483 GiNaC::lst zero_list; 00484 for (unsigned int s=1; s<= size*size ; s++) 00485 { 00486 zero_list.append(0); 00487 } 00488 00489 for (unsigned int r=0; r< size ; r++) 00490 { 00491 for (unsigned int s=0; s< size ; s++) 00492 { 00493 for (unsigned int i=0; i< fe.nbf() ; i++) 00494 { 00495 GiNaC::lst Nis = zero_list; 00496 Nis.let_op((size)*r + s) = fe.N(i); 00497 GiNaC::ex Nmat = GiNaC::matrix(size,size,Nis); 00498 Ns.insert(Ns.end(), Nmat); 00499 00500 GiNaC::lst dof = GiNaC::lst(fe.dof(i), r, s) ; 00501 dofs.insert(dofs.end(), dof); 00502 } 00503 } 00504 } 00505 00506 description = "Tensor" + fe.str(); 00507 }
def SyFi::TensorLagrange::set_size | ( | self, | ||
args | ||||
) |
set_size(self, unsigned int size_)
Definition at line 2191 of file SyFi.py.
02191 : 02192 """set_size(self, unsigned int size_)""" 02193 return _SyFi.TensorLagrange_set_size(self, *args) 02194 def compute_basis_functions(self):
void SyFi::TensorLagrange::set_size | ( | unsigned int | size_ | ) | [virtual] |
SyFi::TensorLagrange::__del__ = lambdaself:None; [static, private] |
tuple SyFi::TensorLagrange::__getattr__ = lambdaself,name:_swig_getattr(self, TensorLagrange, name) [static, private] |
SyFi::TensorLagrange::__repr__ = _swig_repr [static, private] |
tuple SyFi::TensorLagrange::__setattr__ = lambdaself,name,value:_swig_setattr(self, TensorLagrange, name, value) [static, private] |
SyFi::TensorLagrange::__swig_destroy__ = _SyFi.delete_TensorLagrange [static, private] |
dictionary SyFi::TensorLagrange::__swig_getmethods__ = {} [static, private] |
dictionary SyFi::TensorLagrange::__swig_setmethods__ = {} [static, private] |
unsigned int SyFi::TensorLagrange::size [protected] |
Definition at line 38 of file Lagrange.h.
Referenced by compute_basis_functions(), set_size(), and TensorLagrange().