SyFi  0.3
SyFi::TensorP0 Class Reference

#include <P0.h>

Inheritance diagram for SyFi::TensorP0:
SyFi::StandardFE SyFi::StandardFE SyFi::FE SyFi::FE SyFi::FE SyFi::FE

List of all members.

Public Member Functions

 TensorP0 ()
 TensorP0 (Polygon &p, unsigned int order=0, unsigned int size=0)
 ~TensorP0 ()
virtual void set_size (unsigned int size_)
virtual void compute_basis_functions ()
def __init__
def set_size

Static Public Attributes

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

Protected Attributes

unsigned int size

Static Private Attributes

 __repr__ = _swig_repr
 __swig_destroy__ = _SyFi.delete_TensorP0

Detailed Description

Proxy of C++ SyFi::TensorP0 class

Definition at line 49 of file P0.h.


Constructor & Destructor Documentation

Definition at line 150 of file P0.cpp.

References SyFi::StandardFE::description.

                           : StandardFE()
        {
                description = "TensorP0";
        }
SyFi::TensorP0::TensorP0 ( Polygon p,
unsigned int  order = 0,
unsigned int  size = 0 
)

Definition at line 155 of file P0.cpp.

References compute_basis_functions(), SyFi::nsd, and size.

                                                                             : StandardFE(p, order)
        {
                size = size_ < 0 ? nsd: size_;
                compute_basis_functions();
        }

Definition at line 56 of file P0.h.

{}
def SyFi::TensorP0::__init__ (   self,
  args 
)
__init__(SyFi::TensorP0 self) -> TensorP0
__init__(SyFi::TensorP0 self, Polygon p, unsigned int order=0, unsigned int size=0) -> TensorP0
__init__(SyFi::TensorP0 self, Polygon p, unsigned int order=0) -> TensorP0
__init__(SyFi::TensorP0 self, Polygon p) -> TensorP0

Reimplemented from SyFi::StandardFE.

Definition at line 2289 of file SyFi.py.

02289 
02290     def __init__(self, *args): 
02291         """
02292         __init__(SyFi::TensorP0 self) -> TensorP0
02293         __init__(SyFi::TensorP0 self, Polygon p, unsigned int order=0, unsigned int size=0) -> TensorP0
02294         __init__(SyFi::TensorP0 self, Polygon p, unsigned int order=0) -> TensorP0
02295         __init__(SyFi::TensorP0 self, Polygon p) -> TensorP0
02296         """
        _SyFi.TensorP0_swiginit(self,_SyFi.new_TensorP0(*args))

Member Function Documentation

Reimplemented from SyFi::StandardFE.

Definition at line 161 of file P0.cpp.

References SyFi::StandardFE::description, SyFi::StandardFE::dof(), SyFi::StandardFE::dofs, SyFi::StandardFE::N(), SyFi::StandardFE::nbf(), SyFi::StandardFE::Ns, SyFi::StandardFE::p, size, and SyFi::StandardFE::str().

Referenced by TensorP0().

        {

                // remove previously computed basis functions and dofs
                Ns.clear();
                dofs.clear();

                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"));
                }

                P0 fe(*p);
                GiNaC::lst zero_list;
                for (unsigned int s=1; s<= size*size ; s++)
                {
                        zero_list.append(0);
                }

                for (unsigned int i=0; i< fe.nbf() ; i++)
                {
                        for (unsigned int r=0; r< size ; r++)
                        {
                                for (unsigned int s=0; s< size ; s++)
                                {
                                        GiNaC::lst Nis = zero_list;
                                        Nis.let_op((size)*r + s) = fe.N(i);
                                        GiNaC::ex Nmat = GiNaC::matrix(size,size,Nis);
                                        Ns.insert(Ns.end(), Nmat);

                                        GiNaC::lst dof = GiNaC::lst(fe.dof(i), r, s) ;
                                        dofs.insert(dofs.end(), dof);
                                }
                        }
                }
                description = "Tensor" + fe.str();
        }
void SyFi::TensorP0::set_size ( unsigned int  size_) [virtual]

Definition at line 204 of file P0.cpp.

References size.

Referenced by set_size().

        {
                size = size_;
        }
def SyFi::TensorP0::set_size (   self,
  args 
)
set_size(TensorP0 self, unsigned int size_)

Definition at line 2298 of file SyFi.py.

References SyFi.new_instancemethod, and set_size().

02298 
02299     def set_size(self, *args):
02300         """set_size(TensorP0 self, unsigned int size_)"""
02301         return _SyFi.TensorP0_set_size(self, *args)
02302 
TensorP0.set_size = new_instancemethod(_SyFi.TensorP0_set_size,None,TensorP0)

Member Data Documentation

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

Reimplemented from SyFi::StandardFE.

Definition at line 2288 of file SyFi.py.

SyFi::TensorP0::__swig_destroy__ = _SyFi.delete_TensorP0 [static, private]

Reimplemented from SyFi::StandardFE.

Definition at line 2297 of file SyFi.py.

unsigned int SyFi::TensorP0::size [protected]

Definition at line 52 of file P0.h.

Referenced by compute_basis_functions(), set_size(), and TensorP0().

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

Reimplemented from SyFi::StandardFE.

Definition at line 2287 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