Hi Wolfgang,
i simply write out the entire solution vector using print:
std::ofstream out ("Species.txt", std::ios::out|std::ios::app);
solution_species.print(out);
out << "\n";
out.close();
and the grid data doing something like
for (; cell!=endc; ++cell)
{
for (unsigned int vertex=0;
vertex<GeometryInfo<dim>::vertices_per_cell; vertex++)
if (!vertices_hit [cell->vertex_index (vertex)])
{
point = cell->vertex (vertex) ;
index = cell->vertex_index(vertex);
out << "\t " << index << "\t " << point << "\n";
vertices_hit [cell->vertex_index (vertex)] = true;
}
}
Ploting the solution over the grid data works well.
However, for the multi-component system writing out the BlockVector
solution_species
std::ofstream out ("Species.txt", std::ios::out|std::ios::app);
solution_species.block(0).print(out);
out << "\n";
out.close();
doesn't work anymore. The DoFs doesn't match with the grid data now.
Is there a simple way to associate the elements of
solution_species.block(0) with the grid points?
Thanks,
Natalie
Wolfgang Bangerth schrieb:
Natalie,
However, for my mulit-component system where the solution is a
BlockVector and the indices are renumbered component wise the
numeration scheme in each block doesn't match anymore with the grid data
and therefor I'm unable plot the components separately.
Maybe someone is able to explain this numeration scheme in the
BlockVector class to me or has other ideas for exporting the results to
matlab??
You don't say what exactly you tried and what format you need for Matlab to
understand the output. Do you want cell-wise data, or do you simply write
out the entire solution vector? In the latter case, how do you associate
elements of the vector with locations of DoFs?
Best
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.tamu.edu/~bangerth/
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii