Hi everybody!
This question may be trivial, so sorry in advance. I have, let’s say, 200 cross sections throughout the complicated structure. Sections are used to integrate and plot various outputs. I use fish operator and splitting for efficient summation, and plan to use callback. But, how can I efficiently reach local sum from the operator and use it globally with fish hist (or some other strategy) to plot it? I suppose the problem lies in the connection between local variables in operator and global variables that should be defined for plotting purposes. But how to do that efficiently for many cross sections?
Thanks!
Parts of the code are:
…
fish operator reactions(gx)
;
local reactions_total = vector(0,0,0)
local reactions_tower = vector(0,0,0)
local reactions_nave = vector(0,0,0)
local reactions_buttress = vector(0,0,0)
;
if block.gp.pos.z(gx) < 0.01 then
local reac = block.gp.force.reaction(gx)
reactions_total += reac
if block.gp.pos.x(gx) <= 10.8 & block.gp.pos.z(gx) <= 0.01 then
reactions_tower += reac
endif
if block.gp.pos.x(gx) > 10.8 & block.gp.pos.z(gx) <= 0.01 then
reactions_nave += reac
endif
if block.gp.pos.x(gx) >= 21.04 & block.gp.pos.x(gx) <= 27.85 & block.gp.pos.y(gx) >= -0.01 & block.gp.pos.y(gx) <= 4.965 & block.gp.pos.z(gx) <= 0.01 then
reactions_buttress += reac
endif
endif
end
….
; I’m dead lost here.
fish hist name … ; I need to plot histories of reactions_total or reactions_tower or reactions_nave or reactions_buttress
…
model solve time 16.35 fish-call -100 [reactions(::block.gp.list)] interval 1000
program return
fish callback add [reactions(::block.gp.list)] -100 interval 1000