https://mooseframework.inl.gov
Loading...
Searching...
No Matches
EigenExecutionerBase.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
11
12// MOOSE includes
13#include "AuxiliarySystem.h"
14#include "DisplacedProblem.h"
15#include "FEProblem.h"
16#include "MooseApp.h"
17#include "MooseEigenSystem.h"
18#include "UserObject.h"
20
23{
25 params.addClassDescription("Executioner for eigenvalue problems.");
26
28
29 params.addRequiredParam<PostprocessorName>("bx_norm", "To evaluate |Bx| for the eigenvalue");
30 params.addParam<PostprocessorName>("normalization", "To evaluate |x| for normalization");
31 params.addParam<Real>("normal_factor", "Normalize x to make |x| equal to this factor");
32 params.addParam<bool>(
33 "output_before_normalization", true, "True to output a step before normalization");
34 params.addParam<bool>("auto_initialization", true, "True to ask the solver to set initial");
35 params.addParam<Real>("time", 0.0, "System time");
36
37 params.addPrivateParam<bool>("_eigen", true);
38
39 params.addParamNamesToGroup("normalization normal_factor output_before_normalization",
40 "Normalization");
41 params.addParamNamesToGroup("auto_initialization time", "Advanced");
42
43 params.addParam<Real>("k0", 1.0, "Initial guess of the eigenvalue");
44
45 params.addPrivateParam<bool>("_eigen", true);
46
47 return params;
48}
49
50const Real &
55
57 : Executioner(parameters),
58 _problem(_fe_problem),
59 _eigen_sys(cast_ref<MooseEigenSystem &>(_problem.getNonlinearSystemBase(/*nl_sys=*/0))),
60 _feproblem_solve(*this),
61 _eigenvalue(addAttributeReporter("eigenvalue", getParam<Real>("k0"))),
62 _source_integral(getPostprocessorValue("bx_norm")),
63 _source_integral_old(1),
64 _normalization(isParamValid("normalization")
65 ? getPostprocessorValue("normalization")
66 : getPostprocessorValue("bx_norm")) // use |Bx| for normalization by default
67{
68 // FIXME: currently we have to use old and older solution vectors for power iteration.
69 // We will need 'step' in the future.
70 _problem.transient(true);
73
74 // we want to tell the App about what our system time is (in case anyone else is interested).
75 Real system_time = getParam<Real>("time");
76 _app.setStartTime(system_time);
77
78 // set the system time
79 _problem.time() = system_time;
80 _problem.timeOld() = system_time;
81
82 // used for controlling screen print-out
83 _problem.timeStep() = 0;
84 _problem.dt() = 1.0;
85}
86
87void
89{
92
93 if (getParam<bool>("auto_initialization"))
94 {
95 // Initialize the solution of the eigen variables
96 // Note: initial conditions will override this if there is any by _problem.initialSetup()
98 }
101
102 // check when the postprocessors are evaluated
103 const ExecFlagEnum & bx_exec =
104 _problem.getUserObject<UserObject>(getParam<PostprocessorName>("bx_norm")).getExecuteOnEnum();
105 if (!bx_exec.isValueSet(EXEC_LINEAR))
106 mooseError("Postprocessor " + getParam<PostprocessorName>("bx_norm") +
107 " requires execute_on = 'linear'");
108
109 if (isParamValid("normalization"))
110 _norm_exec = _problem.getUserObject<UserObject>(getParam<PostprocessorName>("normalization"))
111 .getExecuteOnEnum();
112 else
113 _norm_exec = bx_exec;
114
115 // check if _source_integral has been evaluated during initialSetup()
116 if (!bx_exec.isValueSet(EXEC_INITIAL))
118
119 if (_source_integral == 0.0)
120 mooseError("|Bx| = 0!");
121
122 // normalize solution to make |Bx|=_eigenvalue, _eigenvalue at this point has the initialized
123 // value
125
126 if (_problem.getDisplacedProblem() != NULL)
127 _problem.getDisplacedProblem()->syncSolutions();
128
129 /* a time step check point */
131
133}
134
135void
137{
138 Real consistency_tolerance = 1e-10;
139
140 // Scale the solution so that the postprocessor is equal to k.
141 // Note: all dependent objects of k must be evaluated on linear!
142 // We have a fix point loop here, in case the postprocessor is a nonlinear function of the scaling
143 // factor.
144 // FIXME: We have assumed this loop always converges.
145 while (std::fabs(k - _source_integral) > consistency_tolerance * std::fabs(k))
146 {
147 // On the first time entering, the _source_integral has been updated properly in
148 // FEProblemBase::initialSetup()
151 std::stringstream ss;
152 ss << std::fixed << std::setprecision(10) << _source_integral;
153 _console << "\n|Bx| = " << ss.str() << std::endl;
154 }
155}
156
157void
159{
160 // check to make sure that we don't have any time kernels in this simulation
162 mooseError("You have specified time kernels in your steady state eigenvalue simulation");
164 mooseError("You have not specified any eigen kernels in your eigenvalue simulation");
165}
166
167bool
169 unsigned int max_iter,
170 Real l_rtol,
171 bool cheb_on,
172 Real tol_eig,
173 bool echo,
174 PostprocessorName xdiff,
175 Real tol_x,
176 Real & k,
177 Real & initial_res)
178{
179 mooseAssert(max_iter >= min_iter,
180 "Maximum number of power iterations must be greater than or equal to its minimum");
181 mooseAssert(l_rtol > 0.0, "Invaid linear convergence tolerance");
182 mooseAssert(tol_eig > 0.0, "Invalid eigenvalue tolerance");
183 mooseAssert(tol_x > 0.0, "Invalid solution norm tolerance");
184
185 // obtain the solution diff
186 const PostprocessorValue * solution_diff = NULL;
187 if (!xdiff.empty())
188 {
189 solution_diff = &_problem.getPostprocessorValueByName(xdiff);
190 const ExecFlagEnum & xdiff_exec = _problem.getUserObject<UserObject>(xdiff).getExecuteOnEnum();
191 if (!xdiff_exec.isValueSet(EXEC_LINEAR))
192 mooseError("Postprocessor " + xdiff + " requires execute_on = 'linear'");
193 }
194
195 // not perform any iteration when max_iter==0
196 if (max_iter == 0)
197 return true;
198
199 // turn off nonlinear flag so that RHS kernels opterate on previous solutions
201
202 // FIXME: currently power iteration use old and older solutions,
203 // so save old and older solutions before they are changed by the power iteration
205 if (_problem.getDisplacedProblem() != NULL)
206 _problem.getDisplacedProblem()->saveOldSolutions();
207
208 // save solver control parameters to be modified by the power iteration
209 auto & es_params = _problem.es().parameters;
210 auto & eigen_sys_params = _eigen_sys.system().parameters;
211 const Real l_tol_bak = es_params.get<Real>("linear solver tolerance");
212 const auto nl_max_its_bak =
213 eigen_sys_params.get<unsigned int>("nonlinear solver maximum iterations");
214 const auto nl_rel_tol_bak =
215 eigen_sys_params.get<Real>("nonlinear solver relative residual tolerance");
216
217 // every power iteration is a linear solve, so set max nonlinear iterations to 1 and
218 // give a very loose nonlinear tolerance so that it always converges
219 es_params.set<Real>("linear solver tolerance") = l_rtol;
222
223 if (echo)
224 {
225 _console << '\n';
226 _console << " Power iterations starts\n";
227 _console << " ________________________________________________________________________________ "
228 << std::endl;
229 }
230
231 // some iteration variables
232 Chebyshev_Parameters chebyshev_parameters;
233
234 std::vector<Real> keff_history;
235 std::vector<Real> diff_history;
236
237 bool converged;
238
239 unsigned int iter = 0;
240
241 // power iteration loop...
242 // Note: |Bx|/k will stay constant one!
244 while (true)
245 {
246 if (echo)
247 _console << " Power iteration= " << iter << std::endl;
248
249 // Important: we do not call _problem.advanceState() because we do not
250 // want to overwrite the old postprocessor values and old material
251 // properties in stateful materials.
254 if (_problem.getDisplacedProblem() != NULL)
255 {
257 ->solverSys(_eigen_sys.number())
258 .advanceStateHistory(Moose::SolutionIterationType::Time);
259 _problem.getDisplacedProblem()->auxSys().advanceStateHistory(
261 }
262
263 Real k_old = k;
265
266 preIteration();
268 converged = _problem.converged(_eigen_sys.number());
269 if (!converged)
270 break;
272
273 // save the initial residual
274 if (iter == 0)
275 initial_res = _eigen_sys.referenceResidual();
276
277 // update eigenvalue
279 _eigenvalue = k;
280
281 if (echo)
282 {
283 // output on screen the convergence history only when we want to and MOOSE output system is
284 // not used
285 keff_history.push_back(k);
286 if (solution_diff)
287 diff_history.push_back(*solution_diff);
288
289 std::stringstream ss;
290 if (solution_diff)
291 {
292 ss << '\n';
293 ss << " +================+=====================+=====================+\n";
294 ss << " | iteration | eigenvalue | solution_difference |\n";
295 ss << " +================+=====================+=====================+\n";
296 unsigned int j = 0;
297 if (keff_history.size() > 10)
298 {
299 ss << " : : : :\n";
300 j = keff_history.size() - 10;
301 }
302 for (; j < keff_history.size(); j++)
303 ss << " | " << std::setw(14) << j << " | " << std::setw(19) << std::scientific
304 << std::setprecision(8) << keff_history[j] << " | " << std::setw(19) << std::scientific
305 << std::setprecision(8) << diff_history[j] << " |\n";
306 ss << " +================+=====================+=====================+\n" << std::flush;
307 }
308 else
309 {
310 ss << '\n';
311 ss << " +================+=====================+\n";
312 ss << " | iteration | eigenvalue |\n";
313 ss << " +================+=====================+\n";
314 unsigned int j = 0;
315 if (keff_history.size() > 10)
316 {
317 ss << " : : :\n";
318 j = keff_history.size() - 10;
319 }
320 for (; j < keff_history.size(); j++)
321 ss << " | " << std::setw(14) << j << " | " << std::setw(19) << std::scientific
322 << std::setprecision(8) << keff_history[j] << " |\n";
323 ss << " +================+=====================+\n" << std::flush;
324 ss << std::endl;
325 }
326 _console << ss.str();
327 }
328
329 // increment iteration number here
330 iter++;
331
332 if (cheb_on)
333 {
334 chebyshev(chebyshev_parameters, iter, solution_diff);
335 if (echo)
336 _console << " Chebyshev step: " << chebyshev_parameters.icheb << std::endl;
337 }
338
339 if (echo)
341 << " ________________________________________________________________________________ "
342 << std::endl;
343
344 // not perform any convergence check when number of iterations is less than min_iter
345 if (iter >= min_iter)
346 {
347 // no need to check convergence of the last iteration
348 if (iter != max_iter)
349 {
350 Real keff_error = fabs(k_old - k) / k;
351 if (keff_error > tol_eig)
352 converged = false;
353 if (solution_diff)
354 if (*solution_diff > tol_x)
355 converged = false;
356 if (converged)
357 break;
358 }
359 else
360 {
361 converged = false;
362 break;
363 }
364 }
365 }
366
367 // restore parameters changed by the executioner
368 es_params.set<Real>("linear solver tolerance") = l_tol_bak;
369 _eigen_sys_conv->setMaximumIterations(nl_max_its_bak);
370 _eigen_sys_conv->setRelativeTolerance(nl_rel_tol_bak);
371
372 // FIXME: currently power iteration use old and older solutions, so restore them
374 if (_problem.getDisplacedProblem() != NULL)
375 _problem.getDisplacedProblem()->restoreOldSolutions();
376
377 return converged;
378}
379
380void
384
385void
389
390void
392{
393 if (getParam<bool>("output_before_normalization"))
394 {
395 _problem.timeStep()++;
396 Real t = _problem.time();
399 _problem.time() = t;
400 }
401
402 Real s = 1.0;
404 {
405 _console << " Cannot let the normalization postprocessor on custom.\n";
406 _console << " Normalization is abandoned!" << std::endl;
407 }
408 else
409 {
411 s = normalizeSolution(force);
412 if (!MooseUtils::absoluteFuzzyEqual(s, 1.0))
413 _console << " Solution is rescaled with factor " << s << " for normalization!" << std::endl;
414 }
415
416 if ((!getParam<bool>("output_before_normalization")) || !MooseUtils::absoluteFuzzyEqual(s, 1.0))
417 {
418 _problem.timeStep()++;
419 Real t = _problem.time();
422 _problem.time() = t;
423 }
424
425 {
426 TIME_SECTION("final", 1, "Executing Final Objects")
430 }
431}
432
433Real
435{
436 if (force)
438
439 Real factor;
440 if (isParamValid("normal_factor"))
441 factor = getParam<Real>("normal_factor");
442 else
443 factor = _eigenvalue;
444 Real scaling = factor / _normalization;
445
446 if (!MooseUtils::absoluteFuzzyEqual(scaling, 1.0))
447 {
448 // FIXME: we assume linear scaling here!
450 // update all aux variables and user objects
451
452 for (const ExecFlagType & flag : _app.getExecuteOnEnum().items())
453 _problem.execute(flag);
454 }
455 return scaling;
456}
457
458void
460{
461 std::ostringstream ss;
462 ss << '\n';
463 ss << "*******************************************************\n";
464 ss << " Eigenvalue = " << std::fixed << std::setprecision(10) << _eigenvalue << '\n';
465 ss << "*******************************************************";
466
467 _console << ss.str() << std::endl;
468}
469
471 : n_iter(50), fsmooth(2), finit(6), lgac(0), icheb(0), flux_error_norm_old(1), icho(0)
472{
473}
474
475void
477{
478 finit = 6;
479 lgac = 0;
480 icheb = 0;
481 flux_error_norm_old = 1;
482 icho = 0;
483}
484
485void
487 unsigned int iter,
488 const PostprocessorValue * solution_diff)
489{
490 if (!solution_diff)
491 mooseError("solution diff is required for Chebyshev acceleration");
492
493 if (chebyshev_parameters.lgac == 0)
494 {
495 if (chebyshev_parameters.icho == 0)
496 chebyshev_parameters.ratio = *solution_diff / chebyshev_parameters.flux_error_norm_old;
497 else
498 {
499 chebyshev_parameters.ratio = chebyshev_parameters.ratio_new;
500 chebyshev_parameters.icho = 0;
501 }
502
503 if (iter > chebyshev_parameters.finit && chebyshev_parameters.ratio >= 0.4 &&
504 chebyshev_parameters.ratio <= 1)
505 {
506 chebyshev_parameters.lgac = 1;
507 chebyshev_parameters.icheb = 1;
508 chebyshev_parameters.error_begin = *solution_diff;
509 chebyshev_parameters.iter_begin = iter;
510 double alp = 2 / (2 - chebyshev_parameters.ratio);
511 std::vector<double> coef(2);
512 coef[0] = alp;
513 coef[1] = 1 - alp;
517 }
518 }
519 else
520 {
521 chebyshev_parameters.icheb++;
522 double gamma = acosh(2 / chebyshev_parameters.ratio - 1);
523 double alp = 4 / chebyshev_parameters.ratio *
524 std::cosh((chebyshev_parameters.icheb - 1) * gamma) /
525 std::cosh(chebyshev_parameters.icheb * gamma);
526 double beta = (1 - chebyshev_parameters.ratio / 2) * alp - 1;
527 /* if (iter<int(chebyshev_parameters.iter_begin+chebyshev_parameters.n_iter))
528 {
529 std::vector<double> coef(3);
530 coef[0] = alp;
531 coef[1] = 1-alp+beta;
532 coef[2] = -beta;
533 _eigen_sys.combineSystemSolution(NonlinearSystem::EIGEN, coef);
534 }
535 else
536 {*/
537 double gamma_new =
538 (*solution_diff / chebyshev_parameters.error_begin) *
539 (std::cosh((chebyshev_parameters.icheb - 1) * acosh(2 / chebyshev_parameters.ratio - 1)));
540 if (gamma_new < 1.0)
541 gamma_new = 1.0;
542
543 chebyshev_parameters.ratio_new =
544 chebyshev_parameters.ratio / 2 *
545 (std::cosh(acosh(gamma_new) / (chebyshev_parameters.icheb - 1)) + 1);
546 if (gamma_new > 1.01)
547 {
548 chebyshev_parameters.lgac = 0;
549 // chebyshev_parameters.icheb = 0;
550 // if (chebyshev_parameters.icheb>30)
551 // {
552 if (chebyshev_parameters.icheb > 0)
553 {
554 chebyshev_parameters.icho = 1;
555 chebyshev_parameters.finit = iter;
556 }
557 else
558 {
559 chebyshev_parameters.icho = 0;
560 chebyshev_parameters.finit = iter + chebyshev_parameters.fsmooth;
561 }
562 }
563 else
564 {
565 std::vector<double> coef(3);
566 coef[0] = alp;
567 coef[1] = 1 - alp + beta;
568 coef[2] = -beta;
572 }
573 // }
574 }
575 chebyshev_parameters.flux_error_norm_old = *solution_diff;
576}
577
578bool
579EigenExecutionerBase::nonlinearSolve(Real nl_rtol, Real nl_atol, Real l_rtol, Real & k)
580{
582
583 // turn on nonlinear flag so that eigen kernels opterate on the current solutions
585
586 // save nonlinear solve parameters for restoration after solve
587 auto & es_params = _problem.es().parameters;
588 auto & eigen_sys_params = _eigen_sys.system().parameters;
589 const Real l_tol_bak = es_params.get<Real>("linear solver tolerance");
590 const Real nl_abs_tol_bak =
591 eigen_sys_params.get<Real>("nonlinear solver absolute residual tolerance");
592 const Real nl_rel_tol_bak =
593 eigen_sys_params.get<Real>("nonlinear solver relative residual tolerance");
594
595 es_params.set<Real>("linear solver tolerance") = l_rtol;
598
599 // call nonlinear solve
601
603 _eigenvalue = k;
604
605 // restore nonlinear solve parameters
606 es_params.set<Real>("linear solver tolerance") = l_tol_bak;
607 _eigen_sys_conv->setAbsoluteTolerance(nl_abs_tol_bak);
608 _eigen_sys_conv->setRelativeTolerance(nl_rel_tol_bak);
609
611}
612
615{
616 auto & convergence = _eigen_sys.convergence();
617 auto * const nl_convergence = dynamic_cast<DefaultNonlinearConvergence *>(&convergence);
618 if (nl_convergence)
619 return nl_convergence;
620 else
621 mooseError("EigenExecutionerBase requires 'nonlinear_convergence' to be of type "
622 "DefaultNonlinearConvergence.");
623}
Real PostprocessorValue
various MOOSE typedefs
Definition MooseTypes.h:230
const ExecFlagType EXEC_TIMESTEP_END
Definition Moose.C:37
const ExecFlagType EXEC_CUSTOM
Definition Moose.C:52
const ExecFlagType EXEC_INITIAL
Definition Moose.C:31
const ExecFlagType EXEC_LINEAR
Definition Moose.C:32
const ExecFlagType EXEC_FINAL
Definition Moose.C:49
const ConsoleStream _console
An instance of helper class to write streams to the Console objects.
Default nonlinear convergence criteria for FEProblem.
void setMaximumIterations(const unsigned int max_iter)
Sets the maximum nonlinear iterations.
void setRelativeTolerance(const Real rel_tol)
Sets the relative nonlinear tolerance.
void setAbsoluteTolerance(const Real abs_tol)
Sets the absolute nonlinear tolerance.
virtual void postExecute() override
Override this for actions that should take place after the main solve.
const Real & _normalization
Postprocessor for normalization.
DefaultNonlinearConvergence * getEigenSystemConvergence()
Gets the Convergence object for _eigen_sys and checks it's the right type.
virtual Real normalizeSolution(bool force=true)
Normalize the solution vector based on the postprocessor value for normalization.
virtual void preIteration()
Override this for actions that should take place before linear solve of each inverse power iteration.
virtual void checkIntegrity()
Make sure time kernel is not presented.
MooseEigenSystem & _eigen_sys
static InputParameters validParams()
Constructor.
virtual bool nonlinearSolve(Real rel_tol, Real abs_tol, Real pfactor, Real &k)
Perform nonlinear solve with the initial guess of the solution.
EigenExecutionerBase(const InputParameters &parameters)
const Real & eigenvalueOld()
The old eigenvalue used by inverse power iterations.
PostprocessorValue & _eigenvalue
Storage for the eigenvalue computed by the executioner.
void chebyshev(Chebyshev_Parameters &params, unsigned int iter, const PostprocessorValue *solution_diff)
virtual void printEigenvalue()
Print eigenvalue.
virtual void makeBXConsistent(Real k)
Normalize solution so that |Bx| = k.
virtual void postIteration()
Override this for actions that should take place after linear solve of each inverse power iteration.
virtual bool inversePowerIteration(unsigned int min_iter, unsigned int max_iter, Real pfactor, bool cheb_on, Real tol_eig, bool echo, PostprocessorName xdiff, Real tol_x, Real &k, Real &initial_res)
Perform inverse power iterations with the initial guess of the solution.
DefaultNonlinearConvergence * _eigen_sys_conv
Convergence object corresponding to _eigen_sys.
virtual void init() override
Initialize the executioner.
A MultiMooseEnum object to hold "execute_on" flags.
const std::set< ExecFlagType > & items() const
Reference the all the available items.
Executioners are objects that do the actual work of solving your problem.
Definition Executioner.h:37
static InputParameters validParams()
Definition Executioner.C:26
FEProblemBase & _fe_problem
virtual void onTimestepEnd() override
T & getUserObject(const std::string &name, unsigned int tid=0) const
Get the user object by its name.
virtual libMesh::EquationSystems & es() override
AuxiliarySystem & getAuxiliarySystem()
const PostprocessorValue & getPostprocessorValueByName(const PostprocessorName &name, std::size_t t_index=0) const
Get a read-only reference to the value associated with a Postprocessor that exists.
virtual std::shared_ptr< const DisplacedProblem > getDisplacedProblem() const
virtual void restoreOldSolutions()
Restore old solutions from the backup vectors and deallocate them.
virtual Real & dt() const
virtual void transient(bool trans)
virtual void solve(const unsigned int nl_sys_num)
bool execMultiApps(ExecFlagType type, bool auto_advance=true)
Execute the MultiApps associated with the ExecFlagType.
virtual Real & timeOld() const
virtual void saveOldSolutions()
Allocate vectors and save old solutions into them.
virtual void execute(const ExecFlagType &exec_type)
Convenience function for performing execution of MOOSE systems.
virtual Real & time() const
virtual int & timeStep() const
void initialSetup() override
virtual void outputStep(ExecFlagType type)
Output the current step.
static InputParameters validParams()
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)
This method takes a space delimited list of parameter names and adds them to the specified group name...
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump.
void setStartTime(Real time)
Set the starting time for the simulation.
Definition MooseApp.C:2401
const ExecFlagEnum & getExecuteOnEnum() const
Return the app level ExecFlagEnum, this contains all the available flags for the app.
Definition MooseApp.h:1040
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type and optionally a file path to the top-level block p...
Definition MooseBase.h:271
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition MooseBase.h:199
void eigenKernelOnOld()
Ask eigenkernels to operate on old or current solution vectors.
void initSystemSolutionOld(SYSTEMTAG tag, Real v)
void buildSystemDoFIndices(SYSTEMTAG tag=ALL)
Build DoF indices for a system.
void initSystemSolution(SYSTEMTAG tag, Real v)
Initialize the solution vector with a constant value.
bool containsEigenKernel() const
Weather or not the system contains eigen kernels.
void combineSystemSolution(SYSTEMTAG tag, const std::vector< Real > &coefficients)
Linear combination of the solution vectors.
void scaleSystemSolution(SYSTEMTAG tag, Real scaling_factor)
Scale the solution vector.
Class for containing MooseEnum item information.
MooseApp & _app
The MOOSE application this is associated with.
Definition MooseBase.h:375
bool isValueSet(const std::string &value) const
Methods for seeing if a value is set in the MultiMooseEnum.
Real referenceResidual() const
The reference residual used in relative convergence check.
Convergence & convergence()
Retrieves the associated Convergence object.
virtual bool containsTimeKernel() override
If the system has a kernel that corresponds to a time derivative.
virtual libMesh::System & system() override
Get the reference to the libMesh system.
virtual bool converged(const unsigned int sys_num)
Eventually we want to convert this virtual over to taking a solver system number argument.
Definition SubProblem.h:113
unsigned int number() const
Gets the number of this system.
void advanceStateHistory(Moose::SolutionIterationType iteration_type)
Advance solution vectors and additional system-owned state together.
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.
Base class for user-specific data.
Definition UserObject.h:20
Parameters parameters