Hi all,
I'm using a source term in the momentum equations which is proportional to the spatial average of a GfsVariable.
To this end I did something along the lines of
Source U {
MyData data;
data.ave = 0.0;
gfs_domain_cell_traverse (.....(FttCellTraverseFunc) add_it, &data);
return data.ave*U;
}
where add_it() is defined globally along with MyData.
This is running exceedingly slowly. I think I've figured out that this is because the GfsFunction in Source is called once for each cell, so I'm actually traversing the tree and re-computing the average ~N^3 (3D) times at each fixed time-step.
How can I do this so I only traverse the tree once per call to RHS? I also have similar source terms on V and W so optimally I would compute all three averages in the same traverse.
Thanks,
Kristjan
------------------------------------------------------------------------------
_______________________________________________
Gfs-users mailing list
Gfs-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gfs-users
--
You received this message because you are subscribed to the Google Groups "gerris-users" group.
To post to this group, send an email to
gerris...@googlegroups.com.
To unsubscribe from this group, send email to
gerris-users...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gerris-users?hl=en-GB.