Extend local asm interface#1214
Extend local asm interface#1214TomFischer merged 2 commits intoufz:masterfrom endJunction:ExtendLocalAsmInterface
Conversation
|
|
||
| virtual void preTimestep(std::vector<double> const& local_x) = 0; | ||
| virtual void postTimestep(std::vector<double> const& local_x, | ||
| double const t) = 0; |
There was a problem hiding this comment.
IMHO implementing these methods are optional. I'd appreciate empty default implementations.
There was a problem hiding this comment.
Yes I thought about it, but the default implementation might have a drawback that these functions are called for every element. I'll need to check that before providing the defaults here. Tonight.
Implementing the defaults.
|
In general 👍 |
|
Passing t and delta_t to the |
|
@Yonghui56 Please tell us if the t and delta_t are sufficient for your particular process. You can store them in the shared process data for later use (for example in the postTimestep()). |
assembleJacobian, pre/postTimestep, and addJacobianToGlobal. There are empty defaults but for jacobian assembly, which will fail if used but not implemented.
| LocalAssembler& local_assembler, | ||
| GlobalVector const& x) const | ||
| GlobalVector const& x, | ||
| double const t, |
There was a problem hiding this comment.
why not pass a TimeStep object which contain both information?
There was a problem hiding this comment.
I'd prefer two doubles for the time being. However, then one could also discuss their order. Cf. assemble(t,x,M,K,b) vs preTimestep(x,t,dt).
There was a problem hiding this comment.
Agree with Christoph, as long as we don't need the whole TimeStep object (e.g. for the multi-step methods storing multiple dt's) the two doubles are good.
|
👍 |
|
OpenGeoSys development has been moved to GitLab. |
This adds missing functions to the interface for the jacobian assembly and the pre/post timestep operations.