On Tue, Aug 30, 2011 at 1:57 PM, Truman Ellis <[email protected]> wrote:
> I have a question about FEMSystem::init_context and inherited instances like
> NavierSystem::init_context from example 18. Why is it necessary to call
> get_JxW(), get_phi(), etc? In FEMSystem::assembly() this is only called once
> before we have actually started looping over any elements. Furthermore, all
> of the get_* functions are actually called again in the appropriate
> *_time_derivative, and *_constraint functions. I believe they are
> appropriate in this latter case because a specific element has been
> specified at this point. I tried commenting out this block of code in ex18,
> and it doesn't appear to break anything. Can anyone explain if and what the
> purpose of this code is?

This tells the FE object that we will need the JxW, phi, etc values
eventually, and that it should compute them.

Here's the get_phi() implementation.  Note that it sets the calculate_phi flag.

  const std::vector<std::vector<Real> >& get_phi() const
  { libmesh_assert(!calculations_started || calculate_phi);
    calculate_phi = true; return phi; }

-- 
John

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Libmesh-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to