20 const std::string & name,
23 _current_solution(nullptr),
102 "Fixed point relaxation requires the previous fixed point solution state to have " 103 "the same parallel type as the system solution.");
115 "Fixed point relaxation was requested but the old fixed point solution was not " 121 "Fixed point relaxation requires the previous fixed point solution state to have " 122 "the same parallel type as the system solution.");
137 else if (pcs ==
"right")
139 else if (pcs ==
"symmetric")
141 else if (pcs ==
"default")
150 if (kspnorm ==
"none")
152 else if (kspnorm ==
"preconditioned")
154 else if (kspnorm ==
"unpreconditioned")
156 else if (kspnorm ==
"natural")
158 else if (kspnorm ==
"default")
161 mooseError(
"Unknown ksp norm type specified.");
172 if (solution_invalidity.hasInvalidSolution())
176 solution_invalidity.print(
_console);
178 mooseWarning(
"The Solution Invalidity warnings are detected but silenced! " 179 "Use Problem/show_invalid_solution_console=true to show solution counts");
183 solution_invalidity.print(
_console);
191 bool compute_tds =
false;
213 ti->computeTimeDerivatives();
std::string name(const ElemQuality q)
std::vector< std::shared_ptr< TimeIntegrator > > _time_integrators
Time integrator.
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
SolverSystem(SubProblem &subproblem, FEProblemBase &fe_problem, const std::string &name, Moose::VarKindType var_kind)
Moose::PCSideType _pc_side
Preconditioning side.
void checkInvalidSolution()
NumericVector< Number > & solution()
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
virtual void associateVectorToTag(NumericVector< Number > &vec, TagID tag)
Associate a vector for a given tag.
virtual libMesh::System & system()=0
Get the reference to the libMesh system.
virtual NumericVector< Number > & solutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time)
Get a state of the solution (0 = current, 1 = old, 2 = older, etc).
void setSolution(const NumericVector< Number > &soln)
Set the solution to a given vector.
Solving a linear problem.
void setPCSide(MooseEnum pcs)
Set the side on which the preconditioner is applied to.
const ExecFlagType EXEC_TIMESTEP_END
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
void computingScalingJacobian(bool computing_scaling_jacobian)
Setter for whether we're computing the scaling jacobian.
Base class for a system (of equations)
std::unique_ptr< NumericVector< Number > > _serialized_solution
Serialized version of the solution vector, or nullptr if a serialized solution is not needed...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
dof_id_type n_dofs() const
virtual bool matrixFromColoring() const
Whether a system matrix is formed from coloring.
void update()
Update the system (doing libMesh magic)
void syncIteration()
Sync iteration counts to main processor Sum across all processors.
Use whatever we have in PETSc.
Use whatever we have in PETSc.
SolutionInvalidity & solutionInvalidity()
Get the SolutionInvalidity for this app.
VarKindType
Framework-wide stuff.
SubProblem & _subproblem
The subproblem for whom this class holds variable data, etc; this can either be the governing finite ...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
void saveOldSolutionForFixedPointRelaxation()
virtual void restoreSolutions() override final
Restore current solutions (call after your solve failed)
virtual bool hasSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time) const
Whether or not the system has the solution state (0 = current, 1 = old, 2 = older, etc).
unsigned int number() const
Gets the number of this system.
const ExecFlagType EXEC_LINEAR
virtual void needSolutionState(const unsigned int state, Moose::SolutionIterationType iteration_type=Moose::SolutionIterationType::Time, libMesh::ParallelType parallel_type=GHOSTED)
Registers that the solution state state is needed.
bool showInvalidSolutionConsole() const
Whether or not to print out the invalid solutions summary table in console.
const NumericVector< Number > * _current_solution
solution vector from solver
Real _fixed_point_relaxation_factor
Used for relaxing entire system solution during fixed point (multi-)system iterations.
const ExecFlagType EXEC_NONLINEAR
FEProblemBase & _fe_problem
the governing finite element/volume problem
Generic class for solving transient nonlinear problems.
Class for containing MooseEnum item information.
bool acceptInvalidSolution() const
Whether or not to accept the solution based on its invalidity.
virtual void preInit()
This is called prior to the libMesh system has been init'd.
virtual void compute(ExecFlagType type) override
Compute time derivatives, auxiliary variables, etc.
void applyFixedPointRelaxation()
libMesh::ParallelType solutionStateParallelType(const unsigned int state, const Moose::SolutionIterationType iteration_type) const
Returns the parallel type of the given solution state.
virtual void preInit() override
This is called prior to the libMesh system has been init'd.
SolverParams & solverParams(unsigned int solver_sys_num=0)
Get the solver parameters.
std::unique_ptr< NumericVector< Number > > current_local_solution
const TagName SOLUTION_TAG
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Moose::MooseKSPNormType _ksp_norm
KSP norm type.
virtual void restoreSolutions()
Restore current solutions (call after your solve failed)
virtual Real & dt() const
const ExecFlagType EXEC_FINAL
void clearFixedPointRelaxation()
void setMooseKSPNormType(MooseEnum kspnorm)
Set the norm in which the linear convergence will be measured.
void setFixedPointRelaxationFactor(const Real relaxation_factor)
Enable solution under/over-relaxation for fixed point iterations.
virtual void localize(std::vector< T > &v_local) const=0