# Re: [deal.II] Extracting Shape Laplacian

On 08/09/2017 03:46 PM, ky...@math.uh.edu wrote:


Hello all,


I am working on implementing some stabilization methods for the Navier-Stokes equations, these techniques often require the use of the laplacian of the shape functions. I know I get the hessian of the k'th shape function at quadratue point q via the following

|
Tensor<3,dim>hessian_phi =fe_values[velocity_extractor].hessian(k,q);
|


My question is understanding what does this return, and how to extract the laplacian from it. Does hessian_phi[ i ][ j ][ k ] = \frac{ \partial \varphi_{ i } } { \partial x_{ j } \partial x_{ k } }?


I don't recall, but it should be documented somewhere with FEValuesViews::Vector IIRC.



If this is the case, is there a way to contract over the last two components to result in a rank 1 tensor that is the laplacian?


Not as you are trying, but you can easily write the summation over the last two indices by hand, of course.



I've also seen that I can use shape_hessian_component since I am using standard Q2-Q1 elements,

|
intcomponent_i =fe.system_to_component(k ).first;
Tensor<2,dim>hessian_phi =fe_values.shape_hessian_component(k,q,component_i );
|


In this case I can get the laplacian of the i'th component of the k'th shape function at quadrature point q by trace( hessian_phi ). But this will result in a rank 0 tensor.

Yes, it is the trace of the i'th component. You can then construct a
Tensor<1,dim> traces;
for (i=0...dim)
{
traces_phi = fe_values.shape_hessian_component (...);
traces[i] = trace(hessian_phi)
}

Best
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

To unsubscribe from this group and stop receiving emails from it, send an email