Alamo
Public Member Functions | Static Public Member Functions | Data Fields | Private Member Functions
Solver::Nonlocal::Newton< T > Class Template Reference
Inheritance diagram for Solver::Nonlocal::Newton< T >:
[legend]
Collaboration diagram for Solver::Nonlocal::Newton< T >:
[legend]

Public Member Functions

 Newton ()
 
 Newton (Operator::Elastic< T::sym > &a_op)
 
 ~Newton ()
 
void Define (Operator::Elastic< T::sym > &a_op)
 
void Clear ()
 
void setNRIters (int a_nriters)
 
void setPsi (Set::Field< Set::Scalar > &a_psi)
 
Set::Scalar solve (const Set::Field< Set::Vector > &a_u_mf, const Set::Field< Set::Vector > &a_b_mf, Set::Field< T > &a_model_mf, Real a_tol_rel, Real a_tol_abs, const char *checkpoint_file=nullptr)
 
Set::Scalar solve (const Set::Field< Set::Scalar > &a_u_mf, const Set::Field< Set::Scalar > &a_b_mf, Set::Field< T > &a_model_mf, Real a_tol_rel, Real a_tol_abs, const char *checkpoint_file=nullptr)
 
Set::Scalar solve (const Set::Field< Set::Scalar > &a_u_mf, const Set::Field< Set::Scalar > &a_b_mf, Set::Field< T > &a_model_mf)
 
void compResidual (Set::Field< Set::Scalar > &a_res_mf, Set::Field< Set::Scalar > &a_u_mf, Set::Field< Set::Scalar > &a_b_mf, Set::Field< T > &a_model_mf)
 
void compResidual (Set::Field< Set::Vector > &a_res_mf, Set::Field< Set::Vector > &a_u_mf, Set::Field< Set::Vector > &a_b_mf, Set::Field< T > &a_model_mf)
 
void compLinearSolverResidual (Set::Field< Set::Vector > &a_res_mf, Set::Field< Set::Vector > &a_u_mf, Set::Field< Set::Vector > &a_b_mf)
 
void W (Set::Field< Set::Scalar > &a_w_mf, Set::Field< Set::Scalar > &a_u_mf, Set::Field< T > &a_model_mf)
 
void DW (Set::Field< Set::Scalar > &a_dw_mf, Set::Field< Set::Scalar > &a_u_mf, Set::Field< T > &a_model_mf)
 
- Public Member Functions inherited from Solver::Nonlocal::Linear
 Linear ()
 
 Linear (Operator::Operator< Grid::Node > &a_lp)
 
 ~Linear ()
 
void Define (Operator::Operator< Grid::Node > &a_lp)
 
void Clear ()
 
Set::Scalar solveaffine (amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs, Real a_tol_rel, Real a_tol_abs, bool copyrhs=false, const char *checkpoint_file=nullptr)
 
Set::Scalar solve (amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs, Real a_tol_rel, Real a_tol_abs, const char *checkpoint_file=nullptr)
 
Set::Scalar solve (amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs)
 
void apply (amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_rhs, amrex::Vector< std::unique_ptr< amrex::MultiFab > > &a_sol)
 
void setMaxIter (const int a_max_iter)
 
void setBottomMaxIter (const int a_bottom_max_iter)
 
void setMaxFmgIter (const int a_max_fmg_iter)
 
void setFixedIter (const int a_fixed_iter)
 
void setVerbose (const int a_verbose)
 
void setPreSmooth (const int a_pre_smooth)
 
void setPostSmooth (const int a_post_smooth)
 
void dumpOnConvergenceFail (const amrex::Vector< amrex::MultiFab * > &a_sol_mf, const amrex::Vector< amrex::MultiFab const * > &a_rhs_mf)
 

Static Public Member Functions

static void Parse (Newton< T > &value, amrex::ParmParse &pp)
 
- Static Public Member Functions inherited from Solver::Nonlocal::Linear
static void Parse (Linear &value, amrex::ParmParse &pp)
 

Data Fields

int m_nriters = 1
 
Set::Scalar m_nrtolerance = 0.0
 
Operator::Elastic< T::sym > * m_elastic
 
Set::Field< Set::Scalar > * m_psi = nullptr
 

Private Member Functions

void prepareForSolve (const Set::Field< Set::Scalar > &a_u_mf, const Set::Field< Set::Scalar > &a_b_mf, Set::Field< Set::Scalar > &a_rhs_mf, Set::Field< Set::Matrix > &a_dw_mf, Set::Field< Set::Matrix4< AMREX_SPACEDIM, T::sym >> &a_ddw_mf, Set::Field< T > &a_model_mf)
 
void prepareForSolve (const Set::Field< Set::Vector > &a_u_mf, const Set::Field< Set::Vector > &a_b_mf, Set::Field< Set::Scalar > &a_rhs_mf, Set::Field< Set::Matrix > &a_dw_mf, Set::Field< Set::Matrix4< AMREX_SPACEDIM, T::sym >> &a_ddw_mf, Set::Field< T > &a_model_mf)
 

Additional Inherited Members

- Protected Member Functions inherited from Solver::Nonlocal::Linear
void PrepareMLMG (amrex::MLMG &mlmg)
 
- Protected Attributes inherited from Solver::Nonlocal::Linear
int max_iter = -1
 
int bottom_max_iter = -1
 
int max_fmg_iter = -1
 
int fixed_iter = -1
 
int verbose = -1
 
int pre_smooth = -1
 
int post_smooth = -1
 
int final_smooth = -1
 
int bottom_smooth = -1
 
std::string bottom_solver
 
Set::Scalar cg_tol_rel = -1.0
 
Set::Scalar cg_tol_abs = -1.0
 
Set::Scalar bottom_tol_rel = -1.0
 
Set::Scalar bottom_tol_abs = -1.0
 
Set::Scalar tol_rel = -1.0
 
Set::Scalar tol_abs = -1.0
 
Set::Scalar omega = -1.0
 
bool average_down_coeffs = false
 
bool normalize_ddw = false
 
Operator::Operator< Grid::Node > * linop
 
amrex::MLMG * mlmg
 
bool m_defined = false
 
bool m_dump_on_fail = false
 
bool m_abort_on_fail = true
 

Detailed Description

template<typename T>
class Solver::Nonlocal::Newton< T >

Definition at line 15 of file Newton.H.

Constructor & Destructor Documentation

◆ Newton() [1/2]

template<typename T >
Solver::Nonlocal::Newton< T >::Newton ( )
inline

Definition at line 18 of file Newton.H.

◆ Newton() [2/2]

template<typename T >
Solver::Nonlocal::Newton< T >::Newton ( Operator::Elastic< T::sym > &  a_op)
inline

Definition at line 20 of file Newton.H.

◆ ~Newton()

template<typename T >
Solver::Nonlocal::Newton< T >::~Newton ( )
inline

Definition at line 25 of file Newton.H.

Member Function Documentation

◆ Clear()

template<typename T >
void Solver::Nonlocal::Newton< T >::Clear ( )
inline

Definition at line 36 of file Newton.H.

◆ compLinearSolverResidual()

template<typename T >
void Solver::Nonlocal::Newton< T >::compLinearSolverResidual ( Set::Field< Set::Vector > &  a_res_mf,
Set::Field< Set::Vector > &  a_u_mf,
Set::Field< Set::Vector > &  a_b_mf 
)
inline

Definition at line 499 of file Newton.H.

◆ compResidual() [1/2]

template<typename T >
void Solver::Nonlocal::Newton< T >::compResidual ( Set::Field< Set::Scalar > &  a_res_mf,
Set::Field< Set::Scalar > &  a_u_mf,
Set::Field< Set::Scalar > &  a_b_mf,
Set::Field< T > &  a_model_mf 
)
inline

Definition at line 442 of file Newton.H.

◆ compResidual() [2/2]

template<typename T >
void Solver::Nonlocal::Newton< T >::compResidual ( Set::Field< Set::Vector > &  a_res_mf,
Set::Field< Set::Vector > &  a_u_mf,
Set::Field< Set::Vector > &  a_b_mf,
Set::Field< T > &  a_model_mf 
)
inline

Definition at line 465 of file Newton.H.

◆ Define()

template<typename T >
void Solver::Nonlocal::Newton< T >::Define ( Operator::Elastic< T::sym > &  a_op)
inline

Definition at line 30 of file Newton.H.

◆ DW()

template<typename T >
void Solver::Nonlocal::Newton< T >::DW ( Set::Field< Set::Scalar > &  a_dw_mf,
Set::Field< Set::Scalar > &  a_u_mf,
Set::Field< T > &  a_model_mf 
)
inline

Definition at line 568 of file Newton.H.

◆ Parse()

template<typename T >
static void Solver::Nonlocal::Newton< T >::Parse ( Newton< T > &  value,
amrex::ParmParse &  pp 
)
inlinestatic

Definition at line 640 of file Newton.H.

◆ prepareForSolve() [1/2]

template<typename T >
void Solver::Nonlocal::Newton< T >::prepareForSolve ( const Set::Field< Set::Scalar > &  a_u_mf,
const Set::Field< Set::Scalar > &  a_b_mf,
Set::Field< Set::Scalar > &  a_rhs_mf,
Set::Field< Set::Matrix > &  a_dw_mf,
Set::Field< Set::Matrix4< AMREX_SPACEDIM, T::sym >> &  a_ddw_mf,
Set::Field< T > &  a_model_mf 
)
inlineprivate

Definition at line 52 of file Newton.H.

◆ prepareForSolve() [2/2]

template<typename T >
void Solver::Nonlocal::Newton< T >::prepareForSolve ( const Set::Field< Set::Vector > &  a_u_mf,
const Set::Field< Set::Vector > &  a_b_mf,
Set::Field< Set::Scalar > &  a_rhs_mf,
Set::Field< Set::Matrix > &  a_dw_mf,
Set::Field< Set::Matrix4< AMREX_SPACEDIM, T::sym >> &  a_ddw_mf,
Set::Field< T > &  a_model_mf 
)
inlineprivate

Definition at line 144 of file Newton.H.

◆ setNRIters()

template<typename T >
void Solver::Nonlocal::Newton< T >::setNRIters ( int  a_nriters)
inline

Definition at line 44 of file Newton.H.

◆ setPsi()

template<typename T >
void Solver::Nonlocal::Newton< T >::setPsi ( Set::Field< Set::Scalar > &  a_psi)
inline

Definition at line 46 of file Newton.H.

◆ solve() [1/3]

template<typename T >
Set::Scalar Solver::Nonlocal::Newton< T >::solve ( const Set::Field< Set::Scalar > &  a_u_mf,
const Set::Field< Set::Scalar > &  a_b_mf,
Set::Field< T > &  a_model_mf 
)
inline

Definition at line 435 of file Newton.H.

◆ solve() [2/3]

template<typename T >
Set::Scalar Solver::Nonlocal::Newton< T >::solve ( const Set::Field< Set::Scalar > &  a_u_mf,
const Set::Field< Set::Scalar > &  a_b_mf,
Set::Field< T > &  a_model_mf,
Real  a_tol_rel,
Real  a_tol_abs,
const char *  checkpoint_file = nullptr 
)
inline

Definition at line 356 of file Newton.H.

◆ solve() [3/3]

template<typename T >
Set::Scalar Solver::Nonlocal::Newton< T >::solve ( const Set::Field< Set::Vector > &  a_u_mf,
const Set::Field< Set::Vector > &  a_b_mf,
Set::Field< T > &  a_model_mf,
Real  a_tol_rel,
Real  a_tol_abs,
const char *  checkpoint_file = nullptr 
)
inline

Definition at line 275 of file Newton.H.

◆ W()

template<typename T >
void Solver::Nonlocal::Newton< T >::W ( Set::Field< Set::Scalar > &  a_w_mf,
Set::Field< Set::Scalar > &  a_u_mf,
Set::Field< T > &  a_model_mf 
)
inline

Definition at line 525 of file Newton.H.

Field Documentation

◆ m_elastic

template<typename T >
Operator::Elastic<T::sym>* Solver::Nonlocal::Newton< T >::m_elastic

Definition at line 629 of file Newton.H.

◆ m_nriters

template<typename T >
int Solver::Nonlocal::Newton< T >::m_nriters = 1

Definition at line 627 of file Newton.H.

◆ m_nrtolerance

template<typename T >
Set::Scalar Solver::Nonlocal::Newton< T >::m_nrtolerance = 0.0

Definition at line 628 of file Newton.H.

◆ m_psi

template<typename T >
Set::Field<Set::Scalar>* Solver::Nonlocal::Newton< T >::m_psi = nullptr

Definition at line 632 of file Newton.H.


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