Just create another DA with a different dof argument and then use the DMGetGlobalVector() to get an empty vector and fill it up as needed with the data[][][] style
Barry On Nov 7, 2013, at 3:35 PM, Juha Jäykkä <[email protected]> wrote: > Hi list! > > I am thinking of pre-computing and storing some values that are used often > during a single TS iteration. I thought I'd create another vector from my DA > stick those values there: that would be the cleanest solution. However, the > dof of the DA is not big enough to hold all my pre-computed values! > > Any suggestions how to do this? > > Unless I miss something obvious, here are my "requirements". I do not need > the > data across iterations. but I'd rather not realloc it every time either. The > data need no ghosts (the data are just local values of some functions of my > variables, so any ghosts needed are the ghosts of the variables). I would > value a data[][][]-style indexing for simplicity (of code). And finally, I > would value the possibility of saving these for inspection under some > circumstances in the same format as the main data (i.e. VecView). > > Cheers, > Juha > > -- > ----------------------------------------------- > | Juha Jäykkä, [email protected] | > | http://koti.kapsi.fi/~juhaj/ | > ----------------------------------------------- >
