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