Thank you for the suggestions. I updated the code as you mentioned. I do not fully understand what you mentioned about that I am not writing into the f_output stream.

In the code snippet you showed, you are always writing to "solution.h5", not to the f_output stream.


Is data_out.write_hdf5_parallel() not writing the data? However, I still have the error when running more than 1 MPI rank. If it is a bug I can not do much about it.

It is meant to do exactly that, and we use it all the time. Just not for the corner case of a process that has no cells. But you can use any number of other formats to output your solutions. In parallel, we generally use the VTU file format. Take a look at any of the parallel programs, starting with step-40, step-32, etc, and see how they create output.


I tried also to save the local_relevant_solution vector into a FullMatrix that stores each dof and frequency and then print it in the end, but the data is wrong also for more than 1 MPI rank:


for(int freq_iter=0 ...  ) ///solver loop, /
{
// solve...
testvec.operator=(locally_relevant_solution); // testvec is a vector of size 
dof.

for ( int j= 0; j < dof_handler.n_dofs(); ++j)
testsol(freq_iter, j)+=testvec(j); // testsol is a FullMatrix of size number_frequencies x dof

}
if(Utilities::MPI::this_mpi_process (mpi_communicator)==0){
testsol.print_formatted(mydomain,12,true,0,"0"); // my domain is ofstream


Is there anything wrong in this approach of exporting the results?

I don't know what "the data is wrong" means, but this process could in principle work. Except you end up with just vectors without knowing the physical location at which each degree of freedom is located. You don't know how to visualize these vectors any more if you don't also output node data. This is of course exactly what DataOut is there for.

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/4a809714-ae8e-f333-ab7b-d4936cf3d3ad%40colostate.edu.

Reply via email to