Re: [petsc-users] DMCompositeSetCoupling -- simple example?

2019-10-28 Thread Jed Brown via petsc-users
Its purpose is to preallocate off-diagonal blocks, but unless you're hard up against your memory capacity, I would skip that clumsy code and use MatPreallocator. "Ellen M. Price via petsc-users" writes: > Hello again! > > For my multiphysics problem, I think a DMComposite might make the most > s

[petsc-users] DMCompositeSetCoupling -- simple example?

2019-10-28 Thread Ellen M. Price via petsc-users
Hello again! For my multiphysics problem, I think a DMComposite might make the most sense, since some variables are only defined in 1d (so any 2d information is just wasting memory and CPU), while others have a full 2d distribution. To tell PETSc how the two DMs should be coupled, it looks like I

Re: [petsc-users] R: AMG Variable block preconditioner

2019-10-28 Thread Jed Brown via petsc-users
Smoothed aggregation mostly just cares about the near-null space (MatSetNearNullSpace), which is a global property. Classical AMG uses block size directly (number of dofs per C-point), but I'm not aware of any implementation that supports variable block size. This would be a research topic. Marc

Re: [petsc-users] R: AMG Variable block preconditioner

2019-10-28 Thread Matthew Knepley via petsc-users
On Mon, Oct 28, 2019 at 12:37 PM Marco Cisternino via petsc-users < petsc-users@mcs.anl.gov> wrote: > Hi Stefano, > thanks for your interest. > Mainly, elliptic operators both in the context of methods in NS solvers > and in the context of mesh deformation. > I didn't think about AMG on each block

[petsc-users] R: AMG Variable block preconditioner

2019-10-28 Thread Marco Cisternino via petsc-users
Hi Stefano, thanks for your interest. Mainly, elliptic operators both in the context of methods in NS solvers and in the context of mesh deformation. I didn't think about AMG on each block. What I was thinking about is an AMG preconditioner aware about the variable size blocks. I hope it is clear

[petsc-users] AMG Variable block preconditioner

2019-10-28 Thread Marco Cisternino via petsc-users
Hello everybody. We would like to setup an algebraic multi-grid block preconditioner and I would like to be able to define custom blocks of variable sizes. Reading the documentation, it seems that this can be achieved using the "PCGAMG" preconditioner and defining the blocks with the function "