initial velocity

60 views
Skip to first unread message

Nikki Holtzer

unread,
May 17, 2021, 2:31:20 PM5/17/21
to deal.II User Group
Hello all,

This code just solves the wave equation. Despite the fact that I have provided an initial velocity in line 106, it does not appear to be reading it in lines 1024-1062. My solution looks like the wave equation with 0 initial velocity, i.e. one hump turns into two moving away from each other. How can I ensure it is properly reading in the initial velocity I have provided?

Thank you 
waveeq_MMS.cc

Marc Fehling

unread,
May 17, 2021, 3:17:36 PM5/17/21
to deal.II User Group
Hello,

you provided the `initial_values` and `initial_velocity` functions as lambda functions in your `Coefficients` class. You create an object of this class in the main function and then store a `SmartPointer` to it in an `OfflineData` object, which in turn is stored as a `SmartPointer` in a `TimeStep` object. You convert these lambda functions to the `dealii::Function` class with a helper function in "helper.h" (I assume). And for convenience you create references to these lambda functions over this chain of pointers. There seem to be plenty of possible sources for errors considering in all these interconnections.

Can you verify that your references in lines 1029-1030 are actually valid?

Best,
Marc

Wells, David

unread,
Jun 1, 2021, 11:24:26 AM6/1/21
to dea...@googlegroups.com
Hi there,

It looks like you have a simple copy-paste error: you define lambda2 but call lambda in line 1058. lambda2 is unused.

Best,
David

From: dea...@googlegroups.com <dea...@googlegroups.com> on behalf of Nikki Holtzer <nhol...@math.arizona.edu>
Sent: Monday, May 17, 2021 2:31 PM
To: deal.II User Group <dea...@googlegroups.com>
Subject: [deal.II] initial velocity
 
Hello all,

This code just solves the wave equation. Despite the fact that I have provided an initial velocity in line 106, it does not appear to be reading it in lines 1024-1062. My solution looks like the wave equation with 0 initial velocity, i.e. one hump turns into two moving away from each other. How can I ensure it is properly reading in the initial velocity I have provided?

Thank you 

--
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/e8535ad1-030c-4aea-b28d-bea7d83bf4dbn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages