|
Serac
0.1
Serac is an implicit thermal strucural mechanics simulation code.
|
This class manages the objects typically required to solve a nonlinear set of equations arising from discretization of a PDE of the form F(x) = 0. Specifically, it has. More...
#include <equation_solver.hpp>
Public Member Functions | |
| EquationSolver (std::unique_ptr< mfem::NewtonSolver > nonlinear_solver, std::unique_ptr< mfem::Solver > linear_solver, std::unique_ptr< mfem::Solver > preconditioner=nullptr) | |
| EquationSolver (NonlinearSolverOptions nonlinear_opts={}, LinearSolverOptions lin_opts={}, MPI_Comm comm=MPI_COMM_WORLD) | |
| Construct an equation solver object using nonlinear and linear solver option structs. More... | |
| void | setOperator (const mfem::Operator &op) |
| void | solve (mfem::Vector &x) const |
| mfem::NewtonSolver & | nonlinearSolver () |
| const mfem::NewtonSolver & | nonlinearSolver () const |
| mfem::Solver & | linearSolver () |
| const mfem::Solver & | linearSolver () const |
| mfem::Solver & | preconditioner () |
| const mfem::Solver & | preconditioner () const |
Static Public Member Functions | |
| static void | defineInputFileSchema (axom::inlet::Container &container) |
This class manages the objects typically required to solve a nonlinear set of equations arising from discretization of a PDE of the form F(x) = 0. Specifically, it has.
This EquationSolver manages these objects together to ensure they all exist when called by their associated physics simulation module.
An equation solver can either be constructed by supplying pre-built nonlinear and linear solvers with a preconditioner, or it can be constructed using serac::NonlinearSolverOptions and serac::LinearSolverOptions structs with the serac::mfem_ext::buildEquationSolver factory method.
Definition at line 45 of file equation_solver.hpp.
| serac::EquationSolver::EquationSolver | ( | std::unique_ptr< mfem::NewtonSolver > | nonlinear_solver, |
| std::unique_ptr< mfem::Solver > | linear_solver, | ||
| std::unique_ptr< mfem::Solver > | preconditioner = nullptr |
||
| ) |
Constructs a new nonlinear equation solver
| [in] | nonlinear_solver | A constructed nonlinear solver |
| [in] | linear_solver | A constructed linear solver to be called by the nonlinear algorithm and adjoint equation solves |
| [in] | preconditioner | An optional constructed precondition to aid the linear solver |
Definition at line 879 of file equation_solver.cpp.
| serac::EquationSolver::EquationSolver | ( | NonlinearSolverOptions | nonlinear_opts = {}, |
| LinearSolverOptions | lin_opts = {}, |
||
| MPI_Comm | comm = MPI_COMM_WORLD |
||
| ) |
Construct an equation solver object using nonlinear and linear solver option structs.
| nonlinear_opts | The options to configure the nonlinear solution scheme |
| lin_opts | The options to configure the underlying linear solution scheme to be used by the nonlinear solver |
| comm | The MPI communicator for the supplied nonlinear operators and HypreParVectors |
Definition at line 870 of file equation_solver.cpp.
|
static |
Input file parameters specific to this class
Definition at line 1237 of file equation_solver.cpp.
|
inline |
Returns the underlying linear solver object
Definition at line 101 of file equation_solver.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 106 of file equation_solver.hpp.
|
inline |
Returns the underlying solver object
Definition at line 90 of file equation_solver.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 95 of file equation_solver.hpp.
|
inline |
Returns the underlying preconditioner
Definition at line 113 of file equation_solver.hpp.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 118 of file equation_solver.hpp.
| void serac::EquationSolver::setOperator | ( | const mfem::Operator & | op | ) |
Updates the solver with the provided operator
| [in] | op | The operator (nonlinear system of equations) to use, "F" in F(x) = 0 |
Definition at line 891 of file equation_solver.cpp.
| void serac::EquationSolver::solve | ( | mfem::Vector & | x | ) | const |
Solves the system F(x) = 0
| [in,out] | x | Solution to the system of nonlinear equations |
Definition at line 902 of file equation_solver.cpp.