NDSolve::lsopt NDSolveValue::lsopt ParametricNDSolve::lsopt ParametricNDSolveValue::lsopt
Examples
Basic Examples (1)
An error occurs because a list with one element is not a valid value for the MinPoints option when there are two spatial variables:
NDSolve[{D[u[x, y, t], t] == D[u[x, y, t], x, x] + D[u[x, y, t], y, y], u[x, y, 0] == Exp[-10 x ^ 2], u[1, y, t] == Exp[-10], u[-1, y, t] == Exp[-10], u[x, 1, t] == Exp[-10 x ^ 2], u[x, -1, t] == Exp[-10 x ^ 2]}, u, {x, -1, 1}, {y, -1, 1}, {t, 2}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "MinPoints" -> {10}}}]"MinPoints" should be a single number, not a list. Changing {10} to 10 resolves the issue:
NDSolve[{D[u[x, y, t], t] == D[u[x, y, t], x, x] + D[u[x, y, t], y, y], u[x, y, 0] == Exp[-10 x ^ 2], u[1, y, t] == Exp[-10], u[-1, y, t] == Exp[-10], u[x, 1, t] == Exp[-10 x ^ 2], u[x, -1, t] == Exp[-10 x ^ 2]}, u, {x, -1, 1}, {y, -1, 1}, {t, 2}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "MinPoints" -> 10}}]