#include <FE.h>
Go to the source code of this file.
Functions | |
void | poisson_reference () |
|
Definition at line 14 of file poisson_reference.cpp. References LagrangeFE::compute_basis_functions(), LagrangeFE::dof(), Dof::glob_dof(), grad(), LagrangeFE::N(), LagrangeFE::nbf(), and LagrangeFE::set(). 00014 { 00015 std::map<std::pair<int,int>,double> A; 00016 std::map<int, double> b; 00017 std::pair<int,int> index; 00018 00019 LagrangeFE fe; 00020 Dof dof; 00021 int t=0; 00022 00023 ReferenceTriangle triangle; 00024 int ig, jg; 00025 fe.set(triangle); 00026 fe.compute_basis_functions(); 00027 for (int i=1; i <= fe.nbf(); i++) { 00028 ig = dof.glob_dof(t, i, fe.dof(i)); 00029 index.first = ig; 00030 for (int j=1; j <= fe.nbf(); j++) { 00031 jg = dof.glob_dof(t,j fe.dof(j)); 00032 index.second = jg; 00033 A[index] += integral(triangle,grad(fe.N(i)*grad(fe.N(j)))); 00034 } 00035 b[ig] += integral(triangle,f*fe.N(i)); 00036 } 00037 }
|