Lines Matching refs:view
648 PetscErrorCode PetscBagView(PetscBag bag, PetscViewer view) in PetscBagView() argument
655 PetscValidHeaderSpecific(view, PETSC_VIEWER_CLASSID, 2); in PetscBagView()
656 PetscCall(PetscObjectTypeCompare((PetscObject)view, PETSCVIEWERASCII, &isascii)); in PetscBagView()
657 PetscCall(PetscObjectTypeCompare((PetscObject)view, PETSCVIEWERBINARY, &isbinary)); in PetscBagView()
660 …PetscCall(PetscViewerASCIIPrintf(view, "PetscBag Object: %s (%s) %s\n", bag->bagname, bag->bagpre… in PetscBagView()
662 … PetscCall(PetscViewerASCIIPrintf(view, "PetscBag Object: %s %s\n", bag->bagname, bag->baghelp)); in PetscBagView()
669 PetscCall(PetscViewerASCIIPrintf(view, " %s = %s; %s\n", nitem->name, value, nitem->help)); in PetscBagView()
674 PetscCall(PetscViewerASCIIPrintf(view, " %s = ", nitem->name)); in PetscBagView()
675 …for (i = 0; i < nitem->msize; i++) PetscCall(PetscViewerASCIIPrintf(view, "%g ", (double)value[i])… in PetscBagView()
676 PetscCall(PetscViewerASCIIPrintf(view, "; %s\n", nitem->help)); in PetscBagView()
681 …PetscCall(PetscViewerASCIIPrintf(view, " %s = %g + %gi; %s\n", nitem->name, (double)PetscRealPart… in PetscBagView()
683 …PetscCall(PetscViewerASCIIPrintf(view, " %s = %g; %s\n", nitem->name, (double)PetscRealPart(value… in PetscBagView()
686 …PetscCall(PetscViewerASCIIPrintf(view, " %s = %g; %s\n", nitem->name, (double)value, nitem->help)… in PetscBagView()
690 PetscCall(PetscViewerASCIIPrintf(view, " %s = ", nitem->name)); in PetscBagView()
691 …for (i = 0; i < nitem->msize; i++) PetscCall(PetscViewerASCIIPrintf(view, "%" PetscInt_FMT " ", va… in PetscBagView()
692 PetscCall(PetscViewerASCIIPrintf(view, "; %s\n", nitem->help)); in PetscBagView()
696 PetscCall(PetscViewerASCIIPrintf(view, " %s = ", nitem->name)); in PetscBagView()
701 PetscCall(PetscViewerASCIIPrintf(view, " %s", PetscBools[value[i]])); in PetscBagView()
703 PetscCall(PetscViewerASCIIPrintf(view, "; %s\n", nitem->help)); in PetscBagView()
708 …PetscCall(PetscViewerASCIIPrintf(view, " %s = %s; (%s) %s\n", nitem->name, nitem->list[value], ni… in PetscBagView()
716 PetscCall(PetscViewerBinaryWrite(view, &classid, 1, PETSC_INT)); in PetscBagView()
717 PetscCall(PetscViewerBinaryWrite(view, &deprecatedbagsize, 1, PETSC_INT)); in PetscBagView()
718 PetscCall(PetscViewerBinaryWrite(view, &bag->count, 1, PETSC_INT)); in PetscBagView()
719 PetscCall(PetscViewerBinaryWrite(view, bag->bagname, PETSC_BAG_NAME_LENGTH, PETSC_CHAR)); in PetscBagView()
720 PetscCall(PetscViewerBinaryWrite(view, bag->baghelp, PETSC_BAG_HELP_LENGTH, PETSC_CHAR)); in PetscBagView()
722 PetscCall(PetscViewerBinaryWrite(view, &nitem->offset, 1, PETSC_INT)); in PetscBagView()
724 PetscCall(PetscViewerBinaryWrite(view, &dtype, 1, PETSC_INT)); in PetscBagView()
725 PetscCall(PetscViewerBinaryWrite(view, nitem->name, PETSC_BAG_NAME_LENGTH, PETSC_CHAR)); in PetscBagView()
726 PetscCall(PetscViewerBinaryWrite(view, nitem->help, PETSC_BAG_HELP_LENGTH, PETSC_CHAR)); in PetscBagView()
727 PetscCall(PetscViewerBinaryWrite(view, &nitem->msize, 1, PETSC_INT)); in PetscBagView()
729 … PetscCall(PetscViewerBinaryWrite(view, (char *)bag + nitem->offset, nitem->msize, nitem->dtype)); in PetscBagView()
730 …if (dtype == PETSC_ENUM) PetscCall(PetscViewerBinaryWriteStringArray(view, (const char *const *)ni… in PetscBagView()
733 PetscCall(PetscViewerGetFormat(view, &format)); in PetscBagView()
737 PetscCall(PetscObjectGetComm((PetscObject)view, &comm)); in PetscBagView()
738 PetscCall(PetscViewerBinaryGetInfoPointer(view, &info)); in PetscBagView()
805 PetscErrorCode PetscBagLoad(PetscViewer view, PetscBag bag) in PetscBagLoad() argument
815 PetscValidHeaderSpecific(view, PETSC_VIEWER_CLASSID, 1); in PetscBagLoad()
817 PetscCall(PetscObjectGetComm((PetscObject)view, &comm)); in PetscBagLoad()
820 PetscCall(PetscObjectTypeCompare((PetscObject)view, PETSCVIEWERBINARY, &isbinary)); in PetscBagLoad()
823 PetscCall(PetscViewerBinaryRead(view, &classid, 1, NULL, PETSC_INT)); in PetscBagLoad()
825 PetscCall(PetscViewerBinaryRead(view, &deprecatedbagsize, 1, NULL, PETSC_INT)); in PetscBagLoad()
826 PetscCall(PetscViewerBinaryRead(view, &bagcount, 1, NULL, PETSC_INT)); in PetscBagLoad()
828 PetscCall(PetscViewerBinaryRead(view, bag->bagname, PETSC_BAG_NAME_LENGTH, NULL, PETSC_CHAR)); in PetscBagLoad()
829 PetscCall(PetscViewerBinaryRead(view, bag->baghelp, PETSC_BAG_HELP_LENGTH, NULL, PETSC_CHAR)); in PetscBagLoad()
833 PetscCall(PetscViewerBinaryRead(view, &offset, 1, NULL, PETSC_INT)); in PetscBagLoad()
835 PetscCall(PetscViewerBinaryRead(view, &dtype, 1, NULL, PETSC_INT)); in PetscBagLoad()
836 PetscCall(PetscViewerBinaryRead(view, name, PETSC_BAG_NAME_LENGTH, NULL, PETSC_CHAR)); in PetscBagLoad()
837 PetscCall(PetscViewerBinaryRead(view, help, PETSC_BAG_HELP_LENGTH, NULL, PETSC_CHAR)); in PetscBagLoad()
838 PetscCall(PetscViewerBinaryRead(view, &msize, 1, NULL, PETSC_INT)); in PetscBagLoad()
841 … PetscCall(PetscViewerBinaryRead(view, ((char *)bag) + nitem->offset, msize, NULL, PETSC_CHAR)); in PetscBagLoad()
843 … PetscCall(PetscViewerBinaryRead(view, ((char *)bag) + nitem->offset, msize, NULL, PETSC_REAL)); in PetscBagLoad()
845 PetscCall(PetscViewerBinaryRead(view, ((char *)bag) + nitem->offset, 1, NULL, PETSC_SCALAR)); in PetscBagLoad()
847 PetscCall(PetscViewerBinaryRead(view, ((char *)bag) + nitem->offset, msize, NULL, PETSC_INT)); in PetscBagLoad()
849 … PetscCall(PetscViewerBinaryRead(view, ((char *)bag) + nitem->offset, msize, NULL, PETSC_BOOL)); in PetscBagLoad()
851 PetscCall(PetscViewerBinaryRead(view, ((char *)bag) + nitem->offset, 1, NULL, PETSC_ENUM)); in PetscBagLoad()
852 PetscCall(PetscViewerBinaryReadStringArray(view, &list)); in PetscBagLoad()