#include <RadiationDiffusionFDOpSplitPrec.h>

Public Types | |
| typedef std::shared_ptr< AMP::Solver::SolverStrategy > | shared_ptr |
| enum class | SolverStatus { ConvergedOnAbsTol , ConvergedOnRelTol , ConvergedUserCondition , MaxIterations , DivergedLineSearch , DivergedStepSize , DivergedFunctionCount , DivergedOnNan , DivergedNestedSolver , DivergedOther } |
Static Public Member Functions | |
| static std::unique_ptr< AMP::Solver::SolverStrategy > | create (std::shared_ptr< AMP::Solver::SolverStrategyParameters > params) |
| static std::string | statusToString (SolverStatus status) |
Protected Member Functions | |
| virtual bool | checkStoppingCriteria (AMP::Scalar res_norm, bool check_iters=true) |
| void | getBaseFromInput (std::shared_ptr< AMP::Database > db) |
Static Protected Attributes | |
| static int | d_iInstanceId |
Private Member Functions | |
| void | diffusionSolve (std::shared_ptr< const AMP::LinearAlgebra::Vector > bE, std::shared_ptr< const AMP::LinearAlgebra::Vector > bT, std::shared_ptr< AMP::LinearAlgebra::Vector > E, std::shared_ptr< AMP::LinearAlgebra::Vector > T) const |
| void | reactionSolve (std::shared_ptr< const AMP::LinearAlgebra::Vector > bE, std::shared_ptr< const AMP::LinearAlgebra::Vector > bT, std::shared_ptr< AMP::LinearAlgebra::Vector > E, std::shared_ptr< AMP::LinearAlgebra::Vector > T) |
| void | scalar2x2Solve (double a, double b, double c, double d, double e, double f, double &x, double &y) const |
| void | setDiffusionSolvers () |
| Set d_difSolverE and d_difSolverT based on current state of operator. | |
Private Attributes | |
| std::unique_ptr< AMP::Solver::SolverStrategy > | d_difSolverE = nullptr |
| Solvers for approximately inverting diagonal diffusion blocks. | |
| std::unique_ptr< AMP::Solver::SolverStrategy > | d_difSolverT = nullptr |
Static Private Attributes | |
| static constexpr double | SINGULAR_TOL = 1e-15 |
| Tolerance for determining if 2x2 system is singular. | |
A solver based on an operator-split, block-based preconditioner for the LinearOperator BDFRadDifOpPJac = A == I + gamma*D + gamma*R, where D is a 2x2 block-diagonal diffusion matrix, and R is a 2x2 block matrix with diagonal blocks. The preconditioner matrix arises in factored form as P = P_dif * P_react, where P_dif = ( I + gamma*D ), P_react = ( I + gamma*R ). The solver is implemented to solve the linear system A*[E,T] = [bE,bT] in the form of a stationary linear iteration of the form [E,T] <- [E,T] + [dE,dT], where P*[dE,dT]=r, for residual r = [bE,bT]-A*[E,T].
Note that one iteration of the preconditioner is equivalent to returning [E,T] = P^{-1} * [bE,bT].
The inverse of ( I + gamma*D ) is carried out approximately by applying individual solvers to each of its diagonal blocks. The incoming Database must contain a 'DiffusionBlocks' Database with sufficient information for the corresponding solvers to be created from a Solverfactory.
The incoming operator is assumed to be a AMP::Operator::BDFRadDifOpPJac. Our operator's d_data member variable is utilized by this class.
Definition at line 48 of file RadiationDiffusionFDOpSplitPrec.h.
|
inherited |
Definition at line 30 of file SolverStrategy.h.
|
stronginherited |
| Enumerator | |
|---|---|
| ConvergedOnAbsTol | |
| ConvergedOnRelTol | |
| ConvergedUserCondition | |
| MaxIterations | |
| DivergedLineSearch | |
| DivergedStepSize | |
| DivergedFunctionCount | |
| DivergedOnNan | |
| DivergedNestedSolver | |
| DivergedOther | |
Definition at line 62 of file SolverStrategy.h.
| AMP::Solver::BDFRadDifOpPJacOpSplitPrec::BDFRadDifOpPJacOpSplitPrec | ( | std::shared_ptr< AMP::Solver::SolverStrategyParameters > | params | ) |
|
overridevirtual |
Apply the preconditioner in the form of a stationary linear iteration
Implements AMP::Solver::SolverStrategy.
|
protectedvirtualinherited |
|
inlinestatic |
Definition at line 56 of file RadiationDiffusionFDOpSplitPrec.h.
|
private |
Solve the diffusion system P_dif*[E,T] = [bE, bT] for [E,T]
|
inlineinherited |
Definition at line 208 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_dAbsoluteTolerance.
|
protectedinherited |
Definition at line 225 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::ConvergedUserCondition, and AMP::Solver::SolverStrategy::d_ConvergenceStatus.
|
inlineinherited |
Definition at line 230 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_ConvergenceStatus.
|
inlineinherited |
Definition at line 232 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_ConvergenceStatus, and AMP::Solver::SolverStrategy::statusToString().
Get level of diagnostic information printed during iterations.
Definition at line 137 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_iDebugPrintInfoLevel.
|
inlineinherited |
Definition at line 269 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_exec_space.
|
inlineinherited |
Definition at line 267 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_pFunctionScaling.
|
inlinevirtualinherited |
Definition at line 241 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_dInitialResidual.
|
inlinevirtualinherited |
Definition at line 243 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_iterationHistory.
Return the number of iterations taken by the solver to converge.
Definition at line 142 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_iNumberIterations.
Definition at line 218 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_iMaxIterations.
|
inlinevirtualinherited |
Return a nested solver (eg preconditioner) if it exists. By default return a nullptr
Reimplemented in AMP::Solver::PetscSNESSolver.
Definition at line 172 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_pNestedSolver.
|
virtualinherited |
Return a shared pointer to the operator registered with the solver.
|
inlineinherited |
Definition at line 212 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_dRelativeTolerance.
|
inlinevirtualinherited |
Definition at line 239 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_dResidualNorm.
|
inlineinherited |
Definition at line 266 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_pSolutionScaling.
|
virtualinherited |
Initialize the solution vector and potentially create internal vectors needed for solution
| [in] | parameters | The parameters object contains a database object. Currently there are no required fields for the database object. |
Reimplemented in AMP::Solver::BoomerAMGSolver, AMP::Solver::HypreBiCGSTABSolver, AMP::Solver::HypreGMRESSolver, AMP::Solver::HyprePCGSolver, AMP::Solver::HypreSolver, AMP::Solver::Flow1DSolver, AMP::Solver::PetscKrylovSolver, AMP::Solver::TrilinosMLSolver, AMP::Solver::TrilinosMueLuSolver, AMP::Solver::TrilinosNOXSolver, AMP::Solver::BiCGSTABSolver< T >, AMP::Solver::CGSolver< T >, AMP::Solver::DiagonalSolver< T >, AMP::Solver::GMRESRSolver< T >, AMP::Solver::GMRESSolver< T >, AMP::Solver::QMRCGSTABSolver< T >, and AMP::Solver::TFQMRSolver< T >.
Definition at line 237 of file SolverStrategy.h.
|
inlinevirtualinherited |
Reimplemented in AMP::Solver::PetscSNESSolver.
Definition at line 251 of file SolverStrategy.h.
|
inlinevirtualinherited |
Reimplemented in AMP::Solver::NonlinearKrylovAccelerator< T >.
Definition at line 220 of file SolverStrategy.h.
|
private |
Solve the reaction system P_react*[E,T] = [bE, bT] for [E,T]. Here we directly apply P_react^{-1}, where P_react == I + R_BDF where R_BDF = [ diag(r_EE_BDF) diag(r_ET_BDF) ] [ diag(r_TE_BDF) diag(r_TT_BDF) ] is a subset of the data stored in our opertor's d_data variable
|
virtualinherited |
Register the operator that the solver will use during solves
| [in] | op | shared pointer to operator \(A()\) for equation \(A(u) = f\) |
Reimplemented in AMP::Solver::BiCGSTABSolver< T >, AMP::Solver::CGSolver< T >, AMP::Solver::DiagonalSolver< T >, AMP::Solver::GMRESSolver< T >, AMP::Solver::HypreSolver, AMP::Solver::PetscKrylovSolver, AMP::Solver::TFQMRSolver< T >, AMP::Solver::TrilinosMLSolver, AMP::Solver::TrilinosMueLuSolver, AMP::Solver::NonlinearKrylovAccelerator< T >, AMP::Solver::AMG::HybridGS, AMP::Solver::AMG::JacobiL1, and AMP::Solver::AMG::UASolver.
|
inlinevirtualinherited |
Registers a writer with the solver.
This function will register a writer with the solver. The solver may then register any vector components it "owns" with the writer.
| writer | The writer to register |
Definition at line 186 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_writer.
|
override |
Reset the solver. This only resets the solvers used for the diffusion blocks based on the current state of the operator. I.e., it does not reset the underlying operator, and assumes that has been reset already via other means.
|
virtualinherited |
Resets the solver internally with new parameters if necessary
| parameters | SolverStrategyParameters object that is NULL by default |
Reimplemented in AMP::Solver::TrilinosNOXSolver, AMP::Solver::BandedSolver, AMP::Solver::BoomerAMGSolver, AMP::Solver::HypreBiCGSTABSolver, AMP::Solver::HypreGMRESSolver, AMP::Solver::HyprePCGSolver, AMP::Solver::HypreSolver, AMP::Solver::TrilinosMLSolver, AMP::Solver::TrilinosMueLuSolver, AMP::Solver::CoupledFlow1DSolver, and AMP::Solver::Flow1DSolver.
|
virtualinherited |
Resets the operator registered with the solver with new parameters if necessary
| parameters | OperatorParameters object that is NULL by default |
Reimplemented in AMP::Solver::PetscKrylovSolver, AMP::Solver::BandedSolver, AMP::Solver::ColumnSolver, AMP::Solver::HypreSolver, AMP::Solver::CoupledFlow1DSolver, AMP::Solver::Flow1DSolver, AMP::Solver::PelletStackMechanicsSolver, AMP::Solver::TrilinosMLSolver, and AMP::Solver::TrilinosMueLuSolver.
|
virtualinherited |
|
private |
Solve the (non-block) 2x2 linear system ax+by=e cx+dy=f for unknowns x and y.
|
inlinevirtualinherited |
Definition at line 210 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_dAbsoluteTolerance.
|
inlineinherited |
for multiphysics problems it may be necessary to scale the solution
Definition at line 259 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_pFunctionScaling, and AMP::Solver::SolverStrategy::d_pSolutionScaling.
|
inlinevirtualinherited |
Specify level of diagnostic information printed during iterations.
| [in] | print_level | integer level value with permissible values 0 and higher. Setting to zero should provide minimial debugging information with higher values resulting in increasingly verbose information being printed out. |
Definition at line 132 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_iDebugPrintInfoLevel.
|
private |
Set d_difSolverE and d_difSolverT based on current state of operator.
|
inlineinherited |
Definition at line 270 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_exec_space.
|
virtualinherited |
Provide the initial guess for the solver. This is a pure virtual function that the derived classes need to provide an implementation of.
| [in] | initialGuess | shared pointer to the initial guess vector. |
Reimplemented in AMP::Solver::ColumnSolver, AMP::Solver::CoupledFlow1DSolver, AMP::Solver::Flow1DSolver, AMP::Solver::PetscSNESSolver, and AMP::Solver::TrilinosNOXSolver.
Tell a solver that it is nested inside some outer solver.
Definition at line 166 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_bIsNestedSolver.
|
inlinevirtualinherited |
Definition at line 216 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_iMaxIterations.
|
inlinevirtualinherited |
Set a nested solver, eg, Krylov for Newton, preconditioner for Krylov etc. Null op in base class
Definition at line 159 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_pNestedSolver.
|
inlinevirtualinherited |
Definition at line 214 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_dRelativeTolerance.
|
inlinevirtualinherited |
Tells the solver to use an initial guess of zero and not try to copy an initial guess into the solution vector
| [in] | use_zero_guess | boolean to specify whether zero initial guess should be used or not. |
Reimplemented in AMP::Solver::PetscKrylovSolver.
Definition at line 150 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::d_bUseZeroInitialGuess.
|
inlinestaticinherited |
Definition at line 75 of file SolverStrategy.h.
References AMP::Solver::SolverStrategy::ConvergedOnAbsTol, AMP::Solver::SolverStrategy::ConvergedOnRelTol, AMP::Solver::SolverStrategy::ConvergedUserCondition, AMP::Solver::SolverStrategy::DivergedFunctionCount, AMP::Solver::SolverStrategy::DivergedLineSearch, AMP::Solver::SolverStrategy::DivergedNestedSolver, AMP::Solver::SolverStrategy::DivergedOnNan, AMP::Solver::SolverStrategy::DivergedStepSize, and AMP::Solver::SolverStrategy::MaxIterations.
Referenced by AMP::Solver::SolverStrategy::getConvergenceStatusString().
|
inlineoverridevirtual |
Return the name of the solver.
Implements AMP::Solver::SolverStrategy.
Definition at line 61 of file RadiationDiffusionFDOpSplitPrec.h.
Definition at line 295 of file SolverStrategy.h.
Definition at line 294 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::setIsNestedSolver().
Definition at line 292 of file SolverStrategy.h.
Referenced by AMP::Solver::OnePointSolver::apply(), and AMP::Solver::SolverStrategy::setZeroInitialGuess().
|
protectedinherited |
Definition at line 276 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getConverged(), AMP::Solver::SolverStrategy::getConvergenceStatus(), and AMP::Solver::SolverStrategy::getConvergenceStatusString().
|
protectedinherited |
Definition at line 287 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getAbsoluteTolerance(), and AMP::Solver::SolverStrategy::setAbsoluteTolerance().
|
protectedinherited |
Definition at line 304 of file SolverStrategy.h.
|
private |
Solvers for approximately inverting diagonal diffusion blocks.
Definition at line 80 of file RadiationDiffusionFDOpSplitPrec.h.
|
private |
Definition at line 81 of file RadiationDiffusionFDOpSplitPrec.h.
|
protectedinherited |
Definition at line 285 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getInitialResidual().
|
protectedinherited |
Definition at line 288 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getRelativeTolerance(), and AMP::Solver::SolverStrategy::setRelativeTolerance().
|
protectedinherited |
Definition at line 284 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getResidualNorm().
|
protectedinherited |
execution space for the solver
Definition at line 324 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getExecutionSpace(), and AMP::Solver::SolverStrategy::setExecutionSpace().
|
protectedinherited |
Pointer to global database This is temporary fix and eventually either d_global_db or d_db should go away This is introduced to allow for solver factories to access databases in the global database for the construction of nested solvers
Definition at line 311 of file SolverStrategy.h.
|
protectedinherited |
Definition at line 290 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getDebugPrintInfoLevel(), and AMP::Solver::SolverStrategy::setDebugPrintInfoLevel().
|
staticprotectedinherited |
Definition at line 299 of file SolverStrategy.h.
|
protectedinherited |
Definition at line 282 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getMaxIterations(), and AMP::Solver::SolverStrategy::setMaxIterations().
|
protectedinherited |
Definition at line 280 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getIterations().
|
protectedinherited |
Definition at line 297 of file SolverStrategy.h.
|
protectedinherited |
keeps track of iteration statistics over solver lifetime
Definition at line 302 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getIterationHistory().
|
protectedinherited |
memory storage address space
Definition at line 327 of file SolverStrategy.h.
|
protectedinherited |
Definition at line 314 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getFunctionScaling(), and AMP::Solver::SolverStrategy::setComponentScalings().
|
protectedinherited |
nested solver used by this solver
Definition at line 319 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getNestedSolver(), and AMP::Solver::SolverStrategy::setNestedSolver().
|
protectedinherited |
Definition at line 316 of file SolverStrategy.h.
|
protectedinherited |
Definition at line 313 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::getSolutionScaling(), and AMP::Solver::SolverStrategy::setComponentScalings().
|
protectedinherited |
Definition at line 278 of file SolverStrategy.h.
|
protectedinherited |
Definition at line 321 of file SolverStrategy.h.
Referenced by AMP::Solver::SolverStrategy::registerWriter().
|
staticconstexprprivate |
Tolerance for determining if 2x2 system is singular.
Definition at line 77 of file RadiationDiffusionFDOpSplitPrec.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:44. Comments on this page |