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

Output Control Functions

c



+ Font mai mare | - Font mai mic



Output Control Functions

Table 8 lists the output control functions. These functions set or add requested output times and tell the integrator whether to handle output of the states or rely on the ODE object to perform that function.

Table 8 Output Control Functions.



Function

Description

SetTOut

Sets the requested output times.

AppendTOut

Adds additional requested output times.

LogOutput

Tells the integrator to keep track of the state output or let the ODE object handle it.

LoggingOutput

Reports whether the integrator is currently keeping track of the state output.

SetTOut

Usage

pInteg->SetTOut();

pInteg->SetTOut(cvTOut);

pInteg->SetTOut(faTOut, iNumTOut);

pInteg->SetTOut(t0, tf);

pInteg->SetTOut(t0, tf, dt);

Arguments

Variable

Type

Description

cvTOut

colvec

Column vector of requested output times.

faTOut

double*

Array of requested output times

iNumTOut

int

Number of elements in faTOut.

t0

double

Desired start time.

tf

double

Desired final time.

dt

double

(Optional). Delta time-step between outputs. Default: 1.0.

Return Value

None.

Notes

There are many version of this function to accommodate different styles of input. The first version takes no input but will check the ODE to see if it can supply a default set of output times. The second version requires a column vector with each element representing a desired output time. The third performs the same operation with an array of values. The final versions allow you to specify a uniformly spaced list of values.

In each case, the input is checked that all values are monotonically increasing or decreasing. The direction of integration (forward or backward in time) is determined from the direction of the input values. The initial integration time will be the first value of the array. Note, however, that you can specify a single output time and then use SetT0( to give a different starting time. In this case, the integrator will start at the time set by SetT0( and integrate to the time set with SetTOut(), outputting the results only at that time.

Care must be taken when setting output times with fixed step size methods. The output times must be aligned with the step times or problems will occur. For variable step size methods without dense output, the integration can become inefficient if the requested times are too close together. In this case, the integrator will reduce the step size to ensure the step does not pass the output time. This can lead to very small or erratic step sizes. This problem does not occur with methods that use dense output.

AppendTOut

Usage

pInteg->AppendTOut(cvTOut);

pInteg->AppendTOut(faTOut, iNumTOut);

pInteg->AppendTOut(t);

Arguments

Variable

Type

Description

cvTOut

colvec

Column vector of additional requested output times.

faTOut

double*

Array of additional requested output times

iNumTOut

int

Number of elements in faTOut.

t

double

Desired single additional output time.

Return Value

None.

Notes

As with SetTOut( , there are many version of this function to accommodate different styles of input. The first version requires a column vector with each element representing a desired output time. The second performs the same operation with an array of values. The final versions allow you to specify a single additional output time.

In each case, the input is checked that all values are monotonically increasing or decreasing and that they are consistent with the existing requested output times. The direction of integration (forward or backward in time) must be the same as before.

One use for this routine is to allow you to integrate the ODE to a given time, check its value, and integrate farther if needed based on the results of the first part of the integration. This routine clears the error generated if you try to integrate past the final output time.

LogOutput

Usage

pInteg->LogOutput();

pInteg->LogOutput(flag);

Arguments

Variable

Type

Description

flag

bool

(Optional). Flag to tell the integrator whether to keep track of output or let the ODE be responsible for it. Default: true.

Return Value

None.

Notes

Use this routine to tell the integrator whether you wish it to output the state vector. By default, the integrator will record the states at every requested output time set by SetTOut( . At each of these times, the ODE function OutputStep( is also called to let the ODE handle any output it wishes. By passing false to this routine you can tell the integrator to stop logging the output and thus rely only on output by the ODE. This is particularly useful when there are a large number of output times such that memory requirements would be prohibitive to store all of the values. In this way you can use the ODE output routine to write directly to disk.

LoggingOutput

Usage

if ( pInteg->LoggingOutput() ).

Arguments

None.

Return Value

Type

Description

bool

Flag indicating whether the integrator is responsible for logging output or not.

Notes

None.



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 672
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