Expand description
Finite element methods with linear (P1) elements.
fem_1d: the two-point problem−(p u')' + q u = fon a mesh of[a, b]with Dirichlet or natural (flux) end conditions, by Galerkin assembly with two-point Gauss quadrature.fem_poisson_2d:−∇·(k ∇u) = fon a triangle mesh with Dirichlet data on chosen nodes, assembled into a sparse matrix and solved by Jacobi-preconditioned conjugate gradients.TriangleMesh::rectanglebuilds a structured mesh of a rectangle.
Linear elements converge at second order in the L² and nodal errors and first order in the energy norm.
See the book entry Finite element methods.
Structs§
- Triangle
Mesh - A triangle mesh: node coordinates and counter-clockwise (or any consistent) node triples.
Enums§
- EndCondition
- An end condition for
fem_1d.
Functions§
- fem_1d
- Solves
−(p u')' + q u = fon the increasingnodes, returninguat the nodes. - fem_
poisson_ 2d - Solves
−∇·(k ∇u) = fon the mesh withu = gatdirichlet_nodes(natural zero-flux conditions elsewhere), returninguat every node.