Natalie,
> Well I don't plot solution(index) at the point with index "index". I
> plot the entire solution vector
> against the entire geometry vector. Writing out the grid data by
>
> 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;
>
> }
> }
>
>
>
> the grid indices are not ordered by size, but they match exact with the
> solution. Reshaping one of the vectors is not necessary. Just luck?
Yes :-) By default, DoFHandler::distribute_dofs enumerates degrees of freedom
in the same order as you walk the vertices above, at least if your element is
scalar. But this order is different if the element is not scalar, and you can
also renumber degrees of freedom using the members of namespace
DoFRenumbering to destroy this lucky coincidence. I believe that this is what
happens when you renumber your degrees of freedom by component -- but then
something has to give anyway, you've got 2N degrees of freedom and only N
vertices.
> Okay - so I have to modify the output.
Yes, if you insist on using matlab I'm afraid you'll have to :-(
W.
-------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.tamu.edu/~bangerth/
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii