Gideon Simpson <[email protected]> writes: > I'll try that, but I'm still a bit confused over the relationship > between DMDA and Vec objects.
A DM describes a layout with richer semantic information than a Vec. It's like a "function space". Vec holds an element of that function space. Normal (non-DM) Vec operations (like norms and dot products) interpret the Vec in Euclidean space, while the DM functions can endow more function space structure, provide semantically-meaningful indexing, etc. > Supposing I called DMDACreate1d with M as my global dimension and dof > as the number of degrees of freedom. So this is really managing M * > dof scalars. When I call DMCreateGlobalVector, isn't that associated > with an M * dof size vector? I really just want to clone a vector of > size M, but with the same partitioning. In that case, either create a DMDA with dof=1 or use VecSetSizes to match the local sizes (divided by dof as appropriate) obtained from the DMDA.
pgpHoKdPjomXT.pgp
Description: PGP signature
