[petsc-users] Obtaining constraint values in DM vector solution
Justin Chang
jchang27 at uh.edu
Tue Mar 31 17:06:45 CDT 2015
Hi all,
So in my DMPlex FEM (serial) simulations, I want to output the solution U
to a binary file. I have the following:
ierr =
PetscViewerBinaryOpen(PETSC_COMM_WORLD,"sol.dat",FILE_MODE_WRITE,&viewer);CHKERRQ(ierr);
ierr = VecView(U,viewer);CHKERRQ(ierr);
ierr = PetscViewerDestroy(&viewer);CHKERRQ(ierr);
The mesh I am solving has 13368 nodes, and 404 of them are constrained
using the DMPlexAddBoundary(...) function. However, when I output the
vector I only get 12964 values, which I believe is leaving out the 404
constrained ones. How do I get all dofs in the vector U (both free and
constrained) printed?
Thanks,
--
Justin Chang
PhD Candidate, Civil Engineering - Computational Sciences
University of Houston, Department of Civil and Environmental Engineering
Houston, TX 77004
(512) 963-3262
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150331/ed73411c/attachment.html>
More information about the petsc-users
mailing list