def history_dim(self) -> int | dict[str, int | tuple[int, int]] | None:
...
was that
int is for the case where we don't have the possibility of having named history in a dictionary because we use for example an ABAQUS UMAT which uses a vector of lenght $n_\mathrm{hist}$
dict[str, int | tuple[int, int]] is for the models that we implement in Python or Rust or C++, where having a dictionary is not a problem and it is just way more convenient to have a separate function for each history variable.
None: there is no history
Now, I noticed that handling 3 cases each time something is done to the history, produces a lot of ugly boilerplate code, so I would propose
My thought process behind the return type
was that
int
is for the case where we don't have the possibility of having named history in a dictionary because we use for example an ABAQUS UMAT which uses a vector of lenght $n_\mathrm{hist}$dict[str, int | tuple[int, int]]
is for the models that we implement in Python or Rust or C++, where having a dictionary is not a problem and it is just way more convenient to have a separate function for each history variable.None
: there is no historyNow, I noticed that handling 3 cases each time something is done to the history, produces a lot of ugly boilerplate code, so I would propose
and case 1. can be handled by sth. like
{"umat_history": n_hist}
.@pdiercks , @aradermacher , @saifr68 , what do you think?