Skip to content

Tupek/system solver extended#1609

Open
tupek2 wants to merge 80 commits into
developfrom
tupek/system_solver_extended
Open

Tupek/system solver extended#1609
tupek2 wants to merge 80 commits into
developfrom
tupek/system_solver_extended

Conversation

@tupek2

@tupek2 tupek2 commented May 20, 2026

Copy link
Copy Markdown
Collaborator

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.

mrtupek2 and others added 30 commits April 11, 2026 15:46
… we go along. workout some stress output details.
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...);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The nested return here is not very human-readable. Can we simplify this method?

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.

3 participants