Skip to content

Tupek/system solver#1556

Open
tupek2 wants to merge 146 commits intodevelopfrom
tupek/system_solver
Open

Tupek/system solver#1556
tupek2 wants to merge 146 commits intodevelopfrom
tupek/system_solver

Conversation

@tupek2
Copy link
Copy Markdown
Collaborator

@tupek2 tupek2 commented Mar 16, 2026

  • Consolidated Time Integrators: Removed specific integrators (e.g., solid_mechanics_time_integrator.hpp) and replaced them with a generic MultiphysicsTimeIntegrator capable of handling coupled systems.
  • Generic System Templates: Replaced specific dynamic/static struct definitions (solid_dynamics_system.hpp, solid_statics_with_internal_vars_system.hpp) with configurable templates (solid_mechanics_system.hpp, solid_mechanics_with_internal_vars_system.hpp) that accept custom time integration rules.
  • Solver Relaxation: Introduced a relaxation_factor into the CoupledSystemSolver to support under-relaxation for staggered multi-physics solves (e.g., x n e w = ω x s o l v e d + ( 1 − ω ) x o l d ).
  • Cycle-Zero Acceleration Solves: Built explicit support into the systems and time integrators for "cycle zero" solves to establish initial accelerations from initial displacements and velocities.
  • System Solver Robustness: Improved SystemSolver convergence logic (using global L2 norm of the un-staggered residual) and replaced brittle string-matching with O ( 1 ) block index mappings.
  • Deprecation of Old Physics Forms: Deleted legacy solid_weak_form.hpp and heat_transfer_weak_form.hpp from the smith/physics directory, routing users entirely through the new differentiable numerics block solvers.
  • Extended Field Store: Added dependent fields and state indexing to the FieldStore to handle states and time derivatives ( VAL , DOT , DDOT ) seamlessly for multiple variables.
  • Test Suite Overhaul: Re-wrote tests (test_thermo_mechanics.cpp, test_solid_dynamics.cpp, test_thermal_static.cpp) to utilize the updated block solvers and newly abstracted simulation builders.

tupek2 and others added 30 commits February 9, 2026 14:22
@tlroy
Copy link
Copy Markdown
Contributor

tlroy commented Apr 8, 2026

Does LinearSolverOptions.sub_block_linear_solver_options allow for nested block solvers? We should test that.

@tlroy
Copy link
Copy Markdown
Contributor

tlroy commented Apr 8, 2026

LinearSolverOptions.sub_block_linear_solver_options requires a linear solver even if one wants to apply the preconditioner by itself. We should set up a LinearSolver:None

Copy link
Copy Markdown
Member

@ebchin ebchin left a comment

Choose a reason for hiding this comment

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

Very elegant, very flexible; a lot of good stuff here.

I know the focus here is coupled PDEs, but it seems like a lot of this can be used for solving constraints too. Excited to try it out for contact!

@@ -1,3 +1,4 @@

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove extra line

* @brief Enum for different types of time derivatives.
*/
enum class TimeDerivative
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does it make sense to add an integral time derivative type? I'm thinking of places where the independent field might already be a time derivative.

}

return {new_states, reactions};
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe I haven't gotten there yet, but is there something that works with multi-stage time integration schemes like RK4?

/// @param exact_staggered_steps If true, always perform exactly @p max_staggered_iterations
/// sweeps with no early-exit convergence check. Useful when a fixed number of
/// partitioned-stagger steps is required regardless of residual level.
CoupledSystemSolver(int max_staggered_iterations, bool exact_staggered_steps = false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems like you can set this up to do Uzawa iterations to solve for constraints?

tangent_weights[field_index_to_diff] = 0.0;
if (field_index_to_diff != invalid_block_index) {
tangent_weights[field_index_to_diff] = 1.0;
auto jac_ij = residual_evals[row_i]->jacobian(time_info, shape_disp_ptr.get(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we refactor WeakForm::jacobian() to only take the derivative w.r.t. a single field? If you had a thermomechanical system or a constrained system, the size of the blocks would be different anyway.

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

Labels

ready for review Ready for active inspection by reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants