|
Smith
0.1
Smith is an implicit thermal structural mechanics simulation code.
|
Abstract interface to DifferentiableBlockSolver interface. Each differentiable block solve should provide both its forward solve and an adjoint solve. More...
#include <differentiable_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 | ~DifferentiableBlockSolver () |
| destructor | |
| virtual void | completeSetup (const std::vector< FieldT > &us)=0 |
| Required for certain solvers/preconditions, e.g. when multigrid algorithms want a near null-space For these cases, it should be called before solve. | |
| 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... | |
| virtual void | clearMemory () const |
| Interface option to clear memory between solves to avoid high-water mark memory usage. | |
Abstract interface to DifferentiableBlockSolver interface. Each differentiable block solve should provide both its forward solve and an adjoint solve.
Definition at line 118 of file differentiable_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::NonlinearDifferentiableBlockSolver, and smith::LinearDifferentiableBlockSolver.
|
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::NonlinearDifferentiableBlockSolver, and smith::LinearDifferentiableBlockSolver.