Tupek/system solver extended#1609
Open
tupek2 wants to merge 80 commits into
Open
Conversation
… we go along. workout some stress output details.
…eanup cycle zero handling.
…ting a bit easier.
…me duplication removal.
lihanyu97
reviewed
Jun 18, 2026
| weak_form_->AddDomainIntegral( | ||
| Dimension<spatial_dim>{}, DependsOn<all_params...>{}, | ||
| [dt, cycle, mode, integrand](double time, auto X, auto... inputs) { | ||
| return integrand(TimeInfo(time, *dt, *cycle, *mode), X, inputs...); |
Contributor
There was a problem hiding this comment.
I think reconstructing time_info here will also result in double adding dt, as we observed in time_discretized_weak_form. Since we are already storing dt_, cycle_, and mode_, can we store time_info_ = time_info when we invoke residual() and jacobian()?
Then the lambda injected for these add integral functions would be
[time_info, integrand] (double /* time */, auto X, auto... inputs) {
return integrand(time_info, X, inputs...);
}
lihanyu97
reviewed
Jul 1, 2026
Comment on lines
+275
to
+290
| return applyTimeRuleToPrefix( | ||
| rule, t_info, | ||
| [&](auto... self_states_and_tail) { | ||
| constexpr std::size_t n_self = sizeof...(self_states_and_tail) - tail_count; | ||
| auto all = std::forward_as_tuple(self_states_and_tail...); | ||
| return [&]<std::size_t... Si, std::size_t... Ti>(std::index_sequence<Si...>, std::index_sequence<Ti...>) { | ||
| return applyCouplingTimeRules( | ||
| coupling, t_info, | ||
| [&](auto... interpolated_coupling) { | ||
| return std::forward<Callback>(callback)(std::get<Si>(all)..., interpolated_coupling...); | ||
| }, | ||
| std::get<n_self + Ti>(all)...); | ||
| }(std::make_index_sequence<n_self>{}, std::make_index_sequence<tail_count>{}); | ||
| }, | ||
| raw_args...); | ||
| } |
Contributor
There was a problem hiding this comment.
The nested return here is not very human-readable. Can we simplify this method?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces a new interface for constructing multiphysics systems of equations, their boundary conditions, time integration rules, and solving them using potentially customized staggered or coupled algorithms.