Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
AccessAdobe photoshopAlgoritmiAutocadBaze de dateCC sharp
CalculatoareCorel drawDot netExcelFox proFrontpageHardware
HtmlInternetJavaLinuxMatlabMs dosPascal
PhpPower pointRetele calculatoareSqlTutorialsWebdesignWindows
WordXml

AspAutocadCDot netExcelFox proHtmlJava
LinuxMathcadPhotoshopPhpSqlVisual studioWindowsXml

Error Tolerance Control Functions

c



+ Font mai mare | - Font mai mic



Error Tolerance Control Functions

Table 5 lists the error tolerance control functions. These functions determine what the tolerances will be, and tell the integrator which norm to use. Two tolerance criteria are used to determine whether to accept a variable step size step. An estimate of the local error is computed and compared to the absolute and relative tolerance values. The integrator tries to find a step size small enough such that for the current step



(2-1)

where error is the local error estimate, AbsTol is the absolute tolerance requirement, RelTol is the relative tolerance requirement, and solution is the current estimate of the solution. Note that AbsTol and RelTol are both vectors, which allows you to specify a different tolerance for each component of the ODE. You can specify a single value, which will then be used for all components. The integrator can use the 2-norm or -norm (default) in the computation above.

Note that either of the absolute or relative tolerances may be set to zero, but not both at once. It is an error to set either less than zero. The relative tolerance typically dominates the error computation unless the solution is near zero, in which case the absolute tolerance dominates.

Table 5 Error Tolerance Control Functions.

Function

Description

SetAbsTol

Set the absolute error tolerance.

SetRelTol

Set the relative error tolerance.

SetTolerance

Set the absolute and relative error tolerances simultaneously.

UseRSSNorm

Tell the integrator to use the root-sum-square (RSS) norm (2-norm) for computing the error tolerance.

UseInfNorm

Tell the integrator to use the maximum error value ( -norm) for computing the error tolerance.

SetAbsTol

Usage

pInteg->SetAbsTol(cvAbsTol);

pInteg->SetAbsTol(fAbsTol);

Arguments

Variable

Type

Description

cvAbsTol

colvec

Column vector of absolute tolerance values.

fAbsTol

double

Single value for the absolute tolerance.

Return Value

None.

Notes

Either of the forms of SetAbsTol( may be used. The first requires a column vector the same dimension as the state vector. Each element individually defines the absolute tolerance requirement of the corresponding element of the state vector. In the second form, the same value will be used for all elements of the state vector. It is an error to set both the absolute and relative tolerances to zero, or either one negative.

SetRelTol

Usage

pInteg->SetRelTol(cvRelTol);

pInteg->SetRelTol(fRelTol);

Arguments

Variable

Type

Description

cvRelTol

colvec

Column vector of relative tolerance values.

fRelTol

double

Single value for the relative tolerance.

Return Value

None.

Notes

Either of the forms of SetRelTol( may be used. The first requires a column vector the same dimension as the state vector. Each element individually defines the relative tolerance requirement of the corresponding element of the state vector. In the second form, the same value will be used for all elements of the state vector. It is an error to set both the absolute and relative tolerances to zero, or either one negative.

SetTolerance

Usage

pInteg->SetTolerance(cvAbsTol, cvRelTol);

pInteg->SetTolerance(fAbsTol, fRelTol);

pInteg->SetTolerance();

Arguments

Variable

Type

Description

cvAbsTol

colvec

Column vector of absolute tolerance values.

cvRelTol

colvec

Column vector of relative tolerance values.

fAbsTol

double

Single value for the absolute tolerance. Default: -1.0.

fRelTol

double

Single value for the relative tolerance. Default: -1.0.

Return Value

None.

Notes

Any of the forms of SetTolerance( may be used. The first requires two column vectors the same dimension as the state vector. Each element individually defines the absolute and relative tolerance requirements of the corresponding element of the state vector. In the second form, the same tolerance values will be used for all elements of the state vector. It is an error to set both the absolute and relative tolerances to zero. However, if you supply a negative value for either input then default values will be used. If the ODE supplies a default value, that will be used first. If not, then the integrator default values (10-6 for AbsTol and 10-4 for RelTol) will be used instead.

UseRSSNorm

Usage

pInteg->UseRSSNorm();

Arguments

None.

Return Value

None.

Notes

This function tells the integrator to use the 2-norm (root-sum-square magnitude) for computing the error tolerance.

UseInfNorm

Usage

pInteg->UseInfNorm();

Arguments

None.

Return Value

None.

Notes

This function tells the integrator to use the -norm (largest value) for computing the error tolerance.



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 895
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved