|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Orchestrates staggered solution for multiphysics systems. More...
#include <coupled_system_solver.hpp>
Classes | |
| struct | Stage |
| Represents a single stage in a staggered iteration. More... | |
Public Member Functions | |
| CoupledSystemSolver (std::shared_ptr< NonlinearBlockSolverBase > single_solver) | |
| Construct a monolithic CoupledSystemSolver from a single block solver. More... | |
| CoupledSystemSolver (int max_staggered_iterations, bool exact_staggered_steps=false) | |
| Construct a CoupledSystemSolver for staggered iteration. More... | |
| void | addSubsystemSolver (const std::vector< size_t > &block_indices, std::shared_ptr< NonlinearBlockSolverBase > solver, double relaxation_factor=1.0) |
| Convenience method to add a solver stage. More... | |
| std::vector< FieldState > | solve (const std::vector< WeakForm * > &residual_evals, const std::vector< std::vector< size_t >> &block_indices, const FieldState &shape_disp, const std::vector< std::vector< FieldState >> &states, const std::vector< std::vector< FieldState >> ¶ms, const TimeInfo &time_info, const std::vector< const BoundaryConditionManager * > &bc_managers) const |
| Solves the multiphysics system using staggered iterations. More... | |
| std::shared_ptr< CoupledSystemSolver > | singleBlockSolver (size_t block_index) const |
Build a single-block solver from the stage responsible for block_index. Prefers constructing a fresh solver instance when the underlying stage solver retains rebuildable config. | |
Orchestrates staggered solution for multiphysics systems.
Definition at line 23 of file coupled_system_solver.hpp.
| smith::CoupledSystemSolver::CoupledSystemSolver | ( | std::shared_ptr< NonlinearBlockSolverBase > | single_solver | ) |
Construct a monolithic CoupledSystemSolver from a single block solver.
| single_solver | The solver to use for all blocks simultaneously. |
Definition at line 21 of file coupled_system_solver.cpp.
| smith::CoupledSystemSolver::CoupledSystemSolver | ( | int | max_staggered_iterations, |
| bool | exact_staggered_steps = false |
||
| ) |
Construct a CoupledSystemSolver for staggered iteration.
| max_staggered_iterations | Maximum number of staggered sweeps across all stages. When exact_staggered_steps is false, the solver may exit early once all stage solvers report convergence. |
| exact_staggered_steps | If true, always perform exactly 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. |
Definition at line 27 of file coupled_system_solver.cpp.
| void smith::CoupledSystemSolver::addSubsystemSolver | ( | const std::vector< size_t > & | block_indices, |
| std::shared_ptr< NonlinearBlockSolverBase > | solver, | ||
| double | relaxation_factor = 1.0 |
||
| ) |
Convenience method to add a solver stage.
| block_indices | Indices of the blocks to solve. |
| solver | Nonlinear block solver for this stage. |
| relaxation_factor | Per-stage relaxation factor in (0, 1]. |
Definition at line 33 of file coupled_system_solver.cpp.
| std::vector< FieldState > smith::CoupledSystemSolver::solve | ( | const std::vector< WeakForm * > & | residual_evals, |
| const std::vector< std::vector< size_t >> & | block_indices, | ||
| const FieldState & | shape_disp, | ||
| const std::vector< std::vector< FieldState >> & | states, | ||
| const std::vector< std::vector< FieldState >> & | params, | ||
| const TimeInfo & | time_info, | ||
| const std::vector< const BoundaryConditionManager * > & | bc_managers | ||
| ) | const |
Solves the multiphysics system using staggered iterations.
| residual_evals | Vector of WeakForm evaluations for each block. |
| block_indices | Block indices for each residual evaluation. |
| shape_disp | Current shape displacement. |
| states | Nested vector of field states. |
| params | Nested vector of parameters. |
| time_info | Current time information. |
| bc_managers | Managers for boundary conditions. |
Definition at line 43 of file coupled_system_solver.cpp.