0
$\begingroup$

I am trying to do something fairly simple somehow I have made it hard. Is there an example of how to send a 3D array to a binary file?

$\endgroup$
  • $\begingroup$ Is your "3D array" actually a distributed Vec based on a DMDA? If so, you should use VecView like Geoff says. $\endgroup$ – Jed Brown Aug 25 '14 at 19:49
2
$\begingroup$

It depends on the object representation of your 3D array. If it's a PETSc Mat, you want to look at MatView; if it's a Vec, you want to look at VecView. The links are to PETSc documentation, and each of the links has a list of relevant examples. They may not be exactly what you're looking for, but they should be close; in general, you're looking for something like a "View" type command. If these suggestions don't help, I suggest e-mailing the PETSc user list.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.