19 class NonlinearBlockSolverBase;
20 class BoundaryConditionManager;
28 std::shared_ptr<NonlinearBlockSolverBase>
solver;
36 SystemSolver(std::shared_ptr<NonlinearBlockSolverBase> single_solver);
45 SystemSolver(
int max_staggered_iterations,
bool exact_staggered_steps =
false);
51 void addSubsystemSolver(
const std::vector<size_t>& block_indices, std::shared_ptr<NonlinearBlockSolverBase> solver,
52 double relaxation_factor = 1.0);
58 const std::vector<size_t>& global_block_indices);
69 std::vector<FieldState>
solve(
const std::vector<WeakForm*>& residual_evals,
70 const std::vector<std::vector<size_t>>& block_indices,
const FieldState& shape_disp,
71 const std::vector<std::vector<FieldState>>& states,
72 const std::vector<std::vector<FieldState>>& params,
const TimeInfo& time_info,
73 const std::vector<const BoundaryConditionManager*>& bc_managers)
const;
86 int max_staggered_iterations_;
87 bool exact_staggered_steps_;
88 std::vector<Stage> stages_;
Orchestrates staggered solution for multiphysics systems.
bool exactStaggeredSteps() const
Whether solver always performs exactly maxStaggeredIterations() sweeps.
SystemSolver(std::shared_ptr< NonlinearBlockSolverBase > single_solver)
Construct a monolithic SystemSolver from a single block solver.
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.
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 ...
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.
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.
int maxStaggeredIterations() const
Maximum number of staggered sweeps allowed for this solver.
A file defining some enums and structs that are used by the different physics modules.
Accelerator functionality.
gretl::State< FEFieldPtr, FEDualPtr > FieldState
typedef
This file contains enumerations and record types for physics solver configuration.
Represents a single stage in a staggered iteration.
std::vector< size_t > block_indices
Which blocks (residuals) to solve in this stage.
std::shared_ptr< NonlinearBlockSolverBase > solver
Solver to use for this stage.
struct storing time and timestep information