Chi-Tech
chi_math::NonLinearSolver< MatType, VecType, SolverType > Class Template Referenceabstract

#include <NonLinearSolver.h>

Inheritance diagram for chi_math::NonLinearSolver< MatType, VecType, SolverType >:
lbs::NLKEigenvalueAGSSolver< MatType, VecType, SolverType >

Public Types

typedef NonLinearSolverContext< VecType, SolverType > NLSolverContext
 
typedef std::shared_ptr< NLSolverContextNLSolverContextPtr
 

Public Member Functions

 NonLinearSolver (NLSolverContextPtr context_ptr, const chi::InputParameters &params=NonLinearSolverOptions::GetInputParameters())
 
virtual ~NonLinearSolver ()
 
NonLinearSolverOptionsToleranceOptions ()
 
void ApplyToleranceOptions ()
 
NLSolverContextPtrGetContext ()
 
bool IsConverged () const
 
std::string GetConvergedReasonString () const
 
virtual void Setup ()
 
virtual void Solve ()
 

Protected Member Functions

bool IsSystemSet () const
 
virtual void PreSetupCallback ()
 
virtual void SetOptions ()
 
virtual void SetSolverContext ()
 
virtual void SetConvergenceTest ()
 
virtual void SetMonitor ()
 
virtual void SetPreconditioner ()
 
virtual void SetSystemSize ()=0
 
virtual void SetSystem ()=0
 
virtual void SetFunction ()=0
 
virtual void SetJacobian ()=0
 
virtual void PostSetupCallback ()
 
virtual void PreSolveCallback ()
 
virtual void SetInitialGuess ()=0
 
virtual void PostSolveCallback ()
 

Protected Attributes

const std::string solver_name_
 
NLSolverContextPtr context_ptr_ = nullptr
 
MatType J_
 
MatType P_
 
VecType r_
 
VecType x_
 
SolverType nl_solver_
 
int64_t num_local_dofs_ = 0
 
int64_t num_globl_dofs_ = 0
 
NonLinearSolverOptions options_
 

Private Attributes

bool system_set_ = false
 
bool converged_ = false
 
std::string converged_reason_string_
 

Detailed Description

template<class MatType, class VecType, class SolverType>
class chi_math::NonLinearSolver< MatType, VecType, SolverType >

Implementation of a general non-linear solver.

Definition at line 17 of file NonLinearSolver.h.

Member Typedef Documentation

◆ NLSolverContext

template<class MatType , class VecType , class SolverType >
typedef NonLinearSolverContext<VecType, SolverType> chi_math::NonLinearSolver< MatType, VecType, SolverType >::NLSolverContext

Definition at line 20 of file NonLinearSolver.h.

◆ NLSolverContextPtr

template<class MatType , class VecType , class SolverType >
typedef std::shared_ptr<NLSolverContext> chi_math::NonLinearSolver< MatType, VecType, SolverType >::NLSolverContextPtr

Definition at line 21 of file NonLinearSolver.h.

Constructor & Destructor Documentation

◆ NonLinearSolver()

template<class MatType , class VecType , class SolverType >
chi_math::NonLinearSolver< MatType, VecType, SolverType >::NonLinearSolver ( NLSolverContextPtr  context_ptr,
const chi::InputParameters params = NonLinearSolverOptions::GetInputParameters() 
)
inlineexplicit

Definition at line 23 of file NonLinearSolver.h.

◆ ~NonLinearSolver()

template<class MatType , class VecType , class SolverType >
virtual chi_math::NonLinearSolver< MatType, VecType, SolverType >::~NonLinearSolver ( )
virtual

Member Function Documentation

◆ ApplyToleranceOptions()

template<class MatType , class VecType , class SolverType >
void chi_math::NonLinearSolver< MatType, VecType, SolverType >::ApplyToleranceOptions ( )

◆ GetContext()

template<class MatType , class VecType , class SolverType >
NLSolverContextPtr & chi_math::NonLinearSolver< MatType, VecType, SolverType >::GetContext ( )
inline

Definition at line 36 of file NonLinearSolver.h.

◆ GetConvergedReasonString()

template<class MatType , class VecType , class SolverType >
std::string chi_math::NonLinearSolver< MatType, VecType, SolverType >::GetConvergedReasonString ( ) const

◆ IsConverged()

template<class MatType , class VecType , class SolverType >
bool chi_math::NonLinearSolver< MatType, VecType, SolverType >::IsConverged ( ) const
inline

Definition at line 38 of file NonLinearSolver.h.

◆ IsSystemSet()

template<class MatType , class VecType , class SolverType >
bool chi_math::NonLinearSolver< MatType, VecType, SolverType >::IsSystemSet ( ) const
inlineprotected

Definition at line 45 of file NonLinearSolver.h.

◆ PostSetupCallback()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::PostSetupCallback ( )
protectedvirtual

◆ PostSolveCallback()

◆ PreSetupCallback()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::PreSetupCallback ( )
protectedvirtual

◆ PreSolveCallback()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::PreSolveCallback ( )
protectedvirtual

◆ SetConvergenceTest()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::SetConvergenceTest ( )
protectedvirtual

◆ SetFunction()

◆ SetInitialGuess()

◆ SetJacobian()

◆ SetMonitor()

◆ SetOptions()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::SetOptions ( )
protectedvirtual

◆ SetPreconditioner()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::SetPreconditioner ( )
protectedvirtual

◆ SetSolverContext()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::SetSolverContext ( )
protectedvirtual

◆ SetSystem()

◆ SetSystemSize()

◆ Setup()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::Setup ( )
virtual

◆ Solve()

template<class MatType , class VecType , class SolverType >
virtual void chi_math::NonLinearSolver< MatType, VecType, SolverType >::Solve ( )
virtual

◆ ToleranceOptions()

template<class MatType , class VecType , class SolverType >
NonLinearSolverOptions & chi_math::NonLinearSolver< MatType, VecType, SolverType >::ToleranceOptions ( )
inline

Definition at line 33 of file NonLinearSolver.h.

Field Documentation

◆ context_ptr_

template<class MatType , class VecType , class SolverType >
NLSolverContextPtr chi_math::NonLinearSolver< MatType, VecType, SolverType >::context_ptr_ = nullptr
protected

Definition at line 68 of file NonLinearSolver.h.

◆ converged_

template<class MatType , class VecType , class SolverType >
bool chi_math::NonLinearSolver< MatType, VecType, SolverType >::converged_ = false
private

Definition at line 83 of file NonLinearSolver.h.

◆ converged_reason_string_

template<class MatType , class VecType , class SolverType >
std::string chi_math::NonLinearSolver< MatType, VecType, SolverType >::converged_reason_string_
private

Definition at line 84 of file NonLinearSolver.h.

◆ J_

template<class MatType , class VecType , class SolverType >
MatType chi_math::NonLinearSolver< MatType, VecType, SolverType >::J_
protected

Definition at line 70 of file NonLinearSolver.h.

◆ nl_solver_

template<class MatType , class VecType , class SolverType >
SolverType chi_math::NonLinearSolver< MatType, VecType, SolverType >::nl_solver_
protected

Definition at line 74 of file NonLinearSolver.h.

◆ num_globl_dofs_

template<class MatType , class VecType , class SolverType >
int64_t chi_math::NonLinearSolver< MatType, VecType, SolverType >::num_globl_dofs_ = 0
protected

Definition at line 77 of file NonLinearSolver.h.

◆ num_local_dofs_

template<class MatType , class VecType , class SolverType >
int64_t chi_math::NonLinearSolver< MatType, VecType, SolverType >::num_local_dofs_ = 0
protected

Definition at line 76 of file NonLinearSolver.h.

◆ options_

template<class MatType , class VecType , class SolverType >
NonLinearSolverOptions chi_math::NonLinearSolver< MatType, VecType, SolverType >::options_
protected

Definition at line 79 of file NonLinearSolver.h.

◆ P_

template<class MatType , class VecType , class SolverType >
MatType chi_math::NonLinearSolver< MatType, VecType, SolverType >::P_
protected

Definition at line 71 of file NonLinearSolver.h.

◆ r_

template<class MatType , class VecType , class SolverType >
VecType chi_math::NonLinearSolver< MatType, VecType, SolverType >::r_
protected

Definition at line 72 of file NonLinearSolver.h.

◆ solver_name_

template<class MatType , class VecType , class SolverType >
const std::string chi_math::NonLinearSolver< MatType, VecType, SolverType >::solver_name_
protected

Definition at line 66 of file NonLinearSolver.h.

◆ system_set_

template<class MatType , class VecType , class SolverType >
bool chi_math::NonLinearSolver< MatType, VecType, SolverType >::system_set_ = false
private

Definition at line 82 of file NonLinearSolver.h.

◆ x_

template<class MatType , class VecType , class SolverType >
VecType chi_math::NonLinearSolver< MatType, VecType, SolverType >::x_
protected

Definition at line 73 of file NonLinearSolver.h.


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