SyFi
0.3
|
#include <Lagrange.h>
Public Member Functions | |
VectorLagrange () | |
VectorLagrange (Polygon &p, unsigned int order=1, unsigned int size=0) | |
~VectorLagrange () | |
virtual void | set_size (unsigned int size_) |
virtual void | compute_basis_functions () |
def | __init__ |
def | set_size |
Static Public Attributes | |
tuple | thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') |
Protected Attributes | |
unsigned int | size |
Static Private Attributes | |
__repr__ = _swig_repr | |
__swig_destroy__ = _SyFi.delete_VectorLagrange |
Proxy of C++ SyFi::VectorLagrange class
Definition at line 36 of file Lagrange.h.
Definition at line 393 of file Lagrange.cpp.
References SyFi::StandardFE::description.
: StandardFE() { description = "VectorLagrange"; }
SyFi::VectorLagrange::VectorLagrange | ( | Polygon & | p, |
unsigned int | order = 1 , |
||
unsigned int | size = 0 |
||
) |
Definition at line 398 of file Lagrange.cpp.
References compute_basis_functions(), SyFi::nsd, and size.
: StandardFE(p, order) { size = size_ < 0 ? nsd: size_; compute_basis_functions(); }
SyFi::VectorLagrange::~VectorLagrange | ( | ) | [inline] |
Definition at line 43 of file Lagrange.h.
{}
def SyFi::VectorLagrange::__init__ | ( | self, | |
args | |||
) |
__init__(self) -> VectorLagrange __init__(self, Polygon p, unsigned int order = 1, unsigned int size = 0) -> VectorLagrange __init__(self, Polygon p, unsigned int order = 1) -> VectorLagrange __init__(self, Polygon p) -> VectorLagrange
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
Definition at line 2118 of file SyFi.py.
02118 02119 def __init__(self, *args): 02120 """ 02121 __init__(self) -> VectorLagrange 02122 __init__(self, Polygon p, unsigned int order = 1, unsigned int size = 0) -> VectorLagrange 02123 __init__(self, Polygon p, unsigned int order = 1) -> VectorLagrange 02124 __init__(self, Polygon p) -> VectorLagrange 02125 """ _SyFi.VectorLagrange_swiginit(self,_SyFi.new_VectorLagrange(*args))
void SyFi::VectorLagrange::compute_basis_functions | ( | ) | [virtual] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
Definition at line 404 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 main(), and VectorLagrange().
{ // remove previously computed basis functions and dofs Ns.clear(); dofs.clear(); if ( order < 1 ) { throw(std::logic_error("Lagrangian elements must be of order 1 or higher.")); } 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")); } Lagrange fe; fe.set_order(order); fe.set_polygon(*p); fe.compute_basis_functions(); GiNaC::lst zero_list; for (unsigned int s=1; s<= size ; s++) { zero_list.append(0); } for (unsigned int s=0; s< size ; s++) { for (unsigned int i=0; i< fe.nbf() ; i++) { GiNaC::lst Nis = zero_list; Nis.let_op(s) = fe.N(i); GiNaC::ex Nmat = GiNaC::matrix(size,1,Nis); Ns.insert(Ns.end(), Nmat); GiNaC::lst dof = GiNaC::lst(fe.dof(i), s) ; dofs.insert(dofs.end(), dof); } } description = "Vector" + fe.str(); }
void SyFi::VectorLagrange::set_size | ( | unsigned int | size_ | ) | [virtual] |
Reimplemented in SyFi::VectorDiscontinuousLagrange.
Definition at line 453 of file Lagrange.cpp.
References size.
Referenced by main(), and set_size().
{ size = size_; }
def SyFi::VectorLagrange::set_size | ( | self, | |
args | |||
) |
set_size(self, unsigned int size_)
Definition at line 2127 of file SyFi.py.
References SyFi.new_instancemethod, and set_size().
02127 02128 def set_size(self, *args): 02129 """set_size(self, unsigned int size_)""" 02130 return _SyFi.VectorLagrange_set_size(self, *args) 02131 VectorLagrange.set_size = new_instancemethod(_SyFi.VectorLagrange_set_size,None,VectorLagrange)
SyFi::VectorLagrange::__repr__ = _swig_repr [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
SyFi::VectorLagrange::__swig_destroy__ = _SyFi.delete_VectorLagrange [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
unsigned int SyFi::VectorLagrange::size [protected] |
Definition at line 39 of file Lagrange.h.
Referenced by compute_basis_functions(), set_size(), and VectorLagrange().
tuple SyFi::VectorLagrange::thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') [static] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.