On 08/16/2016 09:34 AM, Spencer Patty wrote:

Supposing velocity_block represents the block number associated to the
velocity components, I noticed that solution.block{velocity_block} would be a
TrilinosWrapper::MPI::Vector of the velocity as desired and it is possible to
extract the sub FiniteElement fe_system.base_element{velocity_block}
corresponding only to the velocity, but the dof_handler has no such existing
capability and if I pass it as is with the extracted FiniteElement into an
FEValues, an assertion is triggered when we call fe_values.reinit(cell) saying
that the given finite element does not match the dofhandler's finite
element...

Correct -- there is no way to subset a DoFHandler by vector components. That's because a FESystem is really stored as a collection of simpler elements, whereas a DoFHandler is not.


My question is this:  What would be a best approach to dealing with this?  Is
there currently a way to extract a "diagonal block" from the system and reduce
the solution, fesystem and dofhandler to only represent that part?  Do I need
to create a new FESystem, DoFHandler and vector to provide the functionality I
need ?

The first two yes. If you do it right, i.e., ensure that the velocity DoFHandler numbers degrees of freedom in the same order as the system DoFHandler does, then you won't need a separate solution vector -- you can just use a block of your block vector.

The alternative -- and I think that is what Bruno was suggesting in his first email -- is to keep the one system DoFHandler and vector. In addition to those, you would then have to pass something to all consumers of the velocity field that identifies which components of the FESystem and of the block vector they need to know about.

Cheers
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to