Poisson Solver¤
(for completion - not a time-dependent stepper)
exponax.poisson.Poisson
¤
Bases: Module
Source code in exponax/_poisson.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
__init__
¤
__init__(
num_spatial_dims: int,
domain_extent: float,
num_points: int,
*,
order=2
)
Exactly solve the Poisson equation with periodic boundary conditions.
This "stepper" is different from all other steppers in this package in that it does not solve a time-dependent PDE. Instead, it solves the Poisson equation
\[ u_{xx} = - f \]
for a given right hand side \(f\).
It is included for completion.
Arguments:
num_spatial_dims
: The number of spatial dimensions.domain_extent
: The extent of the domain.num_points
: The number of points in each spatial dimension.order
: The order of the Poisson equation. Defaults to 2. You can also setorder=4
for the biharmonic equation.
Source code in exponax/_poisson.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
__call__
¤
__call__(
f: Float[Array, "C ... N"]
) -> Float[Array, "C ... N"]
Solve the Poisson equation in state space.
Arguments:
f
: The right hand side.
Returns:
u
: The solution.
Source code in exponax/_poisson.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|