DFT-EFE
 
Loading...
Searching...
No Matches
NewtonRaphsonSolver.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Avirup Sircar
24 */
25
26#ifndef dftefeNewtonRaphsonSolver_h
27#define dftefeNewtonRaphsonSolver_h
28
29#include <utils/TypeConfig.h>
32
33namespace dftefe
34{
35 namespace linearAlgebra
36 {
45 template <typename ValueType>
47 {
48 public:
59 NewtonRaphsonSolver(const size_type maxIter,
60 const double tolerance,
61 const double forceTolerance);
62
67
75 solve(
76 NewtonRaphsonSolverFunction<ValueType> &newtonRaphsonSolverFunction);
77
78 ValueType
80
81 private:
85 ValueType d_residual;
87 }; // end of class NewtonRaphsonSolver
88 } // end of namespace linearAlgebra
89} // end of namespace dftefe
91#endif // dftefeNewtonRaphsonSolver_h
Definition: NewtonRaphsonSolverFunction.h:38
A class that implements the Newton-Raphson solver to find root of a function.
Definition: NewtonRaphsonSolver.h:47
double d_tolerance
Definition: NewtonRaphsonSolver.h:83
ValueType d_residual
Definition: NewtonRaphsonSolver.h:85
NewtonRaphsonError solve(NewtonRaphsonSolverFunction< ValueType > &newtonRaphsonSolverFunction)
Function that initiates the NR solve.
Definition: NewtonRaphsonSolver.t.cpp:49
size_type d_maxIter
Definition: NewtonRaphsonSolver.h:82
ValueType getResidual()
Definition: NewtonRaphsonSolver.t.cpp:117
~NewtonRaphsonSolver()=default
Default Destructor.
bool d_isSolved
Definition: NewtonRaphsonSolver.h:86
double d_forceTolerance
Definition: NewtonRaphsonSolver.h:84
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
Definition: LinearAlgebraTypes.h:141