# TemporalDiscretization in MethodOfLines

When solving ODE's one can use options like MaxStepFraction to control the number of grid points.

When solving PDE's SpatialDiscretization option in MethodOfLines allows one to choose MinPoints for the spatial grid.

However there seem to be no such option as TemporalDiscretization.

How can one customize discretization along t-axis in MethodOfLines ?

Still, it's MaxStepSize/MaxStepFraction.

If you give a single number as the option value of these options, that option value will be used for every dimension of the PDE.

If you give a number list whose length is the same as the number of independent variable of the PDE as the option value (yeah this syntax is undocumented but valid), the list of numbers will be used as the option values for corresponding dimension. Here is an example.

All of the statement above can be verified by checking "Coordinates" of InterpolatingFunction generated by NDSolve. (If you don't know how to check, read this post. )

Nevertheless, notice that:

1. The initial value problem (IVP) solver of NDSolve is quite robust and we don't need to adjust time step choosing in most cases.

2. There's no MinStepSize/MinStepFraction option for NDSolve so we still need to adjust sub-option of TensorProductGrid if we need to control the spatial step size accurately.

• So if I use "MinPoints" -> 70 along with MaxStepFraction -> {Automatic, Automatic, 0.1} then which option will be actually used by NDSolve? (I think Automatic corresponds to "MinPoints" -> 20 or "MinPoints" -> 25). – jheidk51 Sep 4 at 6:51
• @jheidk51 "MinPoints"/"MaxPoints" will override Automatic of MaxStepFraction/MaxStepSize. You can verify this by checking "Coordinates" of the generated InterpolatingFunction. – xzczd Sep 4 at 6:57