SyFi  0.3
SyFi::VectorP0 Class Reference

#include <P0.h>

Inheritance diagram for SyFi::VectorP0:
SyFi::StandardFE SyFi::FE

List of all members.

Public Member Functions

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

Protected Attributes

unsigned int size

Detailed Description

Definition at line 36 of file P0.h.


Constructor & Destructor Documentation

Definition at line 92 of file P0.cpp.

References SyFi::StandardFE::description.

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

Definition at line 97 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 43 of file P0.h.

{}

Member Function Documentation

Reimplemented from SyFi::StandardFE.

Definition at line 103 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 SyFi::ArnoldFalkWintherWeakSymU::compute_basis_functions(), SyFi::ArnoldFalkWintherWeakSymP::compute_basis_functions(), and VectorP0().

        {

                // 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 ; s++)
                {
                        zero_list.append(0);
                }

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

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

Member Data Documentation

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

Definition at line 39 of file P0.h.

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


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