ug4
lua_callback_util.lua File Reference

Functions

function util LuaCallbackHelper create (func)
 
function LuaCallbackHelperCallback (step, time, dt, luaid)
 

Function Documentation

◆ create()

function util LuaCallbackHelper create ( func  )

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / lua_callback_util.lua :20-30

function util.LuaCallbackHelper:create(func)
local cb = {}
cb.callback = func
cb.CPPCallback = LuaCallbackObserver(util.LuaCallbackHelper.count)
cb.CPPCallback:set_callback("LuaCallbackHelperCallback")
util.LuaCallbackHelper.instances[util.LuaCallbackHelper.count] = cb
util.LuaCallbackHelper.count = util.LuaCallbackHelper.count+1
return cb
end
function util LuaCallbackHelper create(func)
function LuaCallbackHelperCallback(step, time, dt, luaid)
int local(bglp_vertex_descriptor p)
Definition: parallel_matrix.h:57
function func(x, y, z, t, si)

Referenced by ug::GlobalAttachments::add_attachment_serializer(), ug::node_tree::CreateOctree(), ug::CreateProcessHierarchy(), ug::node_tree::CreateSubOctrees(), ug::bridge::Evaluate::Functionality::DomainAlgebra(), ug::DomainLoadBalancer< TDomain >::DomainLoadBalancer(), ug::GridFunction< TDomain, TAlgebra >::grid_distribution_callback(), ug::Raster< T, TDIM >::load_from_asc(), NeumannBoundary(), ug::Raster< T, TDIM >::operator=(), ug::OverlyingSubsetFinder< TDomain >::OverlyingSubsetFinder(), ug::bridge::RegisterGridBridge_Misc(), and ug::bridge::RegisterRaster().

◆ LuaCallbackHelperCallback()

function LuaCallbackHelperCallback ( step  ,
time  ,
dt  ,
luaid   
)

location: /home/runner/work/docs/docs/ug4/ugcore/scripts/util / lua_callback_util.lua :8-18

function LuaCallbackHelperCallback(step, time, dt, luaid)
local cb = util.LuaCallbackHelper.instances[luaid]
if cb.callback ~= nil then
u = cb.CPPCallback:get_current_solution()
local res = cb.callback(u, step, time, dt)
if type(res) == "boolean" and res == false then
return 0
end
end
return 1
end
if(!(yy_init))
Definition: lexer.cpp:997