Function objects and problem parameters

52 views
Skip to first unread message

Aiden Huffman

unread,
Oct 11, 2023, 3:44:48 PM10/11/23
to deal.II User Group
Hi everyone,

Thanks for your time, I'd love any feedback you have. I wrote a very simple reaction-diffusion problem inspired by Step-23 here:

https://github.com/aiden-huffman/reactionDiffusion-dealii/blob/main/code/main.cc 

I am trying to figure out the best way to replace the implementation in line 202 with something that returns the steady-state, in this case (a+b, b/(a+b)^2) for Q and R respectively, plus a small random number.

I was trying to create a child of the Function class but this resulted in compiler errors or what seemed like deal.II panicking. I am more happy to share what I tried. But to be honest I am not sure how to construct the right object, or even if I am thinking about it correctly. Is there a tutorial step I should go back and review? I am still new to C++, so I appreciate any advice.

Wolfgang Bangerth

unread,
Oct 11, 2023, 7:27:28 PM10/11/23
to dea...@googlegroups.com

On 10/11/23 13:44, Aiden Huffman wrote:
>
> I was trying to create a child of the Function class but this resulted
> in compiler errors or what seemed like deal.II panicking. I am more
> happy to share what I tried. But to be honest I am not sure how to
> construct the right object, or even if I am thinking about it correctly.
> Is there a tutorial step I should go back and review? I am still new to
> C++, so I appreciate any advice.

Pro tip: If you get "compiler errors or what seemed like deal.II
panicking", show us what exactly it is you did and what is happening :-)

Basically, your question is of the form "I did a thing, but it doesn't
work; can you help?" But we really can't, unless you show us what you
did and what happens when you give it to the compiler!

Best
W.

Aiden Huffman

unread,
Oct 12, 2023, 12:19:03 PM10/12/23
to deal.II User Group
Well I'll be darned, I can't recreate the error and it works now. Funny how that is. Thanks for your response regardless, sorry it turned out to be something dull.

I'll make sure to include a minimal working example next time. I figured I had just been approaching the whole thing wrong in the first place and that someone would end up directing me to a step.

Cheers,
Aiden
Reply all
Reply to author
Forward
0 new messages