SyFi  0.3
SyFi::ArnoldFalkWintherWeakSymP Class Reference

#include <ArnoldFalkWintherWeakSym.h>

Inheritance diagram for SyFi::ArnoldFalkWintherWeakSymP:
SyFi::StandardFE SyFi::FE

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 46 of file ArnoldFalkWintherWeakSym.h.


Constructor & Destructor Documentation

Definition at line 51 of file ArnoldFalkWintherWeakSym.h.

{}

Member Function Documentation

Reimplemented from SyFi::StandardFE.

Definition at line 159 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 ArnoldFalkWintherWeakSymP(), and main().

        {

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

                if ( order < 1 )
                {
                        cout <<"Arnold-Falk-Winther elements must be of order 1 or higher."<<endl;
                        return;
                }

                if ( p == NULL )
                {
                        cout <<"You need to set a polygon before the basisfunctions can be computed"<<endl;
                        return;
                }

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

                if ( order > 1 )
                {

                        VectorDiscontinuousLagrange fe;
                        fe.set_order(order);
                        fe.set_size(3);
                        fe.set_polygon(*p);
                        fe.compute_basis_functions();

                        for (unsigned int i=0; i<fe.nbf(); i++)
                        {
                                GiNaC::matrix Nmat = GiNaC::matrix(3,3);
                                Nmat(1,2) = -fe.N(i).op(0);
                                Nmat(2,1) =  fe.N(i).op(0);

                                Nmat(0,2) =  fe.N(i).op(1);
                                Nmat(2,0) = -fe.N(i).op(1);

                                Nmat(0,1) = -fe.N(i).op(2);
                                Nmat(1,0) =  fe.N(i).op(2);

                                Ns.insert(Ns.end(), Nmat);
                                dofs.insert(dofs.end(),GiNaC::lst(fe.dof(i)));
                        }
                }
                else if  ( order == 1 )
                {

                        VectorP0 fe;
                        fe.set_order(order);
                        fe.set_size(3);
                        fe.set_polygon(*p);
                        fe.compute_basis_functions();

                        for (unsigned int i=0; i<fe.nbf(); i++)
                        {
                                GiNaC::matrix Nmat = GiNaC::matrix(3,3);
                                Nmat(1,2) = -fe.N(i).op(0);
                                Nmat(2,1) =  fe.N(i).op(0);

                                Nmat(0,2) =  fe.N(i).op(1);
                                Nmat(2,0) = -fe.N(i).op(1);

                                Nmat(0,1) = -fe.N(i).op(2);
                                Nmat(1,0) =  fe.N(i).op(2);

                                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