Dear Rajat,

You could do finite differences using the p4est wrapper in deal.II in
principle, but it would probably not be very efficient. You want to know
the indices which are not available in our wrapper at least, not sure
about p4est. To get them, I would build a DoFHandler based on some
element. FE_Q<dim>(1) would be the natural choice. Then you would need
to sort degrees of freedom in lexicographic way, which you can do
through a call to

DoFRenumbering::downstream(dof_handler, direction, true); 

where direction is something like (1, 1e-5, 1e-10). I'm not sure if we
ever tested this in parallel, but there is definitely a way for doing it.

More generally, using data structures like finite differences inside the
finite element capabilities of deal.II introduces quite some overhead
and you would lose most of the appealing features of finite differences.
Alternatively you might want to look into other, more FD-oriented
applications building on top of p4est, for example ForestClaw,
http://math.boisestate.edu/~calhoun/ForestClaw/

Best,
Martin


On 09/28/2016 06:30 AM, RAJAT ARORA wrote:
> Hello all,
>
> I am curious to know if it is feasible to use the P4est mesh structure
> with deal.ii to do a finite difference simulation.
>
> For a 2D structured grid, in order to do  finite differences, we need
> to know the index (or dof index) of vertices to the left as well  as
> to the right of a given grid point.
>
> Is there any function that can tell me the vertex index / dof index of
> the grid points which are just left and right to a chosen point. 
>
> Thanks.
> -- 
> 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
> <mailto:dealii+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

-- 
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