[petsc-dev] How to get block size into a DM

Matthew Knepley knepley at gmail.com
Sun Sep 4 19:35:11 CDT 2016


On Sun, Sep 4, 2016 at 7:07 PM, Mark Adams <mfadams at lbl.gov> wrote:

> On Sat, Sep 3, 2016 at 11:05 PM, Matthew Knepley <knepley at gmail.com>
> wrote:
>
>> On Sat, Sep 3, 2016 at 11:12 AM, Mark Adams <mfadams at lbl.gov> wrote:
>>
>>> The DM in snes/ex56 does elasticity but the block size does not get into
>>> vectors. It does something like this:
>>>
>>> PetscFECreateDefault(dm, dim, dim, PETSC_FALSE, NULL, 3,
>>> &fe);CHKERRQ(ierr); /* elasticity */
>>> DMGetDS(dm, &prob);CHKERRQ(ierr);
>>> PetscDSSetDiscretization(prob, 0, (PetscObject) fe);CHKERRQ(ierr);
>>> DMCreateGlobalVector(dm,&xx);
>>>
>>> The block size of xx is not 3. (dim==3). It is not clear to me how to
>>> make this work.
>>>
>>
>> The DM determines the block size based on the Section. There could be a
>> bug,
>>
>
> I suspect that I just found a hole in the combinatorics (finite!) that is
> Plex. I use -mat_block_size 3, so I could see how Plex might not pick it up.
>

Perhaps. Give me the branch and exact command line to run.

  Matt


> All I do is call DMCreateMatrix(dm, &Amat);
>
> And Amat get its w/o and explicit setfromoptions.
>
> but first did you apply
>> a BC that would wreck the block size? Namely did you constrain just one
>> or two unknowns at a point?
>>
>
> No
>
>
>>
>>   Matt
>>
>>
>>> snes/ex56 does use -mat_block_size 3.
>>>
>>> Mark
>>>
>> --
>> 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
>>
>
>


-- 
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-dev/attachments/20160904/d62e76de/attachment.html>


More information about the petsc-dev mailing list