Geant4-11
|
Namespaces | |
namespace | anonymous_namespace{G4INCLRootFinder.cc} |
Data Structures | |
class | Solution |
Functions | |
Solution | solve (RootFunctor const *const f, const G4double x0) |
Numerically solve a one-dimensional equation. More... | |
Solution G4INCL::RootFinder::solve | ( | RootFunctor const *const | f, |
const G4double | x0 | ||
) |
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 118 of file G4INCLRootFinder.cc.
References G4INCL::RootFinder::anonymous_namespace{G4INCLRootFinder.cc}::bracketRoot(), G4INCL::RootFunctor::cleanUp(), INCL_DEBUG, G4INCL::RootFinder::anonymous_namespace{G4INCLRootFinder.cc}::maxIterations, G4INCL::Math::sign(), and G4INCL::RootFinder::anonymous_namespace{G4INCLRootFinder.cc}::toleranceY.
Referenced by G4INCL::InteractionAvatar::enforceEnergyConservation(), G4INCL::ParticleEntryChannel::particleEnters(), and G4INCL::INCL::rescaleOutgoingForRecoil().