An
EVENT is a feature that evaluates an
event_trigger_expression on all
MESHFREE points at the beginning of the point cloud organization. If the trigger expression is evaluated positively an action is performed. The action to be performed is defined by the type of event. The following types are available:
-
- Function manipulation (can be used e.g. for the rotation of points hitting a certain part of the boundary geometry)
- Deletion of points (can be used for "meta geometries")
- Projection of data from other parts of the geometry
- Stop MESHFREE and exit cleanly
- Abort MESHFREE with an error
- Display an event message
- Write a restart file independent of the definition given in RestartStepSize
- Write a resume file
- Save computational results independent of the definition given in SAVE_interval
In
USER_common_variables, the definition of an event looks as follows:
EVENT(
$EV_FuncMani$) = ( event_trigger_expression,
%EVENT_FunctionManipulation%, %ind_xyz%, expression_xyz
, OPTIONAL: Further indices to be manipulated )
EVENT(
$EV_Deletion$) = ( event_trigger_expression,
%EVENT_DeletePoint% ,
OPTIONAL: MessageCode )
EVENT(
$EV_DataProj$) = ( event_trigger_expression,
%EVENT_DataProjection%, xEval, yEval, zEval, chamberEval, %ind_Function%, %ind_Target%
, OPTIONAL: Further indices to be projected )
EVENT(
$EV_Stop$) = ( event_trigger_expression,
%EVENT_StopFPM%,
OPTIONAL: MessageCode )
EVENT(
$EV_Abort$) = ( event_trigger_expression,
%EVENT_AbortFPM%,
OPTIONAL: MessageCode )
EVENT(
$EV_Message$) = ( event_trigger_expression,
%EVENT_Message%, MessageCode )
EVENT(
$EV_Restart$) = ( event_trigger_expression,
%EVENT_WriteRestart%,
OPTIONAL: MessageCode )
EVENT(
$EV_Resume$) = ( event_trigger_expression,
%EVENT_WriteResume%,
OPTIONAL: MessageCode )
EVENT(
$EV_DelRes$) = ( event_trigger_expression,
%EVENT_DeleteResume%,
OPTIONAL: MessageCode )
EVENT(
$EV_Save$) = ( event_trigger_expression,
%EVENT_SaveResults%,
OPTIONAL: MessageCode )
For each
MESHFREE point, the
event_trigger_expression is evaluated. If it is larger than zero for the considered point, the event is triggered and the following action is performed. The event_trigger_expression as well as the manipulations for the indices are defined by
Equations.
The (optional)
MessageCode is a positive integer or $$-acronym that associates the event with an
EventMessage to be printed every time the event is triggered.
Note: -
- Events are not executed in the first time step, directly after restart, or in case of resuming.
- The soft variables on the left hand side of the definition are optional. If none is given, then MESHFREE counts the number of event statements by their appearance in USER_common_variables. Instead of a soft variable, also the legacy syntax with natural number n is possible. In this case, all event statements in USER_common_variables have to be numbered consecutively to prevent overwriting.
Warning: The syntax with and without soft variables as well as with natural number must not be mixed!
- %EVENT_StopFPM% and %EVENT_AbortFPM% can be used for further stopping criteria besides time and number of time steps.
- By default, events are executed only if the point cloud organization is executed in this time step. I.e., if COMP_DoOrganizeOnlyAfterHowManyCycles \( = N > 1\), then events will also be executed only every \( N\) time steps. To make the execution of a single event independent of the point cloud organization, %EVENT_PerformAfterHowManyTimeCycles% must be used. This forces the event handler to execute the particular event every N_CycEvent time steps by prepending the additional parameters %EVENT_PerformAfterHowManyTimeCycles% and N_CycEvent to the RightHandSideExpression. This feature can also be used to enhance the performance by choosing a large value for N_CycEvent.
- For EVENT statements which do not depend on point properties, use %EVENT_PublicTrigger%.
EVENT definition for STANDBY pointclouds
If the user would like to define an
EVENT for the
STANDBY pointcloud, it is simply achieved by the keyword
%EVENT_only_PC_STANDBY% at the first position on the right hand side.
EVENT(
$EV_FuncMani$) = (
%EVENT_only_PC_STANDBY%, event_trigger_expression, %EVENT_...%, ... )
# classical EVENT definition for STANDBY pointclouds
EVENT(
$EV_FuncMani$) = (
%EVENT_only_PC_STANDBY%,
%EVENT_PerformAfterHowManyTimeCycles%, N_CycEvent, event_trigger_expression, %EVENT_...%, ... )
# perform event for STANDBY every n-th time cycle
EVENT(
$EV_FuncMani$) = (
%EVENT_only_PC_STANDBY%,
%EVENT_PublicTrigger%, event_trigger_expression, %EVENT_...%, ... )
# public trigger: be careful as one would couple active control of MESHFREE on a passive pointcloud
EVENT definition during reading-in of ENSIGHT results
If the user would like to define an
EVENT executed only at the read-in of ENSIGHT data (see
EnSight), it is simply achieved by the keyword
%EVENT_during_readin_of_PC% at the first position on the right hand side.
Mainly, one would use this feature for cutting the pointcloud in a geometrical way in order to save memory. For transient pointclouds, this
EVENT the will be executed whenever a new, successive ENSIGHT-state is read-in.
EVENT definition for all occasions
If there are EVENTs that definitively have to be executed for all the instances (regular PC, standby PC, ENSIGHT PC), it is simply achieved by the keyword
%EVENT_all_PC% at the first position on the right hand side.