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

Implementation of the DifferentiableBlockSolver interface for the special case of nonlinear solves with linear adjoint solves. More...

#include <differentiable_solver.hpp>

Collaboration diagram for smith::NonlinearDifferentiableBlockSolver:
Collaboration graph
[legend]

Public Member Functions

 NonlinearDifferentiableBlockSolver (std::unique_ptr< EquationSolver > s)
 Construct from a linear solver and linear block precondition which may be used by the linear solver.
 
void completeSetup (const std::vector< FieldT > &us) override
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::vector< FieldPtrsolve (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 override
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
std::vector< FieldPtrsolveAdjoint (const std::vector< DualPtr > &u_bars, std::vector< std::vector< MatrixPtr >> &jacobian_transposed) const override
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
- Public Member Functions inherited from smith::DifferentiableBlockSolver
virtual ~DifferentiableBlockSolver ()
 destructor
 
virtual void clearMemory () const
 Interface option to clear memory between solves to avoid high-water mark memory usage.
 

Public Attributes

std::unique_ptr< mfem::BlockOperator > block_jac_
 Need to hold an instance of a block operator to work with the mfem solver interface.
 
std::vector< std::vector< MatrixPtr > > matrix_of_jacs_
 
std::unique_ptr< EquationSolvernonlinear_solver_
 the nonlinear equation solver used for the forward pass
 

Additional Inherited Members

- Public Types inherited from smith::DifferentiableBlockSolver
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
 

Detailed Description

Implementation of the DifferentiableBlockSolver interface for the special case of nonlinear solves with linear adjoint solves.

Definition at line 181 of file differentiable_solver.hpp.

Member Data Documentation

◆ matrix_of_jacs_

std::vector<std::vector<MatrixPtr> > smith::NonlinearDifferentiableBlockSolver::matrix_of_jacs_
mutable

Holding vectors of block matrices to that do not going out of scope before the mfem solver is done with using them in the block_jac_

Definition at line 202 of file differentiable_solver.hpp.


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