[petsc-users] Make a distributed vector with petsc4py

Matthew Knepley knepley at gmail.com
Thu Jul 16 19:25:50 CDT 2015


On Thu, Jul 16, 2015 at 6:59 PM, Matthew Kury <kury.matthew at gmail.com>
wrote:

> Hello, thank you in advance for any help you can provide. This question is
> a bit elementary but the lack of documentation for petsc4py makes some
> tasks rather hard.
>
> I am trying to do some parallel vector calculations and assembly on an
> unstructured mesh. I build a DMplex using DMPlex.createFromCellList.
> However, once I reach this point I am unable to figure out how to properly
> form any form of a vector that could be used in parallel computations.
>
> The closest I have come was, creating a section using DMPlex.createSection
> and then using DMPlex.createLocalVector and DMPlex.createGlobalVector,
> however what this did was give be a local vector the size of the total
> expected DOF, and a global vector the twice the size of the expected DOF.
>

1) You can view the section using PetscSectionView(section,
PETSC_VIEWER_STDOUT_WORLD), Without that, I have no idea what you did.

2) Have you looked at some of the finite element examples, like SNES ex12?

3) Can you try something very small, such as the default 3x3 mesh with 8
cells? That way everything can be printed out and gone over explicitly.

  Thanks,

     Matt


> I appreciate all the help,
>
> Matthew W. Kury
> Ph.D. Candidate
> CMRL UC Berkeley
> M.S. Mechanical Engineering UC Berkeley, 2014
>
>
>
>
>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150716/548f20ab/attachment.html>


More information about the petsc-users mailing list