Closed vlipovac closed 6 months ago
@vlipovac: So you know, I am working my way through the PR, but I'm not done yet. To be continued.
@keileg, regarding your comment
- It seems there is a consensus to let the indexes of time steps and iterates both start at 0. I think it's wise to have a second look at all indexes and tags for iterates and time steps, including None and where we start counting (current time/iterate vs first previous time/iterate).
I pushed the easy/trivial suggestions and resolved respective conversations (including my self-review). Open discussions are what's left.
@keileg @IvarStefansson
Regarding the discussion on unifying the time step indexation with the iterate indexation (time index 0 is current time):
This requires to introduce a new convention.
Since time index 0 is current time and we do not want to store same values twice, I propose making time_step_index=0
and iterate_index=0
equivalent throughout the framework.
(By "current time" we always refer to the current iterate, since otherwise it would ambiguous).
This convention must be implemented in pp.get_solution_values
and pp.set_solutuon_values
.
Any comments regarding that?
Also, this will introduce minor changes in several files, where time_step_index=0
was used for previous time,
2. I think it's wise to have a second look at all indexes and tags for iterates and time steps, including None and where we start counting (current time/iterate vs first previous time/iterate).
I'll see if I can have a look at some code later today, and will get back to this (soon, I hope).
@vlipovac: I have gone through the changes and resolved conversations with a somewhat heavy hand. In addition to what looks like minor fixes, there are two remaining issues (both discussed in some details in the relevant conversations):
time_step_index
and iterative_index
in a way that leaves decent but not necessarily polished code (your time is better spent on the upcoming PRs)EquationSystem.dofs_of()
.Let me know if you have comments or questions.
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Proposed changes
parse
for variables and replacing projection of global forward AdArray by slicing (less expensive than matrix multiplication)Since the changes are a bit extensive, I am giving a walk-through in the form of a self-review.
EDIT:
Following the 1st round of reviews, the index convention for previous time steps is now unified with the convention for previous iterates:
Since current time (unknown value) is given by
time_step_index = 0
and anyiterate_index >= 0
, it would be ambiguous to use the time step index. (and also unnecessary to store same data twice). Thereforetime_step_index = 0
is now not supported anymore.Types of changes
Checklist
pytest
was run with the--run-skipped
flag.