Smith  0.1
Smith is an implicit thermal structural mechanics simulation code.
Classes | Public Member Functions | List of all members
smith::CoupledSystemSolver Class Reference

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< FieldStatesolve (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. More...
 
std::shared_ptr< CoupledSystemSolversingleBlockSolver (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.
 

Detailed Description

Orchestrates staggered solution for multiphysics systems.

Definition at line 23 of file coupled_system_solver.hpp.

Constructor & Destructor Documentation

◆ CoupledSystemSolver() [1/2]

smith::CoupledSystemSolver::CoupledSystemSolver ( std::shared_ptr< NonlinearBlockSolverBase single_solver)

Construct a monolithic CoupledSystemSolver from a single block solver.

Parameters
single_solverThe solver to use for all blocks simultaneously.

Definition at line 21 of file coupled_system_solver.cpp.

◆ CoupledSystemSolver() [2/2]

smith::CoupledSystemSolver::CoupledSystemSolver ( int  max_staggered_iterations,
bool  exact_staggered_steps = false 
)

Construct a CoupledSystemSolver for staggered iteration.

Parameters
max_staggered_iterationsMaximum 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_stepsIf 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.

Member Function Documentation

◆ addSubsystemSolver()

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.

Parameters
block_indicesIndices of the blocks to solve.
solverNonlinear block solver for this stage.
relaxation_factorPer-stage relaxation factor in (0, 1].

Definition at line 33 of file coupled_system_solver.cpp.

◆ solve()

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.

Parameters
residual_evalsVector of WeakForm evaluations for each block.
block_indicesBlock indices for each residual evaluation.
shape_dispCurrent shape displacement.
statesNested vector of field states.
paramsNested vector of parameters.
time_infoCurrent time information.
bc_managersManagers for boundary conditions.
Returns
Updated field states.

Definition at line 43 of file coupled_system_solver.cpp.


The documentation for this class was generated from the following files: