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?

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.

Regards,

H



El mié, 4 ago 2021 a las 16:12, Wolfgang Bangerth (<bange...@colostate.edu>)
escribió:

> On 8/4/21 7:49 AM, Hermes Sampedro wrote:
> >
> > I am working with step-29 and I was wondering what is the best way to
> import
> > the solution vectors (real, imaginary and intensity solutions) into
> Matlab. Is
> > it possible to export one point of the solution into a txt file? Or what
> would
> > be the easiest way using Dealii for that?
>
> It depends on what you actually want to do with it. I believe that Matlab
> can
> read VTK or VTU files, but these are tailored towards visualization. If
> you
> want the solution at a small number of individual points, you can evaluate
> it
> with VectorTools::point_value() and then output these values by hand.
>
> Best
>   W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth          email:                 bange...@colostate.edu
>                             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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/CoL0PqpZ5v8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/2596a4f4-4a43-4276-43d1-bf3d36fb3d98%40colostate.edu
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAB%3DnHhb_3Twk3XEe_UG7djCZrt-a%2B4iT-dAVdU_kFqRC7KSRSA%40mail.gmail.com.

Reply via email to