www.mooseframework.org
fluid_properties
include
utils
BrentsMethod.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
// MOOSE includes
13
#include "Moose.h"
14
15
// C++ includes
16
#include <functional>
17
18
namespace
BrentsMethod
19
{
28
void
bracket
(std::function<Real(Real)>
const
& f, Real & x1, Real & x2);
29
39
Real
root
(std::function<Real(Real)>
const
& f, Real x1, Real x2, Real
tol
= 1.0e-12);
40
}
41
BrentsMethod
Definition:
BrentsMethod.h:18
BrentsMethod::root
Real root(std::function< Real(Real)> const &f, Real x1, Real x2, Real tol=1.0e-12)
Finds the root of a function using Brent's method.
Definition:
BrentsMethod.C:61
tol
const double tol
Definition:
Setup.h:18
BrentsMethod::bracket
void bracket(std::function< Real(Real)> const &f, Real &x1, Real &x2)
Function to bracket a root of a given function.
Definition:
BrentsMethod.C:17
Generated on Sat Jan 25 2020 12:04:36 for www.mooseframework.org by
1.8.16