|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Abstract interface for nonlinear block solvers that provide both forward and adjoint solves. More...
#include <nonlinear_block_solver.hpp>

Public Types | |
| using | FieldT = FiniteElementState |
| using | |
| using | FieldPtr = std::shared_ptr< FieldT > |
| using | |
| using | FieldD = FiniteElementDual |
| using | |
| using | DualPtr = std::shared_ptr< FieldD > |
| using | |
| using | MatrixPtr = std::unique_ptr< mfem::HypreParMatrix > |
| using | |
Public Member Functions | |
| virtual | ~NonlinearBlockSolverBase () |
| destructor | |
| virtual std::vector< FieldPtr > | solve (const std::vector< FieldPtr > &u_guesses, std::function< std::vector< mfem::Vector >(const std::vector< FieldPtr > &)> residuals, std::function< std::vector< std::vector< MatrixPtr >>(const std::vector< FieldPtr > &)> jacobians) const =0 |
| Solve a set of equations with a vector of FiniteElementState as unknown. More... | |
| virtual std::vector< FieldPtr > | solveAdjoint (const std::vector< DualPtr > &u_bars, std::vector< std::vector< MatrixPtr >> &jacobian_transposed) const =0 |
| Solve the (linear) adjoint set of equations with a vector of FiniteElementState as unknown. More... | |
| ConvergenceStatus | convergenceStatus (double tolerance_multiplier, const std::vector< mfem::Vector > &residuals) const |
| Evaluate convergence for this solver's configured tolerance using solver-owned convergence state. | |
| virtual ConvergenceStatus | convergenceStatus (double tolerance_multiplier, const std::vector< mfem::Vector > &residuals, NonlinearConvergenceContext &context) const =0 |
| Evaluate convergence with externally owned convergence state. | |
| virtual void | primeConvergenceContext (const std::vector< mfem::Vector > &residuals, NonlinearConvergenceContext &context) const =0 |
| Initialize a convergence context from a residual snapshot without relying on a fake convergence test. | |
| bool | checkConvergence (double tolerance_multiplier, const std::vector< mfem::Vector > &residuals) const |
| Check whether the current residuals satisfy the convergence criterion. | |
| virtual void | resetConvergenceState () const |
| Reset internal convergence tracking state (e.g. the stored initial residual norm used for relative tolerance). Call this at the start of each new solve sequence. | |
| virtual void | clearMemory () const |
| Interface option to clear memory between solves to avoid high-water mark memory usage. | |
| virtual void | setInnerToleranceMultiplier (double multiplier)=0 |
| Set an inner-solve tolerance multiplier, e.g. for staggered solves. | |
Protected Attributes | |
| bool | is_setup_ = false |
| Records if this block solver has its preconditioner initialized. | |
| NonlinearConvergenceContext | convergence_context_ = {} |
| Solver-owned convergence state for one solve. | |
Abstract interface for nonlinear block solvers that provide both forward and adjoint solves.
Definition at line 42 of file nonlinear_block_solver.hpp.
|
pure virtual |
Solve a set of equations with a vector of FiniteElementState as unknown.
| u_guesses | initial guess for solver |
| residuals | std::vector<std::function> for equations to be solved |
| jacobians | std::vector<std::vector>> of std::function for evaluating the linearized Jacobians about the current solution |
Implemented in smith::NonlinearBlockSolver.
|
pure virtual |
Solve the (linear) adjoint set of equations with a vector of FiniteElementState as unknown.
| u_bars | std::vector of right hand sides (rhs) for the solve |
| jacobian_transposed | std::vector<std::vector>> of evaluated linearized adjoint space matrices |
Implemented in smith::NonlinearBlockSolver.