[petsc-users] fem mesh generation
Jed Brown
jedbrown at mcs.anl.gov
Sun Nov 20 07:48:14 CST 2011
On Sun, Nov 20, 2011 at 07:00, Hui Zhang <mike.hui.zhang at hotmail.com> wrote:
> Doest petsc has built-in *cartesian* mesh generator for finite elements?
> What I want is: inputs the size of a domain, outputs the geometric
> coordinates
> like (0.1, 0.2, 0.3) for each nodes, volume elements like (1,2,...,8),
> face elements like (1,2,...,4).
>
You can use DMDA and then loop over the local part of the domain however
you like. See DMDASetUniformCoordinates() and also finite element examples
like src/snes/examples/tutorials/ex48.c or
src/ksp/ksp/examples/tutorials/ex43.c or ex42.c. The function
DMDAGetElements() exists, but I think it is of limited utility.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111120/37041c1d/attachment.htm>
More information about the petsc-users
mailing list