www.mooseframework.org
LineSearch.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
14 class FEProblem;
15 class LineSearch;
16 
17 template <>
19 
20 class LineSearch : public MooseObject
21 {
22 public:
24 
28  void zeroIts() { _nl_its = 0; }
29 
33  const size_t & nlIts() const { return _nl_its; }
34 
38  virtual void lineSearch() { mooseError("You must implement a line-search method."); }
39 
40 protected:
43 
45  size_t _nl_its;
46 };
47 
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:24
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:42
void mooseError(Args &&... args) const
Definition: MooseObject.h:147
InputParameters validParams< LineSearch >()
Definition: LineSearch.C:15
const size_t & nlIts() const
read-only reference to number of non-linear iterations
Definition: LineSearch.h:33
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:42
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
void zeroIts()
zeros the nonlinear iteration count
Definition: LineSearch.h:28
size_t _nl_its
number of non-linear iterations
Definition: LineSearch.h:45
LineSearch(const InputParameters &parameters)
Definition: LineSearch.C:22
virtual void lineSearch()
The method that actually implements the line-search.
Definition: LineSearch.h:38