Vector field ordering question
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? Best Regards, Jerry
On Thu, Oct 6, 2022 at 6:47 AM Gong Yujie <[email protected]> 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/>
participants (2)
-
Gong Yujie -
Matthew Knepley