SyFi 0.3
|
#include <SpaceTimeElement.h>
Public Member Functions | |
SpaceTimeElement () | |
SpaceTimeElement (Line *time_line_, unsigned int order_, StandardFE *fe_) | |
virtual | ~SpaceTimeElement () |
void | set_time_domain (Line *line) |
void | set_order_in_time (unsigned int order) |
void | set_spatial_element (StandardFE *fe) |
virtual void | compute_basis_functions () |
def | __init__ |
def | set_time_domain |
def | set_order_in_time |
def | set_spatial_element |
def | compute_basis_functions |
Public Attributes | |
this | |
Private Attributes | |
int | order |
Line * | time_line |
StandardFE * | fe |
Static Private Attributes | |
dictionary | __swig_setmethods__ = {} |
tuple | __setattr__ = lambdaself,name,value:_swig_setattr(self, SpaceTimeElement, name, value) |
dictionary | __swig_getmethods__ = {} |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, SpaceTimeElement, name) |
__repr__ = _swig_repr | |
__swig_destroy__ = _SyFi.delete_SpaceTimeElement | |
__del__ = lambdaself:None; |
Proxy of C++ SyFi::SpaceTimeElement class
Definition at line 35 of file SpaceTimeElement.h.
SyFi::SpaceTimeElement::SpaceTimeElement | ( | ) |
Definition at line 78 of file SpaceTimeElement.cpp.
References SyFi::StandardFE::description.
: StandardFE() { description = "SpaceTimeElement"; }
SyFi::SpaceTimeElement::SpaceTimeElement | ( | Line * | time_line_, |
unsigned int | order_, | ||
StandardFE * | fe_ | ||
) |
Definition at line 83 of file SpaceTimeElement.cpp.
References compute_basis_functions(), fe, order, and time_line.
{ time_line = time_line_; order = order_; fe = fe_; compute_basis_functions(); }
virtual SyFi::SpaceTimeElement::~SpaceTimeElement | ( | ) | [inline, virtual] |
Definition at line 44 of file SpaceTimeElement.h.
{}
def SyFi::SpaceTimeElement::__init__ | ( | self, | |
args | |||
) |
__init__(self) -> SpaceTimeElement __init__(self, Line time_line_, unsigned int order_, StandardFE fe_) -> SpaceTimeElement
Reimplemented from SyFi::StandardFE.
void SyFi::SpaceTimeElement::compute_basis_functions | ( | ) | [virtual] |
Reimplemented from SyFi::StandardFE.
Definition at line 106 of file SpaceTimeElement.cpp.
References SyFi::StandardFE::description, SyFi::StandardFE::dof(), SyFi::StandardFE::dofs, fe, SyFi::StandardFE::N(), SyFi::StandardFE::nbf(), SyFi::StandardFE::Ns, order, SyFi::StandardFE::str(), SyFi::t, time_line, and SyFi::x.
Referenced by SpaceTimeElement().
{ // remove previously computed basis functions and dofs Ns.clear(); dofs.clear(); if ( order < 1 ) { throw(std::logic_error("The elements must be of order 1 or higher.")); } if ( time_line == NULL ) { throw(std::logic_error("You need to set a time domain before the basisfunctions can be computed")); } if ( fe == NULL ) { throw(std::logic_error("You need to set a spatial element before the basisfunctions can be computed")); } StandardFE* time_element; if ( order == 0) { time_element = new P0(*time_line); } else { time_element = new Lagrange(*time_line, order); } for (unsigned int j = 0; j < fe->nbf(); j++) { GiNaC::ex Nj = fe->N(j); for (unsigned int i = 0; i < (*time_element).nbf(); i++) { GiNaC::ex Ni = (*time_element).N(i); Ni = Ni.subs(x == t); GiNaC::ex N = Nj*Ni; Ns.insert(Ns.end(), N); dofs.insert(dofs.end(), GiNaC::lst((*time_element).dof(i), fe->dof(j))); } } description = time_element->str() + "_" + fe->str(); delete time_element; }
def SyFi::SpaceTimeElement::compute_basis_functions | ( | self | ) |
compute_basis_functions(self)
Reimplemented from SyFi::StandardFE.
void SyFi::SpaceTimeElement::set_order_in_time | ( | unsigned int | order | ) |
def SyFi::SpaceTimeElement::set_order_in_time | ( | self, | |
args | |||
) |
def SyFi::SpaceTimeElement::set_spatial_element | ( | self, | |
args | |||
) |
void SyFi::SpaceTimeElement::set_spatial_element | ( | StandardFE * | fe | ) |
void SyFi::SpaceTimeElement::set_time_domain | ( | Line * | line | ) |
def SyFi::SpaceTimeElement::set_time_domain | ( | self, | |
args | |||
) |
SyFi::SpaceTimeElement::__del__ = lambdaself:None; [static, private] |
Reimplemented from SyFi::StandardFE.
tuple SyFi::SpaceTimeElement::__getattr__ = lambdaself,name:_swig_getattr(self, SpaceTimeElement, name) [static, private] |
Reimplemented from SyFi::StandardFE.
SyFi::SpaceTimeElement::__repr__ = _swig_repr [static, private] |
Reimplemented from SyFi::StandardFE.
tuple SyFi::SpaceTimeElement::__setattr__ = lambdaself,name,value:_swig_setattr(self, SpaceTimeElement, name, value) [static, private] |
Reimplemented from SyFi::StandardFE.
SyFi::SpaceTimeElement::__swig_destroy__ = _SyFi.delete_SpaceTimeElement [static, private] |
Reimplemented from SyFi::StandardFE.
dictionary SyFi::SpaceTimeElement::__swig_getmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
dictionary SyFi::SpaceTimeElement::__swig_setmethods__ = {} [static, private] |
Reimplemented from SyFi::StandardFE.
StandardFE* SyFi::SpaceTimeElement::fe [private] |
Definition at line 39 of file SpaceTimeElement.h.
Referenced by compute_basis_functions(), set_spatial_element(), and SpaceTimeElement().
int SyFi::SpaceTimeElement::order [private] |
Reimplemented from SyFi::StandardFE.
Definition at line 37 of file SpaceTimeElement.h.
Referenced by compute_basis_functions(), set_order_in_time(), and SpaceTimeElement().
Reimplemented from SyFi::StandardFE.
Line* SyFi::SpaceTimeElement::time_line [private] |
Definition at line 38 of file SpaceTimeElement.h.
Referenced by compute_basis_functions(), set_time_domain(), and SpaceTimeElement().