Lines Matching refs:sl
2676 PetscSectionSym_Label *sl = (PetscSectionSym_Label *)sym->data; in PetscSectionSymLabelReset() local
2679 for (i = 0; i <= sl->numStrata; i++) { in PetscSectionSymLabelReset()
2680 if (sl->modes[i] == PETSC_OWN_POINTER || sl->modes[i] == PETSC_COPY_VALUES) { in PetscSectionSymLabelReset()
2681 for (j = sl->minMaxOrients[i][0]; j < sl->minMaxOrients[i][1]; j++) { in PetscSectionSymLabelReset()
2682 if (sl->perms[i]) PetscCall(PetscFree(sl->perms[i][j])); in PetscSectionSymLabelReset()
2683 if (sl->rots[i]) PetscCall(PetscFree(sl->rots[i][j])); in PetscSectionSymLabelReset()
2685 if (sl->perms[i]) { in PetscSectionSymLabelReset()
2686 const PetscInt **perms = &sl->perms[i][sl->minMaxOrients[i][0]]; in PetscSectionSymLabelReset()
2690 if (sl->rots[i]) { in PetscSectionSymLabelReset()
2691 const PetscScalar **rots = &sl->rots[i][sl->minMaxOrients[i][0]]; in PetscSectionSymLabelReset()
2697 PetscCall(PetscFree5(sl->modes, sl->sizes, sl->perms, sl->rots, sl->minMaxOrients)); in PetscSectionSymLabelReset()
2698 PetscCall(DMLabelDestroy(&sl->label)); in PetscSectionSymLabelReset()
2699 sl->numStrata = 0; in PetscSectionSymLabelReset()
2713 PetscSectionSym_Label *sl = (PetscSectionSym_Label *)sym->data; in PetscSectionSymView_Label() local
2715 DMLabel label = sl->label; in PetscSectionSymView_Label()
2732 PetscCall(PetscObjectGetName((PetscObject)sl->label, &name)); in PetscSectionSymView_Label()
2739 for (i = 0; i <= sl->numStrata; i++) { in PetscSectionSymView_Label()
2740 PetscInt value = i < sl->numStrata ? label->stratumValues[i] : label->defaultValue; in PetscSectionSymView_Label()
2742 if (!(sl->perms[i] || sl->rots[i])) { in PetscSectionSymView_Label()
2743 …alue %" PetscInt_FMT " (%" PetscInt_FMT " dofs per point): no symmetries\n", value, sl->sizes[i])); in PetscSectionSymView_Label()
2745 … for stratum value %" PetscInt_FMT " (%" PetscInt_FMT " dofs per point):\n", value, sl->sizes[i])); in PetscSectionSymView_Label()
2747 …"Orientation range: [%" PetscInt_FMT ", %" PetscInt_FMT ")\n", sl->minMaxOrients[i][0], sl->minMax… in PetscSectionSymView_Label()
2750 for (j = sl->minMaxOrients[i][0]; j < sl->minMaxOrients[i][1]; j++) { in PetscSectionSymView_Label()
2751 if (!((sl->perms[i] && sl->perms[i][j]) || (sl->rots[i] && sl->rots[i][j]))) { in PetscSectionSymView_Label()
2759 if (sl->perms[i] && sl->perms[i][j]) { in PetscSectionSymView_Label()
2762 …for (k = 0; k < sl->sizes[i]; k++) PetscCall(PetscViewerASCIIPrintf(viewer, " %" PetscInt_FMT, sl-… in PetscSectionSymView_Label()
2766 if (sl->rots[i] && sl->rots[i][j]) { in PetscSectionSymView_Label()
2770 …k < sl->sizes[i]; k++) PetscCall(PetscViewerASCIIPrintf(viewer, " %+g+i*%+g", (double)PetscRealPar… in PetscSectionSymView_Label()
2772 …for (k = 0; k < sl->sizes[i]; k++) PetscCall(PetscViewerASCIIPrintf(viewer, " %+g", (double)sl->ro… in PetscSectionSymView_Label()
2805 PetscSectionSym_Label *sl; in PetscSectionSymLabelSetLabel() local
2809 sl = (PetscSectionSym_Label *)sym->data; in PetscSectionSymLabelSetLabel()
2810 if (sl->label && sl->label != label) PetscCall(PetscSectionSymLabelReset(sym)); in PetscSectionSymLabelSetLabel()
2812 sl->label = label; in PetscSectionSymLabelSetLabel()
2814 PetscCall(DMLabelGetNumValues(label, &sl->numStrata)); in PetscSectionSymLabelSetLabel()
2815 …oc5(sl->numStrata + 1, &sl->modes, sl->numStrata + 1, &sl->sizes, sl->numStrata + 1, &sl->perms, s… in PetscSectionSymLabelSetLabel()
2816 PetscCall(PetscMemzero((void *)sl->modes, (sl->numStrata + 1) * sizeof(PetscCopyMode))); in PetscSectionSymLabelSetLabel()
2817 PetscCall(PetscMemzero((void *)sl->sizes, (sl->numStrata + 1) * sizeof(PetscInt))); in PetscSectionSymLabelSetLabel()
2818 PetscCall(PetscMemzero((void *)sl->perms, (sl->numStrata + 1) * sizeof(const PetscInt **))); in PetscSectionSymLabelSetLabel()
2819 PetscCall(PetscMemzero((void *)sl->rots, (sl->numStrata + 1) * sizeof(const PetscScalar **))); in PetscSectionSymLabelSetLabel()
2820 PetscCall(PetscMemzero((void *)sl->minMaxOrients, (sl->numStrata + 1) * sizeof(PetscInt[2]))); in PetscSectionSymLabelSetLabel()
2847 PetscSectionSym_Label *sl; in PetscSectionSymLabelGetStratum() local
2853 sl = (PetscSectionSym_Label *)sym->data; in PetscSectionSymLabelGetStratum()
2854 …PetscCheck(sl->label, PetscObjectComm((PetscObject)sym), PETSC_ERR_ARG_WRONGSTATE, "No label set y… in PetscSectionSymLabelGetStratum()
2855 for (i = 0; i <= sl->numStrata; i++) { in PetscSectionSymLabelGetStratum()
2856 PetscInt value = (i < sl->numStrata) ? sl->label->stratumValues[i] : sl->label->defaultValue; in PetscSectionSymLabelGetStratum()
2860 PetscCall(PetscObjectGetName((PetscObject)sl->label, &name)); in PetscSectionSymLabelGetStratum()
2861 …PetscCheck(i <= sl->numStrata, PetscObjectComm((PetscObject)sym), PETSC_ERR_ARG_OUTOFRANGE, "Strat… in PetscSectionSymLabelGetStratum()
2864 *size = sl->sizes[i]; in PetscSectionSymLabelGetStratum()
2868 *minOrient = sl->minMaxOrients[i][0]; in PetscSectionSymLabelGetStratum()
2872 *maxOrient = sl->minMaxOrients[i][1]; in PetscSectionSymLabelGetStratum()
2876 *perms = PetscSafePointerPlusOffset(sl->perms[i], sl->minMaxOrients[i][0]); in PetscSectionSymLabelGetStratum()
2880 *rots = PetscSafePointerPlusOffset(sl->rots[i], sl->minMaxOrients[i][0]); in PetscSectionSymLabelGetStratum()
2906 PetscSectionSym_Label *sl; in PetscSectionSymLabelSetStratum() local
2912 sl = (PetscSectionSym_Label *)sym->data; in PetscSectionSymLabelSetStratum()
2913 …PetscCheck(sl->label, PetscObjectComm((PetscObject)sym), PETSC_ERR_ARG_WRONGSTATE, "No label set y… in PetscSectionSymLabelSetStratum()
2914 for (i = 0; i <= sl->numStrata; i++) { in PetscSectionSymLabelSetStratum()
2915 PetscInt value = (i < sl->numStrata) ? sl->label->stratumValues[i] : sl->label->defaultValue; in PetscSectionSymLabelSetStratum()
2919 PetscCall(PetscObjectGetName((PetscObject)sl->label, &name)); in PetscSectionSymLabelSetStratum()
2920 …PetscCheck(i <= sl->numStrata, PetscObjectComm((PetscObject)sym), PETSC_ERR_ARG_OUTOFRANGE, "Strat… in PetscSectionSymLabelSetStratum()
2921 sl->sizes[i] = size; in PetscSectionSymLabelSetStratum()
2922 sl->modes[i] = mode; in PetscSectionSymLabelSetStratum()
2923 sl->minMaxOrients[i][0] = minOrient; in PetscSectionSymLabelSetStratum()
2924 sl->minMaxOrients[i][1] = maxOrient; in PetscSectionSymLabelSetStratum()
2936 sl->perms[i] = (const PetscInt **)&ownPerms[-minOrient]; in PetscSectionSymLabelSetStratum()
2948 sl->rots[i] = (const PetscScalar **)&ownRots[-minOrient]; in PetscSectionSymLabelSetStratum()
2951 sl->perms[i] = PetscSafePointerPlusOffset(perms, -minOrient); in PetscSectionSymLabelSetStratum()
2952 sl->rots[i] = PetscSafePointerPlusOffset(rots, -minOrient); in PetscSectionSymLabelSetStratum()
2960 PetscSectionSym_Label *sl; in PetscSectionSymGetPoints_Label() local
2964 sl = (PetscSectionSym_Label *)sym->data; in PetscSectionSymGetPoints_Label()
2965 numStrata = sl->numStrata; in PetscSectionSymGetPoints_Label()
2966 label = sl->label; in PetscSectionSymGetPoints_Label()
2984 …sl->minMaxOrients[j][1] > sl->minMaxOrients[j][0]) || !(ornt < sl->minMaxOrients[j][0] || ornt >= … in PetscSectionSymGetPoints_Label()
2986 if (perms) perms[i] = sl->perms[j] ? sl->perms[j][ornt] : NULL; in PetscSectionSymGetPoints_Label()
2987 if (rots) rots[i] = sl->rots[j] ? sl->rots[j][ornt] : NULL; in PetscSectionSymGetPoints_Label()
2994 PetscSectionSym_Label *sl = (PetscSectionSym_Label *)nsym->data; in PetscSectionSymCopy_Label() local
3000 PetscCall(DMLabelGetNumValues(sl->label, &Nv)); in PetscSectionSymCopy_Label()
3001 PetscCall(DMLabelGetValueIS(sl->label, &valIS)); in PetscSectionSymCopy_Label()
3018 PetscSectionSym_Label *sl = (PetscSectionSym_Label *)sym->data; in PetscSectionSymDistribute_Label() local
3022 PetscCall(DMLabelDistribute(sl->label, migrationSF, &dlabel)); in PetscSectionSymDistribute_Label()
3031 PetscSectionSym_Label *sl; in PetscSectionSymCreate_Label() local
3034 PetscCall(PetscNew(&sl)); in PetscSectionSymCreate_Label()
3040 sym->data = (void *)sl; in PetscSectionSymCreate_Label()