Open ddundo opened 8 months ago
Sure, that works! Cheers
@jwallwork23 actually I guess a better solution would be to more rigorously define tp.subintervals
so they follow this $t \in (t{start}, t{end}]$. At the moment we have tp.subintervals
be something like [(0, 1), (1, 2)]
whereas we would need [(0+dt, 1), (1+dt, 2)]
. What do you think?
Then we can keep t = t_start
in demos and similarly MeshSeq.time
(introduced in #137) can be initialised to the subinterval start time. So it would be nice to keep everything consistent.
I think rather than edit the subintervals
attribute (which makes intuitive sense given how the TimePartition
splits up the temporal domain), it would be better to introduce two new ones (something like):
timestep_starts
- a list containing the time at the start of each timesteptimestep_ends
- a list containing the time at the end of each timestepThen you could even
for time in tp.timestep_ends:
# solve
Thanks @jwallwork23. I'm waiting to see how the use of time develops in #28 before addressing this. (no rush at all)
Initial thought is that I don't really see a need to introduce timestep_starts
and timestep_ends
- I think I would rather just make a clear (verbal) distinction between tp.subintervals[0][0]
and MeshSeq.time
, for both of which we currently use "start time"
Thanks @jwallwork23. I'm waiting to see how the use of time develops in #28 before addressing this. (no rush at all)
We decided not to introduce MeshSeq.time
so only the time in demos themselves should be modified.
All demos have their
get_solver
defined as something like this:where the implication is that we are solving the problem for $t \in [t{start}, t{end})$ when it's actually $t \in (t{start}, t{end}]$. This doesn't matter in these demos, but it does in my bubble shear demos, where I had to change this to
in order to compute the velocity at the correct time.
How about refactoring the demos to instead look like this: