#include <FE.h>
Go to the source code of this file.
Functions | |
void | poisson () |
|
Definition at line 14 of file poisson.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 Triangle triangle; Mesh mesh; 00024 int ig, jg; 00025 for ( triangle = mesh.iter.begin(); triangle != mesh.iter.end(); triangle++) { 00026 t++; 00027 fe.set(triangle); 00028 fe.compute_basis_functions(); 00029 for (int i=1; i <= fe.nbf(); i++) { 00030 ig = dof.glob_dof(t, i, fe.dof(i)); 00031 index.first = ig; 00032 for (int j=1; j <= fe.nbf(); j++) { 00033 jg = dof.glob_dof(t,j fe.dof(j)); 00034 index.second = jg; 00035 A[index] += integral(triangle,grad(fe.N(i)*grad(fe.N(j)))); 00036 } 00037 b[ig] += integral(triangle,f*fe.N(i)); 00038 } 00039 } 00040 00041 00042 00043 }
|