[petsc-users] DMCompositeSetCoupling -- simple example?
Jed Brown
jed at jedbrown.org
Mon Oct 28 22:18:56 CDT 2019
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" <petsc-users at mcs.anl.gov> writes:
> 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 need DMCompositeSetCoupling, but there are no examples on how to
> use it, or even what the parameters of the provided function mean. Does
> anyone have a simple example to share? Doesn't have to be full code, a
> snippet would be just fine.
>
> Thanks,
> Ellen Price
More information about the petsc-users
mailing list