On Thu, Aug 18, 2016 at 2:58 AM, <li....@siat.ac.cn> wrote: > > Dear developers, > > I want to get the hessian on a mesh point. > I find that there is a function point_hessian in fem_context.C. > How can I get a FEMContext object? I don't have "context" in my code. > FEMContext &c = libmesh_cast_ref<FEMContext&>(context); >
You have to be using the FEMSystem stuff for FEMContexts to be available. See examples/fem_system. In a "traditional" libmesh code, second derivatives of shape functions are available by calling FE::get_d2phi(). From that you can reconstruct the Hessian of your finite element solution at every quadrature point. Another question: > > Is the output file (for example, tecplot) for solutions obtained using 2nd > order type elements more accurate than that using 1st order type elements? > Are those values of mid-points on sides used to display the solution in > tecplot? Otherwise, it would be too course to show the result. > There appears to be one type of geometric element per spatial dimension (lineseg, quadrilateral, brick) written to Tecplot files. For higher-order elements, e.g. Hex27's, we write the quadratic nodal solution on 8 child elements (see Hex27::connectivity(), TECPLOT case). See tecplot_io.C for more details. -- John ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users