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

Event Handling Functions

c



+ Font mai mare | - Font mai mic



Event Handling Functions

Table 10 lists the event handling functions. These functions allow you to tell the integrator how or whether to handle events, and reset the event finder after a terminal event. Note that event handling can only be done with a Butcher Table method that supports dense output.

Table 10 Event Handling Functions.



Function

Description

UsingEvents

Returns true if the integrator is looking for events.

UseEvents

Tells the integrator whether or not to look for events.

OutputEventsInYOut

Tells the integrator to output the events in YOut, even if they do not occur at one of the requested output times.

ResetTerminalEvent

Resets the terminal event flag, allowing integration to continue.

ReachedTerminalEvent

Returns true if a terminal event has been reached (stops integration).

UsingEvents

Usage

if ( pInteg->UsingEvents() ).

Arguments

None.

Return Value

Type

Description

bool

Returns true if the integrator is handling events, false otherwise.

Notes

None.

UseEvents

Usage

pInteg->UseEvents();

pInteg->UseEvents(flag);

Arguments

Variable

Type

Description

flag

bool

(Optional). Flag telling the integrator whether or not to look for events. Default: true.

Return Value

None.

Notes

This function tells the integrator to start or stop looking for events. Event handling requires a Butcher Table with dense output (such as DOPRI5). In other cases, this flag is ignored.

OutputEventsInYOut

Usage

pInteg->OutputEventsInYOut();

pInteg->OutputEventsInYOut(flag);

Arguments

Variable

Type

Description

flag

bool

(Optional). Flag telling the integrator whether or not to output events to the output vector. Default: true.

Return Value

None.

Notes

This function tells the integrator to output the event times and states to the output vectors. By default, events are only stored in their own output (see Event Output Functions, below). This causes these output values to also be copied into the normal output values returned by GetTOut( and GetYOut(). Note that this will cause irregular output as the event times generally do not occur at the requested output times. It does, however, smooth the output to show more clearly where events occur.

ResetTerminalEvent

Usage

pInteg->ResetTerminalEvent();

Arguments

None.

Return Value

None.

Notes

This function tells the integrator to reset the terminal event flag, which is set when the ODE indicates that a terminal event has occurred. This allows you to continue integrating beyond this point (usually after resetting some of the event states).

ReachedTerminalEvent

Usage

if ( pInteg->ReachedTerminalEvent() ).

Arguments

None.

Return Value

Type

Description

bool

Returns true if the integrator has reached a terminal event, false otherwise.

Notes

None.



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


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