SyFi  0.3
SyFi::DiscontinuousLagrange Class Reference

#include <DiscontinuousLagrange.h>

Inheritance diagram for SyFi::DiscontinuousLagrange:
SyFi::Lagrange SyFi::StandardFE SyFi::FE

List of all members.

Public Member Functions

 DiscontinuousLagrange ()
 DiscontinuousLagrange (Polygon &p, unsigned int order=1)
virtual ~DiscontinuousLagrange ()
virtual void set_element_number (unsigned int element)
virtual void compute_basis_functions ()

Private Attributes

GiNaC::ex element

Detailed Description

Definition at line 27 of file DiscontinuousLagrange.h.


Constructor & Destructor Documentation

Definition at line 33 of file DiscontinuousLagrange.cpp.

References SyFi::StandardFE::description, and element.

                                                      : Lagrange()
        {
                description = "DiscontinuousLagrange";
                element = GiNaC::symbol("e");
        }
SyFi::DiscontinuousLagrange::DiscontinuousLagrange ( Polygon p,
unsigned int  order = 1 
)

Definition at line 27 of file DiscontinuousLagrange.cpp.

References compute_basis_functions(), and element.

                                                                                    : Lagrange(p,order)
        {
                compute_basis_functions();
                element = GiNaC::symbol("e");
        }

Definition at line 33 of file DiscontinuousLagrange.h.

{}

Member Function Documentation

Reimplemented from SyFi::Lagrange.

Definition at line 39 of file DiscontinuousLagrange.cpp.

References SyFi::StandardFE::description, SyFi::StandardFE::dofs, element, SyFi::StandardFE::Ns, SyFi::StandardFE::order, SyFi::StandardFE::p, and SyFi::StandardFE::str().

Referenced by DiscontinuousLagrange(), and main().

        {

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

                if ( order < 1 )
                {
                        throw(std::logic_error("Discontinuous Lagrangian 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"));
                }

                //FIXME should have element defined somehow other than
                //setting it to zero
                //
                //It could be a symbol 'e' instead ?

                Lagrange:: compute_basis_functions();
                for (unsigned int i=0; i< dofs.size(); i++)
                {
                        dofs[i] = GiNaC::lst(dofs[i], element);
                }

                description = "Discontinuous" +  Lagrange:: str();
        }
void SyFi::DiscontinuousLagrange::set_element_number ( unsigned int  element) [virtual]

Definition at line 70 of file DiscontinuousLagrange.cpp.

References element.

Referenced by main().

        {
                element = element_;
        }

Member Data Documentation


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