I wanted to give you some info on your original question in case your
want to still use PETSc.

> It appears that for petsc, the assumption that the locally owned dofs Index
> Sets are contiguous is really throwing a wrench in our plans for the non
> block system approach.  I have seen the other discussions where everyone
> says essentially it is not currently possible to get petsc and petsc
> wrappers to a point where it could use non contiguous locally owned index
> sets.

Yes, you need the locally owned range of indices to be contiguous.
This means, that you can split your matrices/vectors into blocks
however you want (for example by component), but they need to be
contiguous within a block.


> fe_values.get_function_values() on the velocity vector.
>     ExcIndexNotPresent (n)

get_function_values() needs to see the ghost values of your vector
(all DoFs on a cell).

> So, in this new case, what would be a good way to accomplish the desired
> result?

how about:
...
DoFRenumbering::hierarchical (dof_handler);

std::vector<unsigned int> velocity_dof_indices1;
std::vector<unsigned int> velocity_dof_indices2;

for each active cell:
  get_dof_indices(...)
  for (unsigned int i;i<n_local_dofs;}}i)
     {
       unsigned int component = fe.system_to_component_index(i).first;
       if (component<dim) // velocity
             velocity_dof_indices1.push_back(local_dof_indices[i]);
}

DoFRenumbering::component_wise(dof_handler);

for each active cell:
  get_dof_indices(...)
  for (unsigned int i;i<n_local_dofs;}}i)
     {
       unsigned int component = fe.system_to_component_index(i).first;
       if (component<dim) // velocity
             velocity_dof_indices2.push_back(local_dof_indices[i]);
}

Now you have a mapping between the two different numberings and you
can use that to convert solution vectors. Note that you probably only
want to consider locally owned DoFs and use a more efficient data
structure that actually maps between the pairs of indices directly.

-- 
Timo Heister
http://www.math.clemson.edu/~heister/

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to