# `dedalus.core.problems`

Classes for representing systems of equations.

## Module Contents

class LinearBoundaryValueProblem(variables, namespace=None)

Linear boundary value problems.

Parameters
• variables (list of Field objects) – Problem variables to solve for.

• namespace (dict-like, optional) – Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass “locals()” from the user script.

Notes

This class supports linear boundary value problems of the form:

L.X = F

The LHS terms must be linear in the problem variables, and the RHS can be inhomogeneous but must be independent of the problem variables.

Solution procedure:
• Form L

• Evaluate F

• Solve X = L F

solver_class
class NonlinearBoundaryValueProblem(*args, **kw)

Nonlinear boundary value problems.

Parameters
• variables (list of Field objects) – Problem variables to solve for.

• namespace (dict-like, optional) – Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass “locals()” from the user script.

Notes

This class supports nonlinear boundary value problems of the form:

F(X) = G(X)

which are recombined to form the root-finding problem:

H(X) = F(X) - G(X) = 0

The problem is reduced into a linear BVP for an update to the solution using the Newton-Kantorovich method and the symbolically-computed Frechet differential of the equation:

H(X[n+1]) = 0 H(X[n] + dX) = 0 H(X[n]) + dH(X[n]).dX = 0 dH(X[n]).dX = - H(X[n])

Iteration procedure:
• Form dH(X[n])

• Evaluate H(X[n])

• Solve dX = - dH(X[n]) H(X[n])

• Update X[n+1] = X[n] + dX

solver_class
class InitialValueProblem(variables, time='t', **kw)

Initial value problems.

Parameters
• variables (list of Field objects) – Problem variables to solve for.

• time (str or Field object, optional) – Name (if str) or field for time variable (default: ‘t’).

• namespace (dict-like, optional) – Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass “locals()” from the user script.

Notes

This class supports non-linear initial value problems of the form:

M.dt(X) + L.X = F(X, t)

The LHS terms must be linear in the problem variables, time independent, and first-order in time derivatives. The RHS terms must not contain any explicit time derivatives.

solver_class
build_EVP(eigenvalue=None, backgrounds=None, perturbations=None, **kw)

Create an eigenvalue problem from an initial value problem.

Parameters
• eigenvalue (Field, optional) – Eigenvalue field.

• backgrounds (list of Fields, optional) – Background fields for linearizing the RHS. Default: the IVP variables.

• perturbations (list of Fields, optional) – Perturbation fields for the EVP. Default: copies of IVP variables.

Notes

This method converts time-independent IVP equations of the form

M.dt(X) + L.X = F(X)

to EVP equations as

λ*M.X1 + L.X1 - F’(X0).X1 = 0.

If backgrounds (X0) are not specified, the IVP variables (X) are used.

class EigenvalueProblem(variables, eigenvalue, **kw)

Linear eigenvalue problems.

Parameters
• variables (list of Field objects) – Problem variables to solve for.

• eigenvalue (Field object) – Field object representing the eigenvalue.

• namespace (dict-like, optional) – Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass “locals()” from the user script.

Notes

This class supports linear eigenvalue problems of the form:

λ*M.X + L.X = 0

The LHS terms must be linear in the specified variables and affine in the eigenvalue. The RHS must be zero.

solver_class
IVP
LBVP
NLBVP
EVP