[petsc-users] Question about DMDA BOUNDARY_CONDITION set

Wenbo Zhao zhaowenbo.npic at gmail.com
Tue Mar 21 08:46:07 CDT 2017


Matt,

Thanks.

I want to solve neutron diffusion equations using finite difference method
and PETSc.
This rotation boundary condition is very common in my cases.
Though the mesh consists of  ~ 10 Miliion structured hexahedron cells, the
mesh is simple and could be discribed by three vectors about x, y and z
axis.
It is appropriate for DMDA except boundary condition.

I wanted to make mesh partition like DMDA by hand. Then I need to create
matrix and vector and assemble matrix, and et al. I thought it was an easy
work.
As you say, it's not.

As a newer, I can use DACreate2d to begin. It's OK.
But finally, it does need this optimization.

Though I read the manual about the vector and matrix, I am not clear about
the basic idea behind the code.
How can I create a matrix and vector as my mesh partition and create the
map between the nature ordering and the PETSc ordering in global vector?
How does vector communicate in the operation of matrix multi vector? Does
it achieved automatically?

BETS,

Wenbo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170321/1ab0eaeb/attachment.html>


More information about the petsc-users mailing list