Hello, DataOut is made to add data to a mesh. It cannot be used to do what you want. The easiest way to do what you want is to write the vectors to a file using print() and then do the plot using matlab or python.
Best, Bruno On Saturday, February 11, 2023 at 9:27:06 AM UTC-5 [email protected] wrote: > Hello everyone. I have 2 Vector<double> vectors A and B of the same > size,n. I want to plot A vs B (A along x and B along y). I was trying > something like this: > DataOut<1,Vector<double> > data_out; > data_out.add_data_vector (A, "A"); > data_out.add_data_vector (B, "B"); > > // Write the Gnuplot file > data_out.build_patches (); > data_out.write_gnuplot (deallog.get_file_stream()); > but it gives these errors: > error: type/value mismatch at argument 2 in template parameter list for > ‘template<int dim, int spacedim> class dealii::DataOut’ > expected a constant of type ‘int’, got ‘dealii::Vector<double>’ > > > -- 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/3a96404f-f7fc-4aa2-83e9-0f35cf8889f6n%40googlegroups.com.
