On Tue, Aug 22, 2017 at 3:31 PM, James Strother <james.a.strot...@gmail.com>
wrote:

>
> Thanks a lot for your help.
>
> It looks like point_value uses "current_local_solution" rather than
> "solution," so initially every function returned zero. But once I changed
> "solution->set()" to "current_local_solution->set()" everything seems to
> work fine. I'm not really sure what the difference is, so I'm hoping that
> is a reasonable thing to do.
>

Understanding the difference requires understanding the difference between
"parallel" (sys.solution) and "ghosted" (sys.current_local_solution)
vectors. Basically, ghosted vectors store extra values so that operations
like finite element assembly can be done without communication. The main
workflow is to set values in sys.solution and then call sys.update() to
have the ghost values communicated automatically for you.



>
>
>> How would I set the type of the
>>> vector, for example a vector?
>>
>>
>> Not sure what this question is asking...
>>
>
> I was wondering how I should deal with vector-valued variables? Should I
> just allocate a new variable for every component of the vector, or would it
> be better to handle this in another way?
>

Yes, adding two (or three) Lagrange variables is the usual way to handle
vector-valued quantities. Once you have more than one variable, you will
need to use the DofMap to figure out which degree of freedom indices are
associated with each node and variable before setting the values. Almost
all of the libmesh examples have some demonstrations of DofMap usage.



>
>
>
>> System::point_value() is not deprecated as far as I know, and even if it
>> was, it should not produce an error message unless you are also using it
>> incorrectly. What did you try to call, exactly?
>>
>
> The warning that I receive is:
>
> *** Warning, This code is deprecated, and likely to be removed in future
> library versions! ./include/libmesh/mesh_tools.h, line 70, compiled Aug
> 19 2017 at 14:03:27 ***
>
> From what I can tell point_value() isn't marked deprecated, but it invokes
> a deprecated form of the BoundaryBox constructor. I suppose I'll just
> ignore it.
>

Hmm... if you are up-to-date with your version of libmesh, this means we
have missed a deprecated BoundaryBox constructor call somewhere, most
likely in the PointLocator class.

-- 
John
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to