https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LineSearch.h
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
10#pragma once
11
12#include "MooseObject.h"
13
14class FEProblem;
15class LineSearch : public MooseObject
16{
17public:
19
21
25 void zeroIts() { _nl_its = 0; }
26
30 size_t nlIts() const { return _nl_its; }
31
35 virtual void lineSearch() { mooseError("You must implement a line-search method."); }
36
37 virtual void timestepSetup() {}
38 virtual void customSetup(const ExecFlagType & /*exec_type*/) {}
39 virtual void initialSetup() {}
40
41protected:
44
46 size_t _nl_its;
47};
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition FEProblem.h:21
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
FEProblem & _fe_problem
Reference to the finite element problem.
Definition LineSearch.h:43
virtual void lineSearch()
The method that actually implements the line-search.
Definition LineSearch.h:35
size_t nlIts() const
read-only reference to number of non-linear iterations
Definition LineSearch.h:30
virtual void customSetup(const ExecFlagType &)
Definition LineSearch.h:38
virtual void initialSetup()
Definition LineSearch.h:39
void zeroIts()
zeros the nonlinear iteration count
Definition LineSearch.h:25
static InputParameters validParams()
Definition LineSearch.C:14
size_t _nl_its
number of non-linear iterations
Definition LineSearch.h:46
virtual void timestepSetup()
Definition LineSearch.h:37
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
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
Class for containing MooseEnum item information.
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31