[petsc-dev] How to get block size into a DM
Matthew Knepley
knepley at gmail.com
Mon Sep 5 06:27:22 CDT 2016
On Mon, Sep 5, 2016 at 3:57 AM, Mark Adams <mfadams at lbl.gov> wrote:
>
> On Sun, Sep 4, 2016 at 8:35 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
>> 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
>
>>
> My pull request for snes/ex56 has:
>
> ierr = VecNorm(xx,NORM_INFINITY,&mdisp[iter]);CHKERRQ(ierr);
>
> When I tried to use VecStrideNorm I got the error that block size was not
> set. You can't set it manually so I was stuck (not a big deal, but there is
> either a bug in Plex or a bug in the way that I am using it).
>
> Thanks,
>
>
>>
>> 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
>>
>
>
--
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/20160905/24e9beeb/attachment.html>
More information about the petsc-dev
mailing list