Lines Matching refs:fd
12 FILE *fd; member
27 PetscCall(PetscFClose(PetscObjectComm((PetscObject)viewer), vu->fd)); in PetscViewerFileClose_VU()
28 vu->fd = NULL; in PetscViewerFileClose_VU()
53 if (rank == 0) PetscCall(PetscFFlush(((PetscViewer_VU *)viewer->data)->fd)); in PetscViewerFlush_VU()
99 vu->fd = fopen(fname, "r"); in PetscViewerFileSetName_VU()
102 vu->fd = fopen(fname, "w"); in PetscViewerFileSetName_VU()
105 vu->fd = fopen(fname, "a"); in PetscViewerFileSetName_VU()
108 vu->fd = fopen(fname, "r+"); in PetscViewerFileSetName_VU()
109 if (!vu->fd) vu->fd = fopen(fname, "w+"); in PetscViewerFileSetName_VU()
115 vu->fd = fopen(fname, "r+"); in PetscViewerFileSetName_VU()
116 if (!vu->fd) vu->fd = fopen(fname, "w+"); in PetscViewerFileSetName_VU()
118 int ret = fseek(vu->fd, 0, SEEK_END); in PetscViewerFileSetName_VU()
126 …PetscCheck(vu->fd, PETSC_COMM_SELF, PETSC_ERR_FILE_OPEN, "Cannot open PetscViewer file: %s", fname… in PetscViewerFileSetName_VU()
152 vu->fd = NULL; in PetscViewerCreate_VU()
182 PetscErrorCode PetscViewerVUGetPointer(PetscViewer viewer, FILE **fd) in PetscViewerVUGetPointer() argument
188 PetscAssertPointer(fd, 2); in PetscViewerVUGetPointer()
189 *fd = vu->fd; in PetscViewerVUGetPointer()
302 PetscCall(PetscFPrintf(PetscObjectComm((PetscObject)viewer), vu->fd, "%s", next->string)); in PetscViewerVUFlushDeferred()