Add callaback interface to InteractionDispatchers

Registered by Václav Šmilauer

In addition to 3 groups of functors, InteractionDispatcher would take additional list of callback functors (Derived from IntrCallback). Callbacks would, in succession, receive interaction object after it has been processed by all 3 previous functors (Ig, Ip, Law).

To avoid virtual calls, the functionality would be in static member functions, which receives IntrCallback* self as its first (explicit) argument. A special function IntrCallback::init(Scene*) would return pointer to the function, or NULL if the callback is to be deactivated in this timestep. Dealing with types of InteractionGeometry and InteractionPhysics is responsibility of the functor itself.

In order to make IntrCallback usable in multi-threaded scenario, special OpenMPAccumulator<typename T, T initValue> objects will be created. They will define add, get and reset methods, which will respectively add (for each thread separately), get (summing values over all threads, guarded by mutex) and reset (to initValue, with mutex'ed access) the value.

Blueprint information

Status:
Started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Approved
Series goal:
None
Implementation:
Beta Available
Milestone target:
milestone icon 0.5
Started by
Václav Šmilauer

Related branches

Sprints

Whiteboard

(scripts/test/callback.py; crashes in the body callback, investigation ongoing)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.