Hello,

I am working on a code in which a DMSTAG object is used to solve a fluid
flow problem and I need to gather this flow data on a single process to
interact with an existing (serial) library at each timestep of my
simulation. After looking around the solution I've tried is:

-use DMStagVecSplitToDMDA to extract vectors of each component of the flow
-use DMDACreateNaturalVector and DMDAGlobalToNatural to get the components
naturally ordered
-use VecScatterCreateToZero to set up and then do the scatter to gather on
the single process

Unless I'm misunderstanding something this method results in a lot of
memory allocation/freeing happening at each step of the evolution and I was
wondering if there is a way to directly perform such a scatter from the
DMSTAG object without splitting as I'm doing here.

Any advice would be much appreciated!

Best,
Colton Bryant

Reply via email to