Geant4  10.00.p02
G4INCL::RootFinder Namespace Reference

Classes

class  Solution
 

Functions

Solution solve (RootFunctor const *const f, const G4double x0)
 Numerically solve a one-dimensional equation. More...
 

Function Documentation

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,

Parameters
fpointer to a RootFunctor
x0initial value of the function argument
Returns
a Solution object describing the root, if it was found

Definition at line 117 of file G4INCLRootFinder.cc.

References G4INCL::RootFunctor::cleanUp(), INCL_DEBUG, and G4INCL::Math::sign().

Referenced by G4INCL::InteractionAvatar::enforceEnergyConservation(), G4INCL::ParticleEntryChannel::particleEnters(), and G4INCL::INCL::rescaleOutgoingForRecoil().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: