Lines Matching refs:xin

116 static PetscErrorCode VecView_MPI_Draw_DA2d(Vec xin, PetscViewer viewer)  in VecView_MPI_Draw_DA2d()  argument
145 PetscCall(VecGetDM(xin, &da)); in VecView_MPI_Draw_DA2d()
146 …PetscCheck(da, PetscObjectComm((PetscObject)xin), PETSC_ERR_ARG_WRONG, "Vector not generated from … in VecView_MPI_Draw_DA2d()
148 PetscCall(PetscObjectGetComm((PetscObject)xin, &comm)); in VecView_MPI_Draw_DA2d()
197 PetscCall(DMGlobalToLocalBegin(dac, xin, INSERT_VALUES, xlocal)); in VecView_MPI_Draw_DA2d()
198 PetscCall(DMGlobalToLocalEnd(dac, xin, INSERT_VALUES, xlocal)); in VecView_MPI_Draw_DA2d()
277 PetscCall(VecStrideMin(xin, zctx.k, NULL, &zctx.min)); in VecView_MPI_Draw_DA2d()
278 PetscCall(VecStrideMax(xin, zctx.k, NULL, &zctx.max)); in VecView_MPI_Draw_DA2d()
317 static PetscErrorCode VecGetHDF5ChunkSize(DM_DA *da, Vec xin, PetscInt dimension, PetscInt timestep… in VecGetHDF5ChunkSize() argument
328 PetscCallMPI(MPI_Comm_size(PetscObjectComm((PetscObject)xin), &comm_size)); in VecGetHDF5ChunkSize()
413 static PetscErrorCode VecView_MPI_HDF5_DA(Vec xin, PetscViewer viewer) in VecView_MPI_HDF5_DA() argument
440 PetscCall(VecGetDM(xin, &dm)); in VecView_MPI_HDF5_DA()
441 …PetscCheck(dm, PetscObjectComm((PetscObject)xin), PETSC_ERR_ARG_WRONG, "Vector not generated from … in VecView_MPI_HDF5_DA()
492 PetscCall(VecGetHDF5ChunkSize(da, xin, dimension, timestep, chunkDims)); in VecView_MPI_HDF5_DA()
510 PetscCall(PetscObjectGetName((PetscObject)xin, &vecname)); in VecView_MPI_HDF5_DA()
552 PetscCall(VecGetArrayRead(xin, &x)); in VecView_MPI_HDF5_DA()
555 PetscCall(VecRestoreArrayRead(xin, &x)); in VecView_MPI_HDF5_DA()
560 …PetscCall(PetscViewerHDF5WriteObjectAttribute(viewer, (PetscObject)xin, "complex", PETSC_BOOL, &tr… in VecView_MPI_HDF5_DA()
563 …if (timestepping) PetscCall(PetscViewerHDF5WriteObjectAttribute(viewer, (PetscObject)xin, "timeste… in VecView_MPI_HDF5_DA()
570 PetscCall(PetscInfo(xin, "Wrote Vec object with name %s\n", vecname)); in VecView_MPI_HDF5_DA()
578 static PetscErrorCode DMDAArrayMPIIO(DM da, PetscViewer viewer, Vec xin, PetscBool write) in DMDAArrayMPIIO() argument
591 PetscCall(VecGetSize(xin, &vecrows)); in DMDAArrayMPIIO()
627 PetscCall(VecGetArrayRead(xin, &array)); in DMDAArrayMPIIO()
633 PetscCall(VecRestoreArrayRead(xin, &array)); in DMDAArrayMPIIO()
639 PetscErrorCode VecView_MPI_DA(Vec xin, PetscViewer viewer) in VecView_MPI_DA() argument
652 PetscCall(VecGetDM(xin, &da)); in VecView_MPI_DA()
653 …PetscCheck(da, PetscObjectComm((PetscObject)xin), PETSC_ERR_ARG_WRONG, "Vector not generated from … in VecView_MPI_DA()
663 PetscCall(VecView_MPI_Draw_DA1d(xin, viewer)); in VecView_MPI_DA()
665 PetscCall(VecView_MPI_Draw_DA2d(xin, viewer)); in VecView_MPI_DA()
669 PetscCall(VecDuplicate(xin, &Y)); in VecView_MPI_DA()
670 if (((PetscObject)xin)->name) { in VecView_MPI_DA()
672 PetscCall(PetscObjectSetName((PetscObject)Y, ((PetscObject)xin)->name)); in VecView_MPI_DA()
674 PetscCall(VecCopy(xin, Y)); in VecView_MPI_DA()
688 PetscCall(VecView_MPI_HDF5_DA(xin, viewer)); in VecView_MPI_DA()
691 PetscCall(VecView_GLVis(xin, viewer)); in VecView_MPI_DA()
700 PetscCall(DMDAArrayMPIIO(da, viewer, xin, PETSC_TRUE)); in VecView_MPI_DA()
707 PetscCall(PetscObjectGetOptionsPrefix((PetscObject)xin, &prefix)); in VecView_MPI_DA()
710 PetscCall(DMDAGlobalToNaturalBegin(da, xin, INSERT_VALUES, natural)); in VecView_MPI_DA()
711 PetscCall(DMDAGlobalToNaturalEnd(da, xin, INSERT_VALUES, natural)); in VecView_MPI_DA()
712 PetscCall(PetscObjectGetName((PetscObject)xin, &name)); in VecView_MPI_DA()
763 static PetscErrorCode VecLoad_HDF5_DA(Vec xin, PetscViewer viewer) in VecLoad_HDF5_DA() argument
792 PetscCall(PetscObjectGetName((PetscObject)xin, &vecname)); in VecLoad_HDF5_DA()
796 PetscCall(VecGetDM(xin, &da)); in VecLoad_HDF5_DA()
864 PetscCall(VecGetArray(xin, &x)); in VecLoad_HDF5_DA()
866 PetscCall(VecRestoreArray(xin, &x)); in VecLoad_HDF5_DA()
877 static PetscErrorCode VecLoad_Binary_DA(Vec xin, PetscViewer viewer) in VecLoad_Binary_DA() argument
890 PetscCall(VecGetDM(xin, &da)); in VecLoad_Binary_DA()
895 PetscCall(DMDAArrayMPIIO(da, viewer, xin, PETSC_FALSE)); in VecLoad_Binary_DA()
900 PetscCall(PetscObjectGetOptionsPrefix((PetscObject)xin, &prefix)); in VecLoad_Binary_DA()
902 PetscCall(PetscObjectSetName((PetscObject)natural, ((PetscObject)xin)->name)); in VecLoad_Binary_DA()
905 PetscCall(DMDANaturalToGlobalBegin(da, natural, INSERT_VALUES, xin)); in VecLoad_Binary_DA()
906 PetscCall(DMDANaturalToGlobalEnd(da, natural, INSERT_VALUES, xin)); in VecLoad_Binary_DA()
908 PetscCall(PetscInfo(xin, "Loading vector from natural ordering into DMDA\n")); in VecLoad_Binary_DA()
909 …PetscCall(PetscOptionsGetInt(NULL, ((PetscObject)xin)->prefix, "-vecload_block_size", &bs, &flag)); in VecLoad_Binary_DA()
910 …if (flag && bs != dd->w) PetscCall(PetscInfo(xin, "Block size in file %" PetscInt_FMT " not equal … in VecLoad_Binary_DA()
914 PetscErrorCode VecLoad_Default_DA(Vec xin, PetscViewer viewer) in VecLoad_Default_DA() argument
923 PetscCall(VecGetDM(xin, &da)); in VecLoad_Default_DA()
924 …PetscCheck(da, PetscObjectComm((PetscObject)xin), PETSC_ERR_ARG_WRONG, "Vector not generated from … in VecLoad_Default_DA()
932 PetscCall(VecLoad_Binary_DA(xin, viewer)); in VecLoad_Default_DA()
935 PetscCall(VecLoad_HDF5_DA(xin, viewer)); in VecLoad_Default_DA()