solve_laplace_2d
Solve the 2D Laplace equation on a unit square with constant Dirichlet edges using red-black Gauss-Seidel iteration, returning the solution grid, convergence status, and iteration count.
Instructions
Solve u_xx + u_yy = 0 on the unit square with constant Dirichlet edges.
Red-black Gauss-Seidel is iterated until max|u_new-u_old| < tol. If
``max_iter`` is reached first the call still succeeds, with
``converged = False`` and the achieved ``iterations`` count. The full grid
is saved as .npz; the returned grid is downsampled to at most 100x100.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nx": "<nx>",
"ny": "<ny>",
"left": "<left>",
"right": "<right>",
"top": "<top>",
"bottom": "<bottom>"
},
"name": "solve_laplace_2d"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nx | Yes | ||
| ny | Yes | ||
| tol | No | ||
| top | Yes | ||
| left | Yes | ||
| right | Yes | ||
| bottom | Yes | ||
| max_iter | No |