SyFi  0.3
SyFi::ArnoldFalkWintherWeakSymU Class Reference

#include <ArnoldFalkWintherWeakSym.h>

Inheritance diagram for SyFi::ArnoldFalkWintherWeakSymU:
SyFi::StandardFE SyFi::FE

List of all members.

Public Member Functions

 ArnoldFalkWintherWeakSymU ()
 ArnoldFalkWintherWeakSymU (Polygon &p, int order=1)
virtual ~ArnoldFalkWintherWeakSymU ()
virtual void compute_basis_functions ()

Detailed Description

Definition at line 36 of file ArnoldFalkWintherWeakSym.h.


Constructor & Destructor Documentation

Definition at line 41 of file ArnoldFalkWintherWeakSym.h.

{}

Member Function Documentation

Reimplemented from SyFi::StandardFE.

Definition at line 92 of file ArnoldFalkWintherWeakSym.cpp.

References SyFi::VectorP0::compute_basis_functions(), SyFi::VectorDiscontinuousLagrange::compute_basis_functions(), SyFi::StandardFE::description, SyFi::StandardFE::dof(), SyFi::StandardFE::dofs, SyFi::istr(), SyFi::StandardFE::N(), SyFi::StandardFE::nbf(), SyFi::StandardFE::Ns, SyFi::StandardFE::order, SyFi::StandardFE::p, SyFi::StandardFE::set_order(), SyFi::StandardFE::set_polygon(), SyFi::VectorP0::set_size(), and SyFi::VectorDiscontinuousLagrange::set_size().

Referenced by ArnoldFalkWintherWeakSymU(), and main().

        {

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

                if ( order < 1 )
                {
                        throw(std::logic_error("Arnold-Falk-Winther elements must be of order 1 or higher."));
                }

                if ( p == NULL )
                {
                        throw(std::logic_error("You need to set a polygon before the basisfunctions can be computed"));
                }

                description = istr("ArnoldFalkWintherWeakSymU_", order) + "_3D";

                if ( order  > 1 )
                {
                        VectorDiscontinuousLagrange fe;
                        fe.set_order(order-1);
                        fe.set_size(3);
                        fe.set_polygon(*p);
                        fe.compute_basis_functions();

                        for (unsigned int i=0; i<fe.nbf(); i++)
                        {
                                GiNaC::lst Ni = GiNaC::lst(fe.N(i).op(0), fe.N(i).op(1), fe.N(i).op(2));
                                GiNaC::ex Nmat = GiNaC::matrix(3,1,Ni);
                                Ns.insert(Ns.end(), Nmat);
                                dofs.insert(dofs.end(),GiNaC::lst(fe.dof(i)));
                        }
                }
                else if ( order == 1 )
                {
                        VectorP0 fe;
                        fe.set_order(order-1);
                        fe.set_size(3);
                        fe.set_polygon(*p);
                        fe.compute_basis_functions();

                        for (unsigned int i=0; i<fe.nbf(); i++)
                        {
                                GiNaC::lst Ni = GiNaC::lst(fe.N(i).op(0), fe.N(i).op(1), fe.N(i).op(2));
                                GiNaC::ex Nmat = GiNaC::matrix(3,1,Ni);
                                Ns.insert(Ns.end(), Nmat);
                                GiNaC::ex d = GiNaC::lst(fe.dof(i), 0);
                                dofs.insert(dofs.end(),GiNaC::lst(d));
                        }
                }

        }

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