|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Orchestrates staggered solution for multiphysics systems. More...
#include <system_solver.hpp>
Classes | |
| struct | Stage |
| Represents a single stage in a staggered iteration. More... | |
Public Member Functions | |
| SystemSolver (std::shared_ptr< NonlinearBlockSolverBase > single_solver) | |
| Construct a monolithic SystemSolver from a single block solver. More... | |
| SystemSolver (int max_staggered_iterations, bool exact_staggered_steps=false) | |
| Construct a SystemSolver 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... | |
| void | appendStagesWithBlockMapping (const SystemSolver &subsystem_solver, const std::vector< size_t > &global_block_indices) |
| Append stages from another solver using a local-to-global block mapping. 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< SystemSolver > | 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. | |
| int | maxStaggeredIterations () const |
| Maximum number of staggered sweeps allowed for this solver. | |
| bool | exactStaggeredSteps () const |
Whether solver always performs exactly maxStaggeredIterations() sweeps. | |
Orchestrates staggered solution for multiphysics systems.
Definition at line 23 of file system_solver.hpp.
| smith::SystemSolver::SystemSolver | ( | std::shared_ptr< NonlinearBlockSolverBase > | single_solver | ) |
Construct a monolithic SystemSolver from a single block solver.
| single_solver | The solver to use for all blocks simultaneously. |
Definition at line 23 of file system_solver.cpp.
| smith::SystemSolver::SystemSolver | ( | int | max_staggered_iterations, |
| bool | exact_staggered_steps = false |
||
| ) |
Construct a SystemSolver 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 29 of file system_solver.cpp.
| void smith::SystemSolver::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 35 of file system_solver.cpp.
| void smith::SystemSolver::appendStagesWithBlockMapping | ( | const SystemSolver & | subsystem_solver, |
| const std::vector< size_t > & | global_block_indices | ||
| ) |
Append stages from another solver using a local-to-global block mapping.
| subsystem_solver | Source solver whose stages operate on subsystem-local block indices. |
| global_block_indices | Mapping from subsystem-local block index to global block index. |
Definition at line 45 of file system_solver.cpp.
| std::vector< FieldState > smith::SystemSolver::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 67 of file system_solver.cpp.