SyFi
0.3
|
#include <ArnoldFalkWintherWeakSym.h>
Public Member Functions | |
ArnoldFalkWintherWeakSymU () | |
ArnoldFalkWintherWeakSymU (Polygon &p, int order=1) | |
virtual | ~ArnoldFalkWintherWeakSymU () |
virtual void | compute_basis_functions () |
Definition at line 36 of file ArnoldFalkWintherWeakSym.h.
Definition at line 82 of file ArnoldFalkWintherWeakSym.cpp.
References SyFi::StandardFE::description.
: StandardFE() { description = "ArnoldFalkWintherWeakSymU"; }
SyFi::ArnoldFalkWintherWeakSymU::ArnoldFalkWintherWeakSymU | ( | Polygon & | p, |
int | order = 1 |
||
) |
Definition at line 87 of file ArnoldFalkWintherWeakSym.cpp.
References compute_basis_functions().
: StandardFE(p, order) { compute_basis_functions(); }
virtual SyFi::ArnoldFalkWintherWeakSymU::~ArnoldFalkWintherWeakSymU | ( | ) | [inline, virtual] |
Definition at line 41 of file ArnoldFalkWintherWeakSym.h.
{}
void SyFi::ArnoldFalkWintherWeakSymU::compute_basis_functions | ( | ) | [virtual] |
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)); } } }