15#include "libmesh/petsc_vector.h"
16#include "libmesh/petsc_matrix.h"
35 const Real relaxation_parameter,
36 NumericVector<Number> & diff_diagonal);
52 const NumericVector<Number> & solution_in,
53 const NumericVector<Number> & diff_diagonal);
64 const NumericVector<Number> & vec_old,
65 const Real relaxation_factor);
76 const Real min_limit = std::numeric_limits<Real>::epsilon(),
77 const Real max_limit = 1e10);
93 const SparseMatrix<Number> & mat,
94 const NumericVector<Number> & rhs);
106 NumericVector<Number> & rhs,
107 const Real desired_value,
108 const dof_id_type dof_id);
119 const Point & point);
126bool converged(
const std::vector<std::pair<unsigned int, Real>> & residuals,
127 const std::vector<Real> & abs_tolerances);
Real computeNormalizationFactor(const NumericVector< Number > &solution, const SparseMatrix< Number > &mat, const NumericVector< Number > &rhs)
Compute a normalization factor which is applied to the linear residual to determine convergence.
bool converged(const std::vector< std::pair< unsigned int, Real > > &residuals, const std::vector< Real > &abs_tolerances)
Based on the residuals, determine if the iterative process converged or not.
void relaxMatrix(SparseMatrix< Number > &matrix_in, const Real relaxation_parameter, NumericVector< Number > &diff_diagonal)
Relax the matrix to ensure diagonal dominance, we hold onto the difference in diagonals for later use...
void constrainSystem(SparseMatrix< Number > &mx, NumericVector< Number > &rhs, const Real desired_value, const dof_id_type dof_id)
Implicitly constrain the system by adding a factor*(u-u_desired) to it at a desired dof value.
void relaxSolutionUpdate(NumericVector< Number > &vec_new, const NumericVector< Number > &vec_old, const Real relaxation_factor)
Relax the update on a solution field using the following approach: $u = u_{old}+\lambda (u - u_{old})...
void limitSolutionUpdate(NumericVector< Number > &solution, const Real min_limit=std::numeric_limits< Real >::epsilon(), const Real max_limit=1e10)
Limit a solution to its minimum and maximum bounds: $u = min(max(u, min_limit), max_limit)$.
dof_id_type findPointDoFID(const MooseVariableFieldBase &variable, const MooseMesh &mesh, const Point &point)
Find the ID of the degree of freedom which corresponds to the variable and a given point on the mesh.
void relaxRightHandSide(NumericVector< Number > &rhs_in, const NumericVector< Number > &solution_in, const NumericVector< Number > &diff_diagonal)
Relax the right hand side of an equation, this needs to be called once and the system matrix has been...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real