fish callback
command
Syntax
- fish callback keyword
Add/remove functions to be executed in response to callback events.
The callback mechanism allows for the FISH function sf to be executed at a specific point in the cycle sequence during cycling — at point f in the sequence (if supplied) or when a specific callback event occurs (see the
fish list callbacks
command for a list of events).Three types of events can trigger the execution of a FISH function: 1) model entity creation/deletion; 2) contact model events;[1] and 3) solve termination events. In cases 1) and 2), values may be returned to sf as arguments, provided that sf takes arguments.
In case 1), the first argument passed to sf is a pointer to the entity that has been created or deleted. In case 2), the arguments depend on the contact model implementation. [CS: removing the following until it is true] and are detailed in the topic “nomenclature”
If the remove keyword is given, then the first instance of sf is removed. [CS: removing the following until it is true] See the :ref:tuto_callbacks for examples of callback usage.
- add sym keyword
Adds the FISH symbol sym to be called back by the system. The location of the callback is determined by the following keyword. See the section FISH Callback Events for a discussion of FISH callbacks.
- f <keyword>
A FISH function sym will be called every step at the location in the cycle sequence given by f. The following keywords are available to reduce the frequency of the callback.
- interval i
If specified, then the function will only be called every i steps. Cannot be used with the interval-time keyword.
- interval-time f
If specified, then the function will only be called every f time units of the process specified with the process keyword. If no process is specified then the mechanical process is used. Cannot be used with the interval keyword.
- process keyword
If specified, then the function will only be called if the process indicated is active during that particular cycle.
- creep
The callback will only execute if the creep and mechanical process is active.
- dynamic
The callback will only execute if the dynamic and mechanical process is active.
- fluid
The callback will only execute if the fluid process is active.
- mechanical
The callback will only execute if the mechanical process is active.
- thermal
The callback will only execute if the thermal process is active.
- remove sym <keyword>
Removes sym from the list of callbacks in the system. If no event name or location is specified then the symbol will be removed wherever it is found. The following keywords and options are available:
fish callback
Keyword Block
The following keywords may be used to specify callback events. event
. event
.
- ball_create
Ball creation event.
- ball_delete
Ball deletion event.
- ballcfd_create
Ball CFD creation event.
- ballcfd_delete
Ball CFD deletion event.
- ballthermal_create
Ball thermal creation event.
- ballthermal_delete
Ball thermal deletion event.
- block_create
Block creation event. Argument to called fish function will be the pointer to the new block.
- block_delete
Block deletion event. Argument to called fish function will be the pointer to the deleted block.
- bond_break
Contact bond break event.
- bond_broken
Contact bond broken event.
- cfd_after_update
After CFD porosities have been updated.
- cfd_after_receive
After CFD velocities have been received.
- cfd_before_send
Before CFD information has been sent.
- cfd_before_update
Before CFD porosities have been updated.
- clump_create
Clump creation event.
- clump_delete
Clump deletion event.
- clumpcfd_create
Clump CFD creation event.
- clumpcfd_delete
Clump CFD deletion event.
- clumpthermal_create
Clump thermal creation event.
- clumpthermal_delete
Clump thermal deletion event.
- contact_activated
Contact activation event.
- contact_create
Contact creation event.
- contact_delete
Contact deletion event.
- faceblock_create
Face block creation event.
- faceblock_delete
Face block deletion event.
- facet_create
Wall facet creation event.
- facet_delete
Wall facet deletion event.
- fos_complete
A factor of safety solution has completed. Check the current solve criteria to see if the model has converged. The
global.fos
intrinsic will return the current factor of safety.
- fos_start
A factor of safety solution has started. The
global.fos
intrinsic will return the current factor of safety. The model will have been restored from the initial state and automatic strength reduction applied. This can be used to customized strength reduction at a given factor of safety.
- rblock_create
RBlock creation event.
- rblock_delete
RBlock deletion event.
- rblockthermal_create
RBlock thermal creation event.
- rblockthermal_delete
RBlock thermal deletion event.
- slip_change
Contact slip change event.
- solve_complete
The solve of cycle command has terminiated. One argument available of type string. If the string is not empty this indicates the error message that halted cycling.
- solve_ending
The solve of cycle command is about to terminate. Cycling has stopped and cleanup operations begun.
- solve_master
The code has entered the Master section of a coupled solution.
- solve_slave
The code has entered a slave section of teh copuled solution. One argument is provided indicating the name of the slave process.
- solve_start
The solve or cycle command is just about to start.
- struct_eom
Just before structural element node equations of motion.
- struct_eom_complete
Just after structural element node equations of motion.
- struct_internal
Just before structural element internal forces are calculated.
- struct_internal_complete
Just after structural element internal forces are calculated
- struct_link_force
Just before structural link forces are calculated.
- struct_link_force_complete
Just after structural link forces are calculated.
- struct_link_update_complete
Just after structural link properties are assigned from element properties as part of an update.
- struct_update
Just before structural geometry update. Done at the start of cycling and in large strain mode every update interval.
- struct_update_complete
Just after structural geometry update. Done at the start of cycling and in large strain mode every update interval.
- subcontact_create
Subcontact creation event. Argument to called fish function will be the pointer to the new subcontact.
- subcontact_delete
Subcontact deletion event. Argument to called fish function will be the pointer to the deleted subcontact.
- subcontact_state_change
Subcontact change of failure state. Arguments to called fish function will be the subcontact pointer and the old state (integer).
- wall_create
Wall creation event.
- wall_delete
Wall deletion event.
- wallthermal_create
Wall thermal creation event.
- wallthermal_delete
Wall thermal deletion event.
- zone_eom
Just before zone grid point equations of motion are performed.
- zone_eom_complete
Just after zone grid point equations of motion are performed.
- zone_stress
Just before zone stress updates.
- zone_stress_complete
Just after zone stress updates and other forces applied.
- zone_update
Just before zone geometry update. Done at the start of cycling and in large strain mode every update interval.
- zone_update_complete
Just after zone geometry update. Done at the start of cycling and in large strain mode every update interval.
Endnotes
Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: Dec 14, 2024 |