BTW, Could you please teach me some easy way of replacing in PETSc source code the following:
'something>comm' by '((PetscObject)something)->comm'
I never found the time to learn regular expresions and 'sed' :-(.
Try something like the following:
sed -e 's/\(\w*\)\(\s*->\s*comm\)/((PetscObject)\1)\2/g'
here \w* should match any number of alfanumerics + underscores
\s* matches any number of blanksin the second part of s/part1/part2/, the \1 substitutes the bit in part1 between the first pair of \( .. \) and \2 substitutes the second pair.
Cheers Stephan