Lines Matching refs:buf

212 static PetscErrorCode GmshBufferGet(GmshFile *gmsh, PetscCount count, size_t eltsize, void *buf)  in GmshBufferGet()  argument
222 *(void **)buf = size ? gmsh->wbuf : NULL; in GmshBufferGet()
229 static PetscErrorCode GmshBufferSizeGet(GmshFile *gmsh, PetscCount count, void *buf) in GmshBufferSizeGet() argument
240 *(void **)buf = size ? gmsh->sbuf : NULL; in GmshBufferSizeGet()
247 static PetscErrorCode GmshRead(GmshFile *gmsh, void *buf, PetscCount count, PetscDataType dtype) in GmshRead() argument
253 PetscCall(PetscViewerRead(gmsh->viewer, buf, icount, NULL, dtype)); in GmshRead()
254 if (gmsh->byteSwap) PetscCall(PetscByteSwap(buf, dtype, icount)); in GmshRead()
258 static PetscErrorCode GmshReadString(GmshFile *gmsh, char *buf, PetscCount count) in GmshReadString() argument
264 PetscCall(PetscViewerRead(gmsh->viewer, buf, icount, NULL, PETSC_STRING)); in GmshReadString()
314 static PetscErrorCode GmshReadPetscInt(GmshFile *gmsh, PetscInt *buf, PetscCount count) in GmshReadPetscInt() argument
321 PetscCall(GmshRead(gmsh, buf, count, PETSC_INT)); in GmshReadPetscInt()
326 for (i = 0; i < count; ++i) buf[i] = (PetscInt)ibuf[i]; in GmshReadPetscInt()
331 for (i = 0; i < count; ++i) buf[i] = (PetscInt)ibuf[i]; in GmshReadPetscInt()
336 for (i = 0; i < count; ++i) buf[i] = (PetscInt)ibuf[i]; in GmshReadPetscInt()
344 static PetscErrorCode GmshReadPetscCount(GmshFile *gmsh, PetscCount *buf, PetscCount count) in GmshReadPetscCount() argument
351 PetscCall(GmshRead(gmsh, buf, count, PETSC_COUNT)); in GmshReadPetscCount()
356 for (i = 0; i < count; ++i) buf[i] = (PetscCount)ibuf[i]; in GmshReadPetscCount()
361 for (i = 0; i < count; ++i) buf[i] = (PetscCount)ibuf[i]; in GmshReadPetscCount()
366 for (i = 0; i < count; ++i) buf[i] = (PetscCount)ibuf[i]; in GmshReadPetscCount()
374 static PetscErrorCode GmshReadInt(GmshFile *gmsh, int *buf, PetscCount count) in GmshReadInt() argument
377 PetscCall(GmshRead(gmsh, buf, count, PETSC_ENUM)); in GmshReadInt()
384 static PetscErrorCode GmshReadDouble(GmshFile *gmsh, double *buf, PetscCount count) in GmshReadDouble() argument
387 PetscCall(GmshRead(gmsh, buf, count, PETSC_DOUBLE)); in GmshReadDouble()
1729 int buf[6]; in DMPlexCreateGmsh() local
1731 buf[0] = (int)dim; in DMPlexCreateGmsh()
1732 buf[1] = (int)order; in DMPlexCreateGmsh()
1733 buf[2] = periodic; in DMPlexCreateGmsh()
1734 buf[3] = isSimplex; in DMPlexCreateGmsh()
1735 buf[4] = isHybrid; in DMPlexCreateGmsh()
1736 buf[5] = hasTetra; in DMPlexCreateGmsh()
1738 PetscCallMPI(MPI_Bcast(buf, 6, MPI_INT, 0, comm)); in DMPlexCreateGmsh()
1740 dim = buf[0]; in DMPlexCreateGmsh()
1741 order = buf[1]; in DMPlexCreateGmsh()
1742 periodic = buf[2] ? PETSC_TRUE : PETSC_FALSE; in DMPlexCreateGmsh()
1743 isSimplex = buf[3] ? PETSC_TRUE : PETSC_FALSE; in DMPlexCreateGmsh()
1744 isHybrid = buf[4] ? PETSC_TRUE : PETSC_FALSE; in DMPlexCreateGmsh()
1745 hasTetra = buf[5] ? PETSC_TRUE : PETSC_FALSE; in DMPlexCreateGmsh()