[petsc-users] [petsc-maint] Question about DMDA BOUNDARY_CONDITION set
Barry Smith
bsmith at mcs.anl.gov
Tue Mar 21 14:45:32 CDT 2017
I can cook up a simple example that communicates the needed ghost values for your boundary conditions. It may take a day or two.
Are you using a five point stencil or a nine point stencil (the nine point stencil seems "weird" for that very corner point)?
Barry
> On Mar 21, 2017, at 8:46 AM, Wenbo Zhao <zhaowenbo.npic at gmail.com> wrote:
>
> 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
>
>
>
>
>
More information about the petsc-users
mailing list