How-to guides¶
Recipes for single tasks. Each one says when you need it, lists the steps, and shows one complete example that runs as it stands. They assume that you know what you want: for the ideas behind them, read the topics, and for a first walk through pdemagic, the tutorial.
Stating a problem¶
Give one condition for all faces: the same value or slope on the whole boundary.
Give each face its own condition: a mapping from the faces of a box to their equations.
Let waves out through a wall: a complex condition that does not reflect a wave of one frequency.
Clamp a plate: the two conditions on each face that the plate equation takes.
Draw a shape with holes: a region of the plane from closed curves.
Name the pieces of a boundary: names of your own for curves, lines and arcs.
Make one direction periodic: a channel, a slab, a pipe without ends.
Use measured data as a source: an array in the place of a formula.
Start from an array: the initial state of a problem in time as an array.
Put a conductor in a field: bodies of metal in Poisson’s equation.
Controlling the solve¶
Read what was decided: print a plan and its notes.
Get more digits: find the entry that sets the accuracy, and check the result.
Choose the grid yourself: the box and the number of points.
Choose the times that are recorded: how many, and over which part of the time span.
Pick the solution that Newton’s method finds: a starting value for a nonlinear equation.
What to do when a plan says NOT resolved: find the cause, remove it or refine.
Set the number of threads: leave cores to other work.
Reuse a plan: keep a plan as text and solve with it again.
Working with results¶
Evaluate a solution at a point: values between the points of the grid.
Get the arrays and the grid: the values and their coordinates for numpy.
Integrate a solution: the integral of an unknown over its domain.
Ask for more modes: the number of eigenvalues, and where each eigenfunction lies in the result.
Save and load a solution: a file that holds the values, the plan and the diagnostics.
Plot a section in three dimensions: choose the plane that is drawn.
Animate a solution: a film of a problem in time.
Draw into your own figure: several plots side by side, with titles of your own.
Not found what you need? The questions that come up may hold it.