SyFi  0.3
SyFi::VectorCrouzeixRaviart Class Reference

#include <CrouzeixRaviart.h>

Inheritance diagram for SyFi::VectorCrouzeixRaviart:
SyFi::StandardFE SyFi::FE

List of all members.

Public Member Functions

 VectorCrouzeixRaviart ()
 VectorCrouzeixRaviart (Polygon &p, unsigned int order=1, unsigned int size=-1)
virtual ~VectorCrouzeixRaviart ()
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 CrouzeixRaviart.h.


Constructor & Destructor Documentation

SyFi::VectorCrouzeixRaviart::VectorCrouzeixRaviart ( Polygon p,
unsigned int  order = 1,
unsigned int  size = -1 
)

Definition at line 157 of file CrouzeixRaviart.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 CrouzeixRaviart.h.

{}

Member Function Documentation

Reimplemented from SyFi::StandardFE.

Definition at line 169 of file CrouzeixRaviart.cpp.

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

Referenced by main(), and VectorCrouzeixRaviart().

        {

                if (order != 1)
                {
                        throw(std::logic_error("Only Crouziex-Raviart elements of order 1 is possible"));
                }

                CrouzeixRaviart fe;
                fe.set_polygon(*p);
                fe.compute_basis_functions();

                description = "Vector" + fe.str();

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

                for (unsigned int s=0; s< size ; s++)
                {
                        for (unsigned int i=0; i< fe.nbf() ; i++)
                        {
                                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);
                        }
                }
        }
void SyFi::VectorCrouzeixRaviart::set_size ( unsigned int  size_) [virtual]

Definition at line 204 of file CrouzeixRaviart.cpp.

References size.

Referenced by main().

        {
                size = size_;
        }

Member Data Documentation

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

Definition at line 39 of file CrouzeixRaviart.h.

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


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