SyFi  0.3
SyFi::ArnoldFalkWintherWeakSymSigma Class Reference

#include <ArnoldFalkWintherWeakSym.h>

Inheritance diagram for SyFi::ArnoldFalkWintherWeakSymSigma:
SyFi::StandardFE SyFi::FE

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 26 of file ArnoldFalkWintherWeakSym.h.


Constructor & Destructor Documentation

Definition at line 31 of file ArnoldFalkWintherWeakSym.h.

{}

Member Function Documentation

Reimplemented from SyFi::StandardFE.

Definition at line 42 of file ArnoldFalkWintherWeakSym.cpp.

References SyFi::Nedelec2Hdiv::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(), and SyFi::StandardFE::set_polygon().

Referenced by ArnoldFalkWintherWeakSymSigma(), 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("ArnoldFalkWintherWeakSymSigma_", order) + "_3D";

                Nedelec2Hdiv fe;
                fe.set_order(order);
                fe.set_polygon(*p);
                fe.compute_basis_functions();

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

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