-- Dipl.-Math. Henrik Büsing Institute for Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University ------------------------------------------------------ Mathieustr. 10 | Tel +49 (0)241 80 49907 52074 Aachen, Germany | Fax +49 (0)241 80 49889 ------------------------------------------------------ http://www.eonerc.rwth-aachen.de/GGE hbuesing@eonerc.rwth-aachen.de ------------------------------------------------------ Von: firedrake-bounces@imperial.ac.uk [mailto:firedrake-bounces@imperial.ac.uk] Im Auftrag von Andrew McRae Gesendet: 22 September 2015 20:42 An: firedrake@imperial.ac.uk Betreff: Re: [firedrake] Cell center on extruded mesh For the distances between cell centres, yes. It feels like you're performing some operations that aren't particularly finite element-y? Would you be using the approximate gradient in a variational form immediately, or are there further calculations you want to carry out? In the former case, I think there's a nice FE way to get what you want. [Buesing, Henrik] @Andrew: So, what would be the FE way of doing this? Henrik In the latter case, we can probably hack something up if we're smart enough... On 22 September 2015 at 18:42, Buesing, Henrik <HBuesing@eonerc.rwth-aachen.de<mailto:HBuesing@eonerc.rwth-aachen.de>> wrote: ________________________________ Von: firedrake-bounces@imperial.ac.uk<mailto:firedrake-bounces@imperial.ac.uk> [firedrake-bounces@imperial.ac.uk<mailto:firedrake-bounces@imperial.ac.uk>]" im Auftrag von "Andrew McRae [A.T.T.McRae@bath.ac.uk<mailto:A.T.T.McRae@bath.ac.uk>] Gesendet: Dienstag, 22. September 2015 18:59 An: firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk> Betreff: Re: [firedrake] Cell center on extruded mesh
Can you say a bit more about how you plan to use this? I wonder to what end you would like these values? I would like to approximate \grad(pw) on a DG0 Function space by (p('+') - p('-'))/|x('+')-x('-')|, where x are the cell centers. On a hexahedral mesh this should just give \Delta x, \Delta y, \Delta z, right?
Henrik On 22 September 2015 at 17:52, Buesing, Henrik <HBuesing@eonerc.rwth-aachen.de<mailto:HBuesing@eonerc.rwth-aachen.de>> wrote: Dear Firedrakers, on an extruded mesh: meshbase = RectangleMesh(Nx, Ny, Lx, Ly, quadrilateral=True) mesh = ExtrudedMesh(meshbase, Nz, Delta_z) horiz_elt = FiniteElement("DG", quadrilateral, 0) vert_elt = FiniteElement("DG", interval, 0) elt = OuterProductElement(horiz_elt, vert_elt) How can I access the element center and the center of the element faces? Thank you! Henrik -- Dipl.-Math. Henrik Büsing Applied Geophysics and Geothermal Energy E.ON Energy Research Center RWTH Aachen University ----------------------------------------------- Mathieustr. 10 | Tel +49 (0)241 80 49907<tel:%2B49%20%280%29241%2080%2049907> 52074 Aachen, Germany | Fax +49 (0)241 80 49889<tel:%2B49%20%280%29241%2080%2049889> ----------------------------------------------- http://www.eonerc.rwth-aachen.de/GGE hbuesing@eonerc.rwth-aachen.de<mailto:hbuesing@eonerc.rwth-aachen.de> -----------------------------------------------