|
SyFi
0.3
|
#include <MixedFE.h>
Public Member Functions | |
| MixedFE () | |
| MixedFE (StandardFE *fe1, StandardFE *fe2) | |
| virtual | ~MixedFE () |
| virtual void | set_polygon (Polygon &p) |
| virtual Polygon & | get_polygon () |
| virtual void | compute_basis_functions () |
| StandardFE * | get (unsigned int i) |
| void | append (StandardFE *fe) |
| virtual GiNaC::ex | N (unsigned int i) |
| virtual GiNaC::ex | dof (unsigned int i) |
| virtual unsigned int | nbf () const |
| virtual std::string | str () |
Public Attributes | |
| std::vector< StandardFE * > | mfe |
Private Attributes | |
| std::string | description |
Definition at line 25 of file MixedFE.cpp.
References description.
: FE() { description = "MixedFE"; }
| SyFi::MixedFE::MixedFE | ( | StandardFE * | fe1, |
| StandardFE * | fe2 | ||
| ) |
Definition at line 30 of file MixedFE.cpp.
References description, mfe, and SyFi::StandardFE::str().
: FE() { mfe.push_back(fe1); mfe.push_back(fe2); description = "MixedFE_" + fe1->str() + "_" + fe2->str(); }
| SyFi::MixedFE::~MixedFE | ( | ) | [virtual] |
| void SyFi::MixedFE::append | ( | StandardFE * | fe | ) |
Definition at line 51 of file MixedFE.cpp.
References description, mfe, and SyFi::StandardFE::str().
{
mfe.push_back(fe);
description = description + "_" + fe->str();
}
| virtual void SyFi::MixedFE::compute_basis_functions | ( | ) | [inline, virtual] |
| GiNaC::ex SyFi::MixedFE::dof | ( | unsigned int | i | ) | [virtual] |
Implements SyFi::FE.
Definition at line 86 of file MixedFE.cpp.
{
if ( i < 0 || i > nbf()-1)
{
throw(std::out_of_range("The index is out of range!"));
}
bool found = false;
unsigned int e = 0;
unsigned int tmp_nbf = (*mfe[0]).nbf() ;
unsigned int tmp_i = i;
while ( e < mfe.size() && !found)
{
if ( tmp_i < tmp_nbf)
{
found = true;
}
else
{
tmp_i -= (*mfe[e]).nbf();
e++;
}
}
return (*mfe[e]).dof(tmp_i);
}
| StandardFE * SyFi::MixedFE::get | ( | unsigned int | i | ) |
Definition at line 42 of file MixedFE.cpp.
References mfe.
| virtual Polygon& SyFi::MixedFE::get_polygon | ( | ) | [inline, virtual] |
| GiNaC::ex SyFi::MixedFE::N | ( | unsigned int | i | ) | [virtual] |
Implements SyFi::FE.
Definition at line 57 of file MixedFE.cpp.
{
if ( i < 0 || i > nbf()-1)
{
throw(std::out_of_range("The index is out of range!"));
}
bool found = false;
unsigned int e = 0;
unsigned int tmp_nbf = (*mfe[0]).nbf() ;
unsigned int tmp_i = i;
while ( e < mfe.size() && !found)
{
tmp_nbf = (*mfe[0]).nbf() ;
if ( tmp_i < tmp_nbf )
{
found = true;
}
else
{
tmp_i -= (*mfe[e]).nbf();
e++;
}
}
return (*mfe[e]).N(tmp_i);
}
| unsigned int SyFi::MixedFE::nbf | ( | ) | const [virtual] |
| virtual void SyFi::MixedFE::set_polygon | ( | Polygon & | p | ) | [inline, virtual] |
| std::string SyFi::MixedFE::str | ( | ) | [virtual] |
Implements SyFi::FE.
Definition at line 124 of file MixedFE.cpp.
References description.
{
return description;
}
std::string SyFi::MixedFE::description [private] |
| std::vector<StandardFE*> SyFi::MixedFE::mfe |
Definition at line 42 of file MixedFE.h.
Referenced by append(), dof(), get(), get_polygon(), MixedFE(), N(), nbf(), and ~MixedFE().