|
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 |
| 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, VectorLagrange, name, value) |
| dictionary | __swig_getmethods__ = {} |
| tuple | __getattr__ = lambdaself,name:_swig_getattr(self, VectorLagrange, name) |
| __repr__ = _swig_repr | |
| __swig_destroy__ = _SyFi.delete_VectorLagrange | |
| __del__ = lambdaself:None; | |
Proxy of C++ SyFi::VectorLagrange class
Definition at line 22 of file Lagrange.h.
| SyFi::VectorLagrange::VectorLagrange | ( | ) |
Definition at line 379 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 384 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 29 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 2147 of file SyFi.py.
02147 : 02148 """ 02149 __init__(self) -> VectorLagrange 02150 __init__(self, Polygon p, unsigned int order = 1, unsigned int size = 0) -> VectorLagrange 02151 __init__(self, Polygon p, unsigned int order = 1) -> VectorLagrange 02152 __init__(self, Polygon p) -> VectorLagrange 02153 """ 02154 this = _SyFi.new_VectorLagrange(*args) 02155 try: self.this.append(this) 02156 except: self.this = this
| void SyFi::VectorLagrange::compute_basis_functions | ( | ) | [virtual] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
Definition at line 390 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();
}
| def SyFi::VectorLagrange::compute_basis_functions | ( | self | ) |
compute_basis_functions(self)
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
| def SyFi::VectorLagrange::set_size | ( | self, | |
| args | |||
| ) |
set_size(self, unsigned int size_)
Reimplemented in SyFi::VectorDiscontinuousLagrange.
| void SyFi::VectorLagrange::set_size | ( | unsigned int | size_ | ) | [virtual] |
Reimplemented in SyFi::VectorDiscontinuousLagrange.
Definition at line 439 of file Lagrange.cpp.
References size.
Referenced by main().
{
size = size_;
}
SyFi::VectorLagrange::__del__ = lambdaself:None; [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
tuple SyFi::VectorLagrange::__getattr__ = lambdaself,name:_swig_getattr(self, VectorLagrange, name) [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
SyFi::VectorLagrange::__repr__ = _swig_repr [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
tuple SyFi::VectorLagrange::__setattr__ = lambdaself,name,value:_swig_setattr(self, VectorLagrange, name, value) [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.
dictionary SyFi::VectorLagrange::__swig_getmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
dictionary SyFi::VectorLagrange::__swig_setmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.
unsigned int SyFi::VectorLagrange::size [protected] |
Definition at line 25 of file Lagrange.h.
Referenced by compute_basis_functions(), set_size(), and VectorLagrange().
Reimplemented from SyFi::StandardFE.
Reimplemented in SyFi::VectorDiscontinuousLagrange.