Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
|
#include <G4INCLRootFinder.hh>
Static Public Member Functions | |
static G4bool | solve (RootFunctor const *const f, const G4double x0) |
Numerically solve a one-dimensional equation. | |
static std::pair< G4double, G4double > const & | getSolution () |
Get the solution of the last call to solve(). | |
Protected Member Functions | |
RootFinder () | |
~RootFinder () | |
Definition at line 66 of file G4INCLRootFinder.hh.
|
inlineprotected |
Definition at line 110 of file G4INCLRootFinder.hh.
|
inlineprotected |
Definition at line 111 of file G4INCLRootFinder.hh.
Get the solution of the last call to solve().
Definition at line 85 of file G4INCLRootFinder.hh.
Referenced by G4INCL::InteractionAvatar::enforceEnergyConservation().
Numerically solve a one-dimensional equation.
Numerically solves the equation f(x)==0. This implementation uses the false-position method.
If a root is found, it can be retrieved using the getSolution() method,
f | pointer to a RootFunctor |
x0 | initial value of the function argument |
Definition at line 60 of file G4INCLRootFinder.cc.
Referenced by G4INCL::InteractionAvatar::enforceEnergyConservation().