"iwaddington ." <[email protected]> writes: > Hi everybody, I am trying to set the coordinates of a non-uniform > dm, and to do > so I found the function DMSetCoordinates(DM dm, Vec c), but the > problem is I didn't > > find in the website manual any example of how to use it, so I don't > know how to set > the vector "c" in the function prototype, I mean, is this a common > vector, or one > declared with DMCreateGlobalVector (which doesn't make much sense but > I don't know > > for sure ) ?
DMGetCoordinateDM(dm,&cdm);
DMCreateGlobalVector(cdm,&coords);
// fill in the coordinates {x0,y0,x1,y1,...}
DMSetCoordinates(dm,coords);
VecDestroy(&coords); // assuming your code no longer needs this Vec
pgpTYpIK9XxWh.pgp
Description: PGP signature
