SyFi
0.3
|
#include <DiscontinuousLagrange.h>
Public Member Functions | |
DiscontinuousLagrange () | |
DiscontinuousLagrange (Polygon &p, unsigned int order=1) | |
virtual | ~DiscontinuousLagrange () |
virtual void | set_element_number (unsigned int element) |
virtual void | compute_basis_functions () |
Private Attributes | |
GiNaC::ex | element |
Definition at line 27 of file DiscontinuousLagrange.h.
Definition at line 33 of file DiscontinuousLagrange.cpp.
References SyFi::StandardFE::description, and element.
: Lagrange() { description = "DiscontinuousLagrange"; element = GiNaC::symbol("e"); }
SyFi::DiscontinuousLagrange::DiscontinuousLagrange | ( | Polygon & | p, |
unsigned int | order = 1 |
||
) |
Definition at line 27 of file DiscontinuousLagrange.cpp.
References compute_basis_functions(), and element.
: Lagrange(p,order) { compute_basis_functions(); element = GiNaC::symbol("e"); }
virtual SyFi::DiscontinuousLagrange::~DiscontinuousLagrange | ( | ) | [inline, virtual] |
Definition at line 33 of file DiscontinuousLagrange.h.
{}
void SyFi::DiscontinuousLagrange::compute_basis_functions | ( | ) | [virtual] |
Reimplemented from SyFi::Lagrange.
Definition at line 39 of file DiscontinuousLagrange.cpp.
References SyFi::StandardFE::description, SyFi::StandardFE::dofs, element, SyFi::StandardFE::Ns, SyFi::StandardFE::order, SyFi::StandardFE::p, and SyFi::StandardFE::str().
Referenced by DiscontinuousLagrange(), and main().
{ // remove previously computed basis functions and dofs Ns.clear(); dofs.clear(); if ( order < 1 ) { throw(std::logic_error("Discontinuous 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")); } //FIXME should have element defined somehow other than //setting it to zero // //It could be a symbol 'e' instead ? Lagrange:: compute_basis_functions(); for (unsigned int i=0; i< dofs.size(); i++) { dofs[i] = GiNaC::lst(dofs[i], element); } description = "Discontinuous" + Lagrange:: str(); }
void SyFi::DiscontinuousLagrange::set_element_number | ( | unsigned int | element | ) | [virtual] |
Definition at line 70 of file DiscontinuousLagrange.cpp.
References element.
Referenced by main().
{ element = element_; }
GiNaC::ex SyFi::DiscontinuousLagrange::element [private] |
Definition at line 29 of file DiscontinuousLagrange.h.
Referenced by compute_basis_functions(), DiscontinuousLagrange(), and set_element_number().