I've found one way to do this, but I imagine it's not optimal:

   - call DoFRenumbering::component_wise(fesys_dofh)
   - Do the finite element solve
   - then copy from one vector to another using the number of dofs in that 
   component and an offset
   - This isn't great, however, because I'd rather store the fesys dofh 
   cell-by-cell for memory-friendliness, as almost all other operations are 
   elemental

If there's a better way, I'd be glad to know :)

Best,
Corbin 

On Wednesday, June 16, 2021 at 11:21:56 PM UTC-4 Corbin Foucart wrote:

> Hi everyone,
>
> This might be a simple question, but I haven't found a straightforward 
> answer in the "handling vector-valued problems" documentation.
>
> If I have a Vector<double> which stores the solution to an FESystem, say 3 
> FE_DGQ fields for u, v, p, and I want to extract a new Vector<double> which 
> corresponds to only the pressure, what's the best way to do this?
>
> I'm not looking to write the data out for visualization, how to use the 
> DataComponentInterpretation classes is clear to me. What I want to do is 
> extract a separate Vector<double> which I can then add to another DG scalar 
> field of the same type as p in the (u,v,p) system.
>
> I don't need p at the quadrature points, only the nodal values to add to 
> another nodal field.
>
> Any advice would be appreciated!
> Corbin
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/2bb1442a-830e-46a2-8639-8eec8b101e15n%40googlegroups.com.

Reply via email to