Time dependent boundary conditions

27 views
Skip to first unread message

Kyle Schwiebert

unread,
Oct 1, 2021, 4:09:23 PM10/1/21
to deal.II User Group
I am having trouble understanding the class FunctionTime, under what circumstances it is need, and how it is implemented.

Consider Step-26 in the tutorial. There is no variable anywhere defined with class FunctionTime. However, the function get_time() is still used, seemingly to get the current value of the time variable. However, when I do similarly, it seems the the variable created in my BoundaryValues function is always zero. I am using the line:

const double time = this->get_time();

This is not surprising to me: If we don't have a class FunctionTime time variable, I would expect get_time to either error or output zero. However, while in my function, get_time() always returns zero, in apparently does not do so in step-26. Can someone help me understand this?

Thank you,
Kyle

Daniel Arndt

unread,
Oct 1, 2021, 6:10:57 PM10/1/21
to dea...@googlegroups.com
Kyle,

Function is derived from FunctionTime which implements get_time()/set_time(). In particular, step-26 uses get_time() to access a previously stored time via set_time().

Best,
Daniel

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/89092349-4116-4d90-93b5-3d40ac10145bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages