Hi, after some tinkering - and considering the example/tutorial step-23, where the same project method was supposed to be used - I think I found a solution. The only difference to my code was that my output_results method, where the project() function was called, was declared as a *const* function. Removing that keyword removed the linking error. So in the class definition in the above mwe.cc, one changes the declaration from void output_results(const unsigned int cycle) const; to void output_results(const unsigned int cycle);
and identical replacements for the definition. I guess one could have concluded that by thinking harder about what that const was doing there. Anyway, thanks for the help and keep up the great work! Kev On Thursday, October 27, 2022 at 10:35:52 AM UTC+2 Kev Se wrote: > Dear Wolfgang, > > thank you for your swift reply! I am using Version 9.4.0, compiled from > source just last week - I checked the github as well but it seems like > there is no newer version available. > > I've tried to make a minimal working example and will attach it. The code > now doesn't do anything expect for defining the class Delta_of_x that > inherits from Function, and its value() function, and then tries to > project said function into an FE vector of nodal values that I want to save > to disk. The current profile Delta(x) is in real, so I tried to change all > datatypes to double but it didn't seem to help with the linking error (and > I would want complex values for my actual problem, eventually). I'm > starting to suspect that I'm doing something wrong with the project > function, but I don't understand what if so. Either way, please find the > .cc and a makefile attached. I started from one of the examples at some > point so there is probably some unnecessary includes and similar things > left that I forgot to remove, I hope the problem is still understandable. > > Thank you for your help, best > Kev > > On Thursday, October 27, 2022 at 12:01:28 AM UTC+2 Wolfgang Bangerth wrote: > >> On 10/26/22 12:57, Kev Se wrote: >> > >> > I've recently swapped from another FEM package to deal.ii and love it >> so >> > far. I recently managed so far to get a correct solution out for my >> > complex-valued, nonlinear PDE. So that's good! What I am a bit confused >> > about is the following: How do I use the VectorTools::project() type of >> > function for a general, complex-valued function? >> > >> >> Kev: It looks like the function you're trying to call is implemented but >> not instantiated for complex arguments. This wouldn't be the first >> function for which this is the case. Can you come up with as small a >> testcase that illustrates the problem? The program doesn't have to do >> anything useful other than showing that you can't link. >> >> Separately, though: Have you made sure that you are working with the >> latest version of deal.II? This may (or may not) be a bug that is >> already fixed. >> >> Best >> W. >> >> -- >> ------------------------------------------------------------------------ >> Wolfgang Bangerth email: [email protected] >> www: http://www.math.colostate.edu/~bangerth/ >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/674b54f4-78b8-4381-adb8-d2f15891db95n%40googlegroups.com.
