Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

SPARK::TComponentSettings Class Reference

Class acts as repository of settings defined for each component. More...

#include <prefs.h>

List of all members.

Public Member Functions

Structors
 TComponentSettings ()
 Initialize all settings to compile-time default values.

 TComponentSettings (const TComponentSettings &)
 Copy constructor.

TComponentSettingsoperator= (const TComponentSettings &)
 Assignement operator.

 ~TComponentSettings () throw ()
 Trivial destructor.

Main operations
void Reset ()
 Resets settings to default values.

void Load (SPARK::TPrefList *prefList)
 Loads all settings from prefList.

Access methods for nonlinear solver
unsigned GetComponentSolvingMethod () const
 Returns the code for the component solving method as unsigned.

void SetComponentSolvingMethod (unsigned method)
 Sets the code for the component solving method to method.

unsigned GetMaxIterations () const
 Returns the maximum number of iterations allowed in the nonlinear solver as unsigned.

void SetMaxIterations (unsigned maxIterations)
 Sets the maximum number of iterations allowed in the nonlinear solver to maxIterations.

unsigned GetMinIterations () const
 Returns the minimum number of iterations allowed in the nonlinear solver as unsigned.

void SetMinIterations (unsigned minIterations)
 Sets the minimum number of iterations allowed in the nonlinear solver to minIterations.

unsigned GetCheckBadNumericsFlag () const
 Returns the boolean flag (0=false | 1=true) indicating whether or not the solver will check for bad numerics at each iteration as unsigned.

void SetCheckBadNumericsFlag (unsigned flag)
 Sets the flag indicating whether or not the solver will check for bad numerics at each iteration.

Access methods for jacobian evaluation method
unsigned GetTrueJacobianEvalStep () const
 Returns the number of iterations until the Jacobian should be refreshed as unsigned.

void SetTrueJacobianEvalStep (unsigned frequency)
 Sets the number of iterations until the jacobian should be refreshed to frequency.

double GetJacobianRefreshRatio () const
 Returns the threshold value of the ratio of the residual norms over successive iterations that triggers a Jacobian refresh as double.

void SetJacobianRefreshRatio (double refreshRatio)
 Sets the threshold value of the ratio of the residual norms over successive iterations that triggers a Jacobian refresh to refreshRatio.

double GetEpsilon () const
 Returns the perturbation value used to estimate the partial derivatives with finite-differences as double.

void SetEpsilon (double epsilon)
 Sets the perturbation value used to estimate the partial derivatives with finite-differences to epsilon.

Access methods for step control method
unsigned GetStepControlMethod () const
 Returns the code for the step control method as unsigned.

void SetStepControlMethod (unsigned method)
 Sets the code for the step control method to method.

double GetMaxRelaxationCoefficient () const
 Returns the maximum relaxation coefficient used by the step control method as double.

void SetMaxRelaxationCoefficient (double maxRelaxation)
 Sets the maximum relaxation coefficient used by the step control method to maxRelaxation.

double GetMinRelaxationCoefficient () const
 Returns the minimum relaxation coefficient used by the step control method as double.

void SetMinRelaxationCoefficient (double minRelaxation)
 Sets the minimum relaxation coefficient used by the step control method to minRelaxation.

Access methods for linear solver
unsigned GetMatrixSolvingMethod () const
 Returns the code for the linear solution method as unsigned.

void SetMatrixSolvingMethod (unsigned method)
 Sets the code for the linear solution method to method.

unsigned GetScalingMethod () const
 Returns the code for the scaling method as unsigned.

void SetScalingMethod (unsigned method)
 Sets the code for the scaling method to method.

unsigned GetPivotingMethod () const
 Returns the code for the pivoting method used in conjunction with the Gaussian elimination method as unsigned.

void SetPivotingMethod (unsigned method)
 Sets the code for the pivoting method used in conjunction with the Gaussian elimination method to method.

unsigned GetRefinementMethod () const
 Returns the number of desired refinement iterations as unsigned.

void SetRefinementMethod (unsigned method)
 Sets the number of desired refinement iterations to method.

Access methods for tracers
Note:
The tracer file names must be unique across all active components and problems being solved within the same process space.


const char * GetVariablesTracerFilename () const
 Returns the name of the variables tracer file as const char* .

void SetVariablesTracerFilename (const char *filename)
 Sets the name of the variables tracer file to filename.

const char * GetIncrementsTracerFilename () const
 Returns the name of the increments tracer file as const char* .

void SetIncrementsTracerFilename (const char *filename)
 Sets the name of the increments tracer file to filename.

const char * GetResidualsTracerFilename () const
 Returns the name of the residuals tracer file as const char* .

void SetResidualsTracerFilename (const char *filename)
 Sets the name of the residuals tracer file to filename.

const char * GetJacobianTracerFilename () const
 Returns the name of the Jacobian tracer file as const char* .

void SetJacobianTracerFilename (const char *filename)
 Sets the name of the Jacobian tracer file to filename.

I/O Operations
void Write (std::ostream &os, const std::string &before) const
 Writes the list of component settings to os.


Detailed Description

Class acts as repository of settings defined for each component.

Behavior:

See namespace SPARK::DefaultComponentSettings for the list of hard-coded default settings.

Note:
By default, no tracer file names are specified.


Constructor & Destructor Documentation

SPARK::TComponentSettings::TComponentSettings  ) 
 

Initialize all settings to compile-time default values.

SPARK::TComponentSettings::TComponentSettings const TComponentSettings  ) 
 

Copy constructor.

SPARK::TComponentSettings::~TComponentSettings  )  throw () [inline]
 

Trivial destructor.


Member Function Documentation

TComponentSettings& SPARK::TComponentSettings::operator= const TComponentSettings  ) 
 

Assignement operator.

void SPARK::TComponentSettings::Reset  ) 
 

Resets settings to default values.

void SPARK::TComponentSettings::Load SPARK::TPrefList *  prefList  ) 
 

Loads all settings from prefList.

unsigned SPARK::TComponentSettings::GetComponentSolvingMethod  )  const [inline]
 

Returns the code for the component solving method as unsigned.

List of codes:

  • Newton-Raphson method = 0
  • Perturbed Newton-Raphson method = 1
  • Fixed-point iteration (aka forward substitution) = 2
  • Secant method (Newton method with Broyden's update formula) = 4

void SPARK::TComponentSettings::SetComponentSolvingMethod unsigned  method  )  [inline]
 

Sets the code for the component solving method to method.

unsigned SPARK::TComponentSettings::GetMaxIterations  )  const [inline]
 

Returns the maximum number of iterations allowed in the nonlinear solver as unsigned.

void SPARK::TComponentSettings::SetMaxIterations unsigned  maxIterations  )  [inline]
 

Sets the maximum number of iterations allowed in the nonlinear solver to maxIterations.

unsigned SPARK::TComponentSettings::GetMinIterations  )  const [inline]
 

Returns the minimum number of iterations allowed in the nonlinear solver as unsigned.

void SPARK::TComponentSettings::SetMinIterations unsigned  minIterations  )  [inline]
 

Sets the minimum number of iterations allowed in the nonlinear solver to minIterations.

unsigned SPARK::TComponentSettings::GetCheckBadNumericsFlag  )  const [inline]
 

Returns the boolean flag (0=false | 1=true) indicating whether or not the solver will check for bad numerics at each iteration as unsigned.

void SPARK::TComponentSettings::SetCheckBadNumericsFlag unsigned  flag  )  [inline]
 

Sets the flag indicating whether or not the solver will check for bad numerics at each iteration.

unsigned SPARK::TComponentSettings::GetTrueJacobianEvalStep  )  const [inline]
 

Returns the number of iterations until the Jacobian should be refreshed as unsigned.

Note:
If it is equal to 0 then it is automatically refreshed by the solver when the convergence process becomes to slow or diverging.

void SPARK::TComponentSettings::SetTrueJacobianEvalStep unsigned  frequency  )  [inline]
 

Sets the number of iterations until the jacobian should be refreshed to frequency.

double SPARK::TComponentSettings::GetJacobianRefreshRatio  )  const [inline]
 

Returns the threshold value of the ratio of the residual norms over successive iterations that triggers a Jacobian refresh as double.

void SPARK::TComponentSettings::SetJacobianRefreshRatio double  refreshRatio  )  [inline]
 

Sets the threshold value of the ratio of the residual norms over successive iterations that triggers a Jacobian refresh to refreshRatio.

double SPARK::TComponentSettings::GetEpsilon  )  const [inline]
 

Returns the perturbation value used to estimate the partial derivatives with finite-differences as double.

Note:
If it is equal to 0, then solver automatically computes a scaled perturbation value for each dependent variable

void SPARK::TComponentSettings::SetEpsilon double  epsilon  )  [inline]
 

Sets the perturbation value used to estimate the partial derivatives with finite-differences to epsilon.

unsigned SPARK::TComponentSettings::GetStepControlMethod  )  const [inline]
 

Returns the code for the step control method as unsigned.

List of codes:

  • Fixed relaxation method = 0
  • Basic backtracking method based on halving strategy = 1
  • Line search backtracking method = 2
  • Affine invariant backtracking strategy = 3

void SPARK::TComponentSettings::SetStepControlMethod unsigned  method  )  [inline]
 

Sets the code for the step control method to method.

double SPARK::TComponentSettings::GetMaxRelaxationCoefficient  )  const [inline]
 

Returns the maximum relaxation coefficient used by the step control method as double.

void SPARK::TComponentSettings::SetMaxRelaxationCoefficient double  maxRelaxation  )  [inline]
 

Sets the maximum relaxation coefficient used by the step control method to maxRelaxation.

double SPARK::TComponentSettings::GetMinRelaxationCoefficient  )  const [inline]
 

Returns the minimum relaxation coefficient used by the step control method as double.

void SPARK::TComponentSettings::SetMinRelaxationCoefficient double  minRelaxation  )  [inline]
 

Sets the minimum relaxation coefficient used by the step control method to minRelaxation.

unsigned SPARK::TComponentSettings::GetMatrixSolvingMethod  )  const [inline]
 

Returns the code for the linear solution method as unsigned.

List of codes:

  • Dense Gaussian elimination = 0
  • Dense singular value decomposition (SVD) = 1
  • Dense LU decomposition = 2
  • Dense Gauss-Jordan elimination = 3
  • Sparse LU decomposition = 4 (implemented with the UMFPACK 4.0 library. See http://www.cise.ufl.edu/research/sparse/umfpack/ )

void SPARK::TComponentSettings::SetMatrixSolvingMethod unsigned  method  )  [inline]
 

Sets the code for the linear solution method to method.

unsigned SPARK::TComponentSettings::GetScalingMethod  )  const [inline]
 

Returns the code for the scaling method as unsigned.

List of codes:

  • No scaling = 0
  • Affine invariant scaling (in both variable and residual spaces) = 1

void SPARK::TComponentSettings::SetScalingMethod unsigned  method  )  [inline]
 

Sets the code for the scaling method to method.

unsigned SPARK::TComponentSettings::GetPivotingMethod  )  const [inline]
 

Returns the code for the pivoting method used in conjunction with the Gaussian elimination method as unsigned.

List of codes:

  • No pivoting method = 0
  • Partial pivoting method = 1
  • Total pivoting method = 2
Note:
The total pivoting method is implemented with the Gauss-Jordan method. See TComponentSettings::GetMatrixSolvingMethod().

void SPARK::TComponentSettings::SetPivotingMethod unsigned  method  )  [inline]
 

Sets the code for the pivoting method used in conjunction with the Gaussian elimination method to method.

unsigned SPARK::TComponentSettings::GetRefinementMethod  )  const [inline]
 

Returns the number of desired refinement iterations as unsigned.

Note:
Typically, 2/3 iterations is sufficient to improve the accuracy of the solution of the linear system.

void SPARK::TComponentSettings::SetRefinementMethod unsigned  method  )  [inline]
 

Sets the number of desired refinement iterations to method.

const char* SPARK::TComponentSettings::GetVariablesTracerFilename  )  const [inline]
 

Returns the name of the variables tracer file as const char* .

void SPARK::TComponentSettings::SetVariablesTracerFilename const char *  filename  )  [inline]
 

Sets the name of the variables tracer file to filename.

const char* SPARK::TComponentSettings::GetIncrementsTracerFilename  )  const [inline]
 

Returns the name of the increments tracer file as const char* .

void SPARK::TComponentSettings::SetIncrementsTracerFilename const char *  filename  )  [inline]
 

Sets the name of the increments tracer file to filename.

const char* SPARK::TComponentSettings::GetResidualsTracerFilename  )  const [inline]
 

Returns the name of the residuals tracer file as const char* .

void SPARK::TComponentSettings::SetResidualsTracerFilename const char *  filename  )  [inline]
 

Sets the name of the residuals tracer file to filename.

const char* SPARK::TComponentSettings::GetJacobianTracerFilename  )  const [inline]
 

Returns the name of the Jacobian tracer file as const char* .

void SPARK::TComponentSettings::SetJacobianTracerFilename const char *  filename  )  [inline]
 

Sets the name of the Jacobian tracer file to filename.

void SPARK::TComponentSettings::Write std::ostream &  os,
const std::string &  before
const
 

Writes the list of component settings to os.


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

Generated on 5 Nov 2003 for VisualSPARK 2.01