Skip to content

Extend local asm interface#1214

Merged
TomFischer merged 2 commits intoufz:masterfrom
endJunction:ExtendLocalAsmInterface
May 27, 2016
Merged

Extend local asm interface#1214
TomFischer merged 2 commits intoufz:masterfrom
endJunction:ExtendLocalAsmInterface

Conversation

@endJunction
Copy link
Copy Markdown
Member

This adds missing functions to the interface for the jacobian assembly and the pre/post timestep operations.

Comment thread ProcessLib/LocalAssemblerInterface.h Outdated

virtual void preTimestep(std::vector<double> const& local_x) = 0;
virtual void postTimestep(std::vector<double> const& local_x,
double const t) = 0;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO implementing these methods are optional. I'd appreciate empty default implementations.

Copy link
Copy Markdown
Member Author

@endJunction endJunction May 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chleh
Copy link
Copy Markdown
Collaborator

chleh commented May 25, 2016

In general 👍
Maybe we have to discuss whether to use empty default implementations or not.
Maybe for assembleJacobian/addJacobianToGlobal a failing default implementation would be best.

@endJunction
Copy link
Copy Markdown
Member Author

endJunction commented May 25, 2016

Passing t and delta_t to the Process::preTimestep is needed because the local assembler's::preTimestep(x, t, delta_t) needs it and the straight forward way to get the time there is over Process::preTimestep(x, t).

@endJunction
Copy link
Copy Markdown
Member Author

@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,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not pass a TimeStep object which contain both information?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@chleh
Copy link
Copy Markdown
Collaborator

chleh commented May 27, 2016

👍

@TomFischer TomFischer merged commit 04312c2 into ufz:master May 27, 2016
@TomFischer TomFischer deleted the ExtendLocalAsmInterface branch May 27, 2016 08:55
@ogsbot
Copy link
Copy Markdown
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants