SyFi  0.3
SyFi::MixedFE Class Reference

#include <MixedFE.h>

Inheritance diagram for SyFi::MixedFE:
SyFi::FE SyFi::FE

List of all members.

Public Member Functions

 MixedFE ()
 MixedFE (StandardFE *fe1, StandardFE *fe2)
virtual ~MixedFE ()
virtual void set_polygon (Polygon &p)
virtual Polygonget_polygon ()
virtual void compute_basis_functions ()
StandardFEget (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 ()
def __init__
def get
def append

Public Attributes

std::vector< StandardFE * > mfe

Static Public Attributes

tuple thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
tuple mfe = _swig_property(_SyFi.MixedFE_mfe_get, _SyFi.MixedFE_mfe_set)

Private Attributes

std::string description

Static Private Attributes

 __repr__ = _swig_repr
 __swig_destroy__ = _SyFi.delete_MixedFE

Detailed Description

Proxy of C++ SyFi::MixedFE class

Definition at line 38 of file MixedFE.h.


Constructor & Destructor Documentation

Definition at line 25 of file MixedFE.cpp.

References description.

                         : FE()
        {
                description = "MixedFE";
        }

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]

Definition at line 37 of file MixedFE.cpp.

References mfe.

        {
                mfe.clear();
        }
def SyFi::MixedFE::__init__ (   self,
  args 
)
__init__(self) -> MixedFE
__init__(self, StandardFE fe1, StandardFE fe2) -> MixedFE

Definition at line 2525 of file SyFi.py.

02525 
02526     def __init__(self, *args): 
02527         """
02528         __init__(self) -> MixedFE
02529         __init__(self, StandardFE fe1, StandardFE fe2) -> MixedFE
02530         """
        _SyFi.MixedFE_swiginit(self,_SyFi.new_MixedFE(*args))

Member Function Documentation

Definition at line 51 of file MixedFE.cpp.

References description, mfe, and SyFi::StandardFE::str().

Referenced by append().

        {
                mfe.push_back(fe);
                description = description + "_" + fe->str();
        }
def SyFi::MixedFE::append (   self,
  args 
)
append(self, StandardFE fe)

Definition at line 2536 of file SyFi.py.

References append(), and SyFi.new_instancemethod.

02536 
02537     def append(self, *args):
02538         """append(self, StandardFE fe)"""
02539         return _SyFi.MixedFE_append(self, *args)
02540 
02541 MixedFE.get = new_instancemethod(_SyFi.MixedFE_get,None,MixedFE)
MixedFE.append = new_instancemethod(_SyFi.MixedFE_append,None,MixedFE)
virtual void SyFi::MixedFE::compute_basis_functions ( ) [inline, virtual]

Implements SyFi::FE.

Definition at line 58 of file MixedFE.h.

{ }
GiNaC::ex SyFi::MixedFE::dof ( unsigned int  i) [virtual]

Implements SyFi::FE.

Definition at line 86 of file MixedFE.cpp.

References test::e, mfe, and nbf().

        {

                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.

Referenced by get().

        {
                if ( i < 0 || i > mfe.size())
                {
                        throw(std::out_of_range("The index is out of range!"));
                }
                return mfe[i];
        }
def SyFi::MixedFE::get (   self,
  args 
)
get(self, unsigned int i) -> StandardFE

Definition at line 2532 of file SyFi.py.

References get().

02532 
02533     def get(self, *args):
02534         """get(self, unsigned int i) -> StandardFE"""
02535         return _SyFi.MixedFE_get(self, *args)

virtual Polygon& SyFi::MixedFE::get_polygon ( ) [inline, virtual]

Implements SyFi::FE.

Definition at line 54 of file MixedFE.h.

References mfe.

                        {
                                return (*(mfe[0])).get_polygon();
                        }
GiNaC::ex SyFi::MixedFE::N ( unsigned int  i) [virtual]

Implements SyFi::FE.

Definition at line 57 of file MixedFE.cpp.

References test::e, mfe, and nbf().

        {

                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]

Implements SyFi::FE.

Definition at line 114 of file MixedFE.cpp.

References mfe.

Referenced by dof(), and N().

        {
                int sum = 0;
                for (unsigned int i=0; i< mfe.size(); i++)
                {
                        sum += (*mfe[i]).nbf();
                }
                return sum;
        }
virtual void SyFi::MixedFE::set_polygon ( Polygon p) [inline, virtual]

Implements SyFi::FE.

Definition at line 50 of file MixedFE.h.

                        {
                        }
std::string SyFi::MixedFE::str ( ) [virtual]

Implements SyFi::FE.

Definition at line 124 of file MixedFE.cpp.

References description.

        {
                return description;
        }

Member Data Documentation

SyFi::MixedFE::__repr__ = _swig_repr [static, private]

Reimplemented from SyFi::FE.

Definition at line 2523 of file SyFi.py.

SyFi::MixedFE::__swig_destroy__ = _SyFi.delete_MixedFE [static, private]

Reimplemented from SyFi::FE.

Definition at line 2531 of file SyFi.py.

std::string SyFi::MixedFE::description [private]

Definition at line 40 of file MixedFE.h.

Referenced by append(), MixedFE(), and str().

Definition at line 42 of file MixedFE.h.

Referenced by append(), dof(), get(), get_polygon(), MixedFE(), N(), nbf(), and ~MixedFE().

tuple SyFi::MixedFE::mfe = _swig_property(_SyFi.MixedFE_mfe_get, _SyFi.MixedFE_mfe_set) [static]

Definition at line 2524 of file SyFi.py.

tuple SyFi::MixedFE::thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') [static]

Reimplemented from SyFi::FE.

Definition at line 2522 of file SyFi.py.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines