# fe_utils.solvers package¶

## fe_utils.solvers.helmholtz module¶

Solve a model helmholtz problem using the finite element method. If run as a script, the result is plotted. This file can also be imported as a module and convergence tests run on the solver.

fe_utils.solvers.helmholtz.assemble(fs, f)[source]

Assemble the finite element system for the Helmholtz problem given the function space in which to solve and the right hand side function.

fe_utils.solvers.helmholtz.solve_helmholtz(degree, resolution, analytic=False, return_error=False)[source]

Solve a model Helmholtz problem on a unit square mesh with resolution elements in each direction, using equispaced Lagrange elements of degree degree.

## fe_utils.solvers.mastery module¶

Solve a nonlinear problem using the finite element method. If run as a script, the result is plotted. This file can also be imported as a module and convergence tests run on the solver.

fe_utils.solvers.mastery.solve_mastery(resolution, analytic=False, return_error=False)[source]

This function should solve the mastery problem with the given resolution. It should return both the solution Function and the $$L^2$$ error in the solution.

If analytic is True then it should not solve the equation but instead return the analytic solution. If return_error is true then the difference between the analytic solution and the numerical solution should be returned in place of the solution.

## fe_utils.solvers.poisson module¶

Solve a model poisson problem with Dirichlet boundary conditions using the finite element method.

If run as a script, the result is plotted. This file can also be imported as a module and convergence tests run on the solver.

fe_utils.solvers.poisson.assemble(fs, f)[source]

Assemble the finite element system for the Poisson problem given the function space in which to solve and the right hand side function.

fe_utils.solvers.poisson.boundary_nodes(fs)[source]

Find the list of boundary nodes in fs. This is a unit-square-specific solution. A more elegant solution would employ the mesh topology and numbering.

fe_utils.solvers.poisson.solve_poisson(degree, resolution, analytic=False, return_error=False)[source]

Solve a model Poisson problem on a unit square mesh with resolution elements in each direction, using equispaced Lagrange elements of degree degree.