Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Solver< Function > Class Template Reference

#include <G4Solver.hh>

Public Types

enum  { DefaultMaxIter = 100 }
 

Public Member Functions

 G4Solver ()
 
 G4Solver (const G4int iterations, const G4double tol)
 
 G4Solver (const G4Solver &right)
 
 ~G4Solver ()
 
G4Solveroperator= (const G4Solver &right)
 
G4bool operator== (const G4Solver &right) const
 
G4bool operator!= (const G4Solver &right) const
 
G4int GetMaxIterations (void) const
 
void SetMaxIterations (const G4int iterations)
 
G4double GetTolerance (void) const
 
void SetTolerance (const G4double epsilon)
 
G4double GetIntervalLowerLimit (void) const
 
G4double GetIntervalUpperLimit (void) const
 
void SetIntervalLimits (const G4double Limit1, const G4double Limit2)
 
G4double GetRoot (void) const
 
G4bool Bisection (Function &theFunction)
 
G4bool RegulaFalsi (Function &theFunction)
 
G4bool Brent (Function &theFunction)
 
G4bool Crenshaw (Function &theFunction)
 

Detailed Description

template<class Function>
class G4Solver< Function >

Definition at line 40 of file G4Solver.hh.

Member Enumeration Documentation

◆ anonymous enum

template<class Function >
anonymous enum
Enumerator
DefaultMaxIter 

Definition at line 43 of file G4Solver.hh.

43{DefaultMaxIter = 100};
@ DefaultMaxIter
Definition: G4Solver.hh:43

Constructor & Destructor Documentation

◆ G4Solver() [1/3]

template<class Function >
G4Solver< Function >::G4Solver ( )
inline

Definition at line 46 of file G4Solver.hh.

46 : MaxIter(DefaultMaxIter), tolerance(DefaultTolerance),
47 a(0.0), b(0.0), root(0.0) {};
#define DefaultTolerance
Definition: G4Solver.hh:38

◆ G4Solver() [2/3]

template<class Function >
G4Solver< Function >::G4Solver ( const G4int  iterations,
const G4double  tol 
)
inline

Definition at line 49 of file G4Solver.hh.

49 :
50 MaxIter(iterations), tolerance(tol),
51 a(0.0), b(0.0), root(0.0) {};

◆ G4Solver() [3/3]

template<class Function >
G4Solver< Function >::G4Solver ( const G4Solver< Function > &  right)

Definition at line 35 of file G4Solver.cc.

36{
37 MaxIter = right.MaxIter;
38 tolerance = right.tolerance;
39 a = right.a;
40 b = right.b;
41 root = right.root;
42}

◆ ~G4Solver()

template<class Function >
G4Solver< Function >::~G4Solver ( )
inline

Definition at line 57 of file G4Solver.hh.

57{};

Member Function Documentation

◆ Bisection()

template<class Function >
G4bool G4Solver< Function >::Bisection ( Function &  theFunction)

◆ Brent()

◆ Crenshaw()

template<class Function >
G4bool G4Solver< Function >::Crenshaw ( Function &  theFunction)

◆ GetIntervalLowerLimit()

template<class Function >
G4double G4Solver< Function >::GetIntervalLowerLimit ( void  ) const
inline

Definition at line 71 of file G4Solver.hh.

71{return a;}

◆ GetIntervalUpperLimit()

template<class Function >
G4double G4Solver< Function >::GetIntervalUpperLimit ( void  ) const
inline

Definition at line 72 of file G4Solver.hh.

72{return b;}

◆ GetMaxIterations()

template<class Function >
G4int G4Solver< Function >::GetMaxIterations ( void  ) const
inline

Definition at line 64 of file G4Solver.hh.

64{return MaxIter;}

◆ GetRoot()

template<class Function >
G4double G4Solver< Function >::GetRoot ( void  ) const
inline

◆ GetTolerance()

template<class Function >
G4double G4Solver< Function >::GetTolerance ( void  ) const
inline

Definition at line 67 of file G4Solver.hh.

67{return tolerance;}

◆ operator!=()

template<class Function >
G4bool G4Solver< Function >::operator!= ( const G4Solver< Function > &  right) const

Definition at line 64 of file G4Solver.cc.

65{
66 return !operator==(right);
67}
G4bool operator==(const G4Solver &right) const
Definition: G4Solver.cc:57

◆ operator=()

template<class Function >
G4Solver< Function > & G4Solver< Function >::operator= ( const G4Solver< Function > &  right)

Definition at line 46 of file G4Solver.cc.

47{
48 MaxIter = right.MaxIter;
49 tolerance = right.tolerance;
50 a = right.a;
51 b = right.b;
52 root = right.root;
53 return *this;
54}

◆ operator==()

template<class Function >
G4bool G4Solver< Function >::operator== ( const G4Solver< Function > &  right) const

Definition at line 57 of file G4Solver.cc.

58{
59 if (this == &right) return true;
60 else return false;
61}

◆ RegulaFalsi()

template<class Function >
G4bool G4Solver< Function >::RegulaFalsi ( Function &  theFunction)

◆ SetIntervalLimits()

template<class Function >
void G4Solver< Function >::SetIntervalLimits ( const G4double  Limit1,
const G4double  Limit2 
)

◆ SetMaxIterations()

template<class Function >
void G4Solver< Function >::SetMaxIterations ( const G4int  iterations)
inline

Definition at line 65 of file G4Solver.hh.

65{MaxIter=iterations;}

◆ SetTolerance()

template<class Function >
void G4Solver< Function >::SetTolerance ( const G4double  epsilon)
inline

Definition at line 68 of file G4Solver.hh.

68{tolerance = epsilon;}
G4double epsilon(G4double density, G4double temperature)

The documentation for this class was generated from the following files: