[petsc-users] Vector field ordering question

Matthew Knepley knepley at gmail.com
Thu Oct 6 03:22:09 CDT 2022


On Thu, Oct 6, 2022 at 6:47 AM Gong Yujie <yc17470 at connect.um.edu.mo> wrote:

> Dear development team,
>
> I'm trying to write a code to deal with a multi-field problem. Currently I
> find that the vector ordering for the field is (a1,a2,a3,b1,b2,b3), here
> assume a1,a2,a3 belongs to one field and bs for another field. *Can I get
> a point-block ordering for the unknowns as (a1,b1,a2,b2,a3,b3)?*
>
> I'm using DMPlex for the mesh management and first
> use PetscFECreateDefault to create the PetscFE object, then use this object
> with DMAddField to add the field to the DMPlex object. DMCreateGlobalVector
> is used for generating vectors. I do the discretization myself instead of
> using PetscFE or PetscFV. My PETSc version is 3.16.0. Do you have a case
> using this point-block type data structure?
>

PetscFE does point-block ordering by default. How do you decide where a
given dof goes (since you discretize yourself)?

  Thanks,

     Matt


> Best Regards,
> Jerry
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221006/33624956/attachment.html>


More information about the petsc-users mailing list