[petsc-dev] How to get block size into a DM
Matthew Knepley
knepley at gmail.com
Sat Sep 3 22:05:30 CDT 2016
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, 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?
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20160903/dccd39af/attachment.html>
More information about the petsc-dev
mailing list