SyFi
0.3
|
#include <CrouzeixRaviart.h>
Public Member Functions | |
VectorCrouzeixRaviart () | |
VectorCrouzeixRaviart (Polygon &p, unsigned int order=1, unsigned int size=-1) | |
virtual | ~VectorCrouzeixRaviart () |
virtual void | set_size (unsigned int size_) |
virtual void | compute_basis_functions () |
Protected Attributes | |
unsigned int | size |
Definition at line 36 of file CrouzeixRaviart.h.
Definition at line 163 of file CrouzeixRaviart.cpp.
References SyFi::StandardFE::description, and SyFi::StandardFE::order.
: StandardFE() { description = "VectorCrouzeixRaviart"; order = 1; }
SyFi::VectorCrouzeixRaviart::VectorCrouzeixRaviart | ( | Polygon & | p, |
unsigned int | order = 1 , |
||
unsigned int | size = -1 |
||
) |
Definition at line 157 of file CrouzeixRaviart.cpp.
References compute_basis_functions(), SyFi::nsd, and size.
: StandardFE(p, order) { size = size_ < 0 ? nsd: size_; compute_basis_functions(); }
virtual SyFi::VectorCrouzeixRaviart::~VectorCrouzeixRaviart | ( | ) | [inline, virtual] |
Definition at line 43 of file CrouzeixRaviart.h.
{}
void SyFi::VectorCrouzeixRaviart::compute_basis_functions | ( | ) | [virtual] |
Reimplemented from SyFi::StandardFE.
Definition at line 169 of file CrouzeixRaviart.cpp.
References SyFi::CrouzeixRaviart::compute_basis_functions(), SyFi::StandardFE::description, SyFi::StandardFE::dof(), SyFi::StandardFE::dofs, SyFi::StandardFE::N(), SyFi::StandardFE::nbf(), SyFi::StandardFE::Ns, SyFi::StandardFE::order, SyFi::StandardFE::p, SyFi::StandardFE::set_polygon(), size, and SyFi::StandardFE::str().
Referenced by main(), and VectorCrouzeixRaviart().
{ if (order != 1) { throw(std::logic_error("Only Crouziex-Raviart elements of order 1 is possible")); } CrouzeixRaviart fe; fe.set_polygon(*p); fe.compute_basis_functions(); description = "Vector" + fe.str(); GiNaC::lst zero_list; for (unsigned int s=1; s<= size ; s++) { zero_list.append(0); } for (unsigned int s=0; s< size ; s++) { for (unsigned int i=0; i< fe.nbf() ; i++) { GiNaC::lst Nis = zero_list; Nis.let_op(s) = fe.N(i); GiNaC::ex Nmat = GiNaC::matrix(size,1,Nis); Ns.insert(Ns.end(), Nmat); GiNaC::lst dof = GiNaC::lst(fe.dof(i), s) ; dofs.insert(dofs.end(), dof); } } }
void SyFi::VectorCrouzeixRaviart::set_size | ( | unsigned int | size_ | ) | [virtual] |
Definition at line 204 of file CrouzeixRaviart.cpp.
References size.
Referenced by main().
{ size = size_; }
unsigned int SyFi::VectorCrouzeixRaviart::size [protected] |
Definition at line 39 of file CrouzeixRaviart.h.
Referenced by compute_basis_functions(), set_size(), and VectorCrouzeixRaviart().