implementations.problem_classes.polynomial_test_problem module

class polynomial_testequation(degree=1, seed=26266, useGPU=False)[source]

Bases: Problem

Dummy problem for tests only! In particular, the solve_system function just returns the exact solution instead of solving an appropriate system. This class is indented to be used for tests of operations that are exact on polynomials.

dtype_f

alias of mesh

dtype_u

alias of mesh

eval_f(u, t)[source]

Derivative of the polynomial.

Parameters:
  • u (dtype_u) – Current values of the numerical solution.

  • t (float) – Current time of the numerical solution is computed.

Returns:

f – The right-hand side of the problem.

Return type:

dtype_f

solve_system(rhs, factor, u0, t)[source]

Just return the exact solution…

Parameters:
  • rhs (dtype_f) – Right-hand side for the linear system.

  • factor (float) – Abbrev. for the local stepsize (or any other factor required).

  • u0 (dtype_u) – Initial guess for the iterative solver.

  • t (float) – Current time (e.g. for time-dependent BCs).

Returns:

me – The solution as mesh.

Return type:

dtype_u

u_exact(t, **kwargs)[source]

Evaluate the polynomial.

Parameters:
  • t (float) – Time of the exact solution.

  • u_init (pySDC.problem.testequation0d.dtype_u) – Initial solution.

  • t_init (float) – The initial time.

Returns:

me – The exact solution.

Return type:

dtype_u

xp = <module 'numpy' from '/home/runner/micromamba/envs/pySDC/lib/python3.12/site-packages/numpy/__init__.py'>
class polynomial_testequation_IMEX(degree=1, seed=26266, useGPU=False)[source]

Bases: polynomial_testequation

IMEX version of the polynomial test problem that assigns half the derivative to the implicit part and the other half to the explicit part. Keep in mind that you still cannot Really perform any solves.

dtype_f

alias of imex_mesh

eval_f(u, t)[source]

Derivative of the polynomial.

Parameters:
  • u (dtype_u) – Current values of the numerical solution.

  • t (float) – Current time of the numerical solution is computed.

Returns:

f – The right-hand side of the problem.

Return type:

dtype_f