On 8/5/21 6:18 AM, Hermes Sampedro wrote:
Thank you very much for your answer. Is it then not possible to use somehow the DataOut approach presented in step-29 and use a 'txt' parameter in the .prm file?

That's the wrong question. VTK and VTU files are text files, you can open them with an editor. The question is not whether it's a text file or a binary file, but what's in it. As I mentioned, the right question is what you want to do with the information in the file, and depending on that, you choose a file format.

In case of doing that manually as you suggested, how could I access the real and imaginary parts in the solution vector (step-29)?

Doing something like:

ofstream myfile;

myfile.open ("solution.txt");

myfile << "Point:\t" << VectorTools::point_value(dof_handler,solution,Point<2>(1./3, 1./3));

myfile.close();


I get an error when running:


dof.get_fe(0).n_components() == 1


Thank you again for the help.

You are solving a problem that has more than one component -- the real and imaginary parts are separate components. You need to call that variation of the VectorTools::point_value() function that returns its information in the form of a Vector<double> object.

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/d0a5d186-16ae-5c33-75d5-a37467245bfa%40colostate.edu.

Reply via email to