On Thu, 18 Aug 2016, John Peterson wrote:

> On Thu, Aug 18, 2016 at 2:58 AM, <li....@siat.ac.cn> wrote:
>
>> 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.

This actually hasn't been true for a while - while you can't use a
non-trivial FEMSystem without computing using the FEMContext objects
it gives you, you can build and use FEMContext objects with any other
system type.

There's also a System::point_hessian() function that's available in
all the system classes, and if you really want the hessian on *a* mesh
point then that's the way to go, but if you want the hessian on *lots
of* mesh point*s* then the point locator which the element-free
overload of System::point_hessian() uses is an unnecessarily expensive
way to do that.
---
Roy

------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to