Home
last modified time | relevance | path

Searched refs:red (Results 1 – 16 of 16) sorted by relevance

/petsc/src/ksp/pc/impls/redundant/
H A Dredundant.c23 PC_Redundant *red = (PC_Redundant *)pc->data; in PCFactorSetShiftType_Redundant() local
26 if (red->ksp) { in PCFactorSetShiftType_Redundant()
28 PetscCall(KSPGetPC(red->ksp, &pc)); in PCFactorSetShiftType_Redundant()
31 red->shifttypeset = PETSC_TRUE; in PCFactorSetShiftType_Redundant()
32 red->shifttype = shifttype; in PCFactorSetShiftType_Redundant()
39 PC_Redundant *red = (PC_Redundant *)pc->data; in PCView_Redundant() local
47 if (!red->psubcomm) { in PCView_Redundant()
50 …cViewerASCIIPrintf(viewer, " First (color=0) of %" PetscInt_FMT " PCs follows\n", red->nsubcomm)); in PCView_Redundant()
51 PetscCall(PetscViewerGetSubViewer(viewer, ((PetscObject)red->pc)->comm, &subviewer)); in PCView_Redundant()
52 if (!red->psubcomm->color) { /* only view first redundant pc */ in PCView_Redundant()
[all …]
/petsc/src/ksp/pc/impls/redistribute/
H A Dredistribute.c30 PC_Redistribute *red = (PC_Redistribute *)pc->data; in PCFieldSplitSetIS_Redistribute() local
31 PC_FieldSplitLink *next = &red->splitlinks; in PCFieldSplitSetIS_Redistribute()
40 PetscCall(PetscSNPrintf((*next)->splitname, 7, "%" PetscInt_FMT, red->nsplits++)); in PCFieldSplitSetIS_Redistribute()
50 PC_Redistribute *red = (PC_Redistribute *)pc->data; in PCView_Redistribute() local
58 …PetscCallMPI(MPIU_Allreduce(&red->dcnt, &ncnt, 1, MPIU_INT, MPI_SUM, PetscObjectComm((PetscObject)… in PCView_Redistribute()
62 PetscCall(KSPView(red->ksp, viewer)); in PCView_Redistribute()
65 PetscCall(KSPView(red->ksp, viewer)); in PCView_Redistribute()
72 PC_Redistribute *red = (PC_Redistribute *)pc->data; in PCSetUp_Redistribute() local
90 PC_FieldSplitLink *next = &red->splitlinks; in PCSetUp_Redistribute()
95 PetscCall(KSPGetOperators(red->ksp, NULL, &tmat)); in PCSetUp_Redistribute()
[all …]
/petsc/src/dm/impls/redundant/
H A Ddmredundant.c12 DM_Redundant *red = (DM_Redundant *)dm->data; in DMCreateMatrix_Redundant() local
19 PetscCall(MatSetSizes(*J, red->n, red->n, red->N, red->N)); in DMCreateMatrix_Redundant()
21 PetscCall(MatSeqAIJSetPreallocation(*J, red->n, NULL)); in DMCreateMatrix_Redundant()
22 PetscCall(MatSeqBAIJSetPreallocation(*J, 1, red->n, NULL)); in DMCreateMatrix_Redundant()
23 PetscCall(MatMPIAIJSetPreallocation(*J, red->n, NULL, red->N - red->n, NULL)); in DMCreateMatrix_Redundant()
24 PetscCall(MatMPIBAIJSetPreallocation(*J, 1, red->n, NULL, red->N - red->n, NULL)); in DMCreateMatrix_Redundant()
30 PetscCall(PetscMalloc2(red->N, &cols, red->N, &vals)); in DMCreateMatrix_Redundant()
31 for (i = 0; i < red->N; i++) { in DMCreateMatrix_Redundant()
36 …for (i = rstart; i < rend; i++) PetscCall(MatSetValues(*J, 1, &i, red->N, cols, vals, INSERT_VALUE… in DMCreateMatrix_Redundant()
56 DM_Redundant *red = (DM_Redundant *)dm->data; in DMCreateGlobalVector_Redundant() local
[all …]
/petsc/src/ts/tests/
H A Dex10.c96 TSDAESimple_Reduced *red = (TSDAESimple_Reduced *)tsdae->data; in TSDAESimple_Reduced_TSFunction() local
99 red->t = t; in TSDAESimple_Reduced_TSFunction()
100 red->U = U; in TSDAESimple_Reduced_TSFunction()
101 PetscCall(SNESSolve(red->snes, NULL, tsdae->V)); in TSDAESimple_Reduced_TSFunction()
113 TSDAESimple_Reduced *red = (TSDAESimple_Reduced *)tsdae->data; in TSDAESimple_Reduced_SNESFunction() local
116 PetscCall((*tsdae->F)(red->t, red->U, V, F, tsdae->Fctx)); in TSDAESimple_Reduced_SNESFunction()
122 TSDAESimple_Reduced *red = (TSDAESimple_Reduced *)tsdae->data; in TSDAESimpleSolve_Reduced() local
125 PetscCall(TSSolve(red->ts, U)); in TSDAESimpleSolve_Reduced()
131 TSDAESimple_Reduced *red = (TSDAESimple_Reduced *)tsdae->data; in TSDAESimpleSetFromOptions_Reduced() local
134 PetscCall(TSSetFromOptions(red->ts)); in TSDAESimpleSetFromOptions_Reduced()
[all …]
/petsc/src/mat/tests/
H A Dex152.c37 size_t red; in main() local
60 red = fread(vtxdist, sizeof(idx_t), size + 1, fp); in main()
61 …PetscCheck(red == (size_t)(size + 1), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to read from data fi… in main()
67 red = fread(xadj, sizeof(idx_t), ni + 1, fp); in main()
68 …PetscCheck(red == (size_t)(ni + 1), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to read from data file… in main()
73 red = fread(&adjncy[xadj[i]], sizeof(idx_t), xadj[i + 1] - xadj[i], fp); in main()
74 …PetscCheck(red == (size_t)(xadj[i + 1] - xadj[i]), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to read… in main()
85 red = fread(xyz, sizeof(PetscReal), ndims * ni, fp); in main()
86 …PetscCheck(red == (size_t)(ndims * ni), PETSC_COMM_SELF, PETSC_ERR_SYS, "Unable to read from data … in main()
/petsc/src/ksp/pc/impls/telescope/
H A Dtelescope.c735 PC_Telescope red = (PC_Telescope)pc->data; in PCTelescopeGetKSP_Telescope() local
738 if (ksp) *ksp = red->ksp; in PCTelescopeGetKSP_Telescope()
744 PC_Telescope red = (PC_Telescope)pc->data; in PCTelescopeGetSubcommType_Telescope() local
747 if (subcommtype) *subcommtype = red->subcommtype; in PCTelescopeGetSubcommType_Telescope()
753 PC_Telescope red = (PC_Telescope)pc->data; in PCTelescopeSetSubcommType_Telescope() local
757 red->subcommtype = subcommtype; in PCTelescopeSetSubcommType_Telescope()
763 PC_Telescope red = (PC_Telescope)pc->data; in PCTelescopeGetReductionFactor_Telescope() local
766 if (fact) *fact = red->redfactor; in PCTelescopeGetReductionFactor_Telescope()
772 PC_Telescope red = (PC_Telescope)pc->data; in PCTelescopeSetReductionFactor_Telescope() local
779 red->redfactor = fact; in PCTelescopeSetReductionFactor_Telescope()
[all …]
/petsc/src/snes/tutorials/
H A Dex22.c76 DM red, da; in main() local
92 PetscCall(DMRedundantCreate(PETSC_COMM_WORLD, 0, 1, &red)); in main()
93 PetscCall(DMSetOptionsPrefix(red, "red_")); in main()
94 PetscCall(DMCompositeAddDM(packer, red)); in main()
96 PetscCall(DMSetOptionsPrefix(red, "da_")); in main()
124 PetscCall(DMDestroy(&red)); in main()
153 DM packer, red, da; in ComputeFunction() local
157 PetscCall(DMCompositeGetEntries(packer, &red, &da)); in ComputeFunction()
/petsc/src/ksp/pc/impls/deflation/
H A Ddeflation.c76 static PetscErrorCode PCDeflationSetReductionFactor_Deflation(PC pc, PetscInt red) in PCDeflationSetReductionFactor_Deflation() argument
81 def->reductionfact = red; in PCDeflationSetReductionFactor_Deflation()
104 PetscErrorCode PCDeflationSetReductionFactor(PC pc, PetscInt red) in PCDeflationSetReductionFactor() argument
108 PetscValidLogicalCollectiveInt(pc, red, 2); in PCDeflationSetReductionFactor()
109 PetscTryMethod(pc, "PCDeflationSetReductionFactor_C", (PC, PetscInt), (pc, red)); in PCDeflationSetReductionFactor()
460 PetscInt i, m, red, size; in PCSetUp_Deflation() local
616 red = def->reductionfact; in PCSetUp_Deflation()
617 if (red < 0) { in PCSetUp_Deflation()
619 red = PetscCeilInt(commsize, PetscCeilInt(m, commsize)); in PCSetUp_Deflation()
621 if (match) red = commsize; in PCSetUp_Deflation()
[all …]
/petsc/src/sys/classes/draw/impls/x/
H A Dxcolor.c54 gCpalette[i][0] = (unsigned char)(colordef.red >> 8); in PetscDrawSetUpColormap_Shared()
63 colordef.red = (unsigned short)(R[i] << 8); in PetscDrawSetUpColormap_Shared()
121 gCpalette[i][0] = (unsigned char)(colordef.red >> 8); in PetscDrawSetUpColormap_Private()
130 colordef.red = (unsigned short)(R[i] << 8); in PetscDrawSetUpColormap_Private()
/petsc/lib/petsc/bin/maint/abi-compliance-checker/modules/Internals/Styles/
H A DHeadersDiff.css41 .lineno { color: red; background-color: #FFF; font-size: 0.7em; text-align: right; padding: 0 2px; …
/petsc/src/sys/logging/handler/impls/default/
H A Dlogdefault.c1275 PetscLogDouble stageTime, flops, flopr, mem, mess, messLen, red; in PetscLogHandlerView_Default_Info() local
1339 red = petsc_allreduce_ct + petsc_gather_ct + petsc_scatter_ct; in PetscLogHandlerView_Default_Info()
1418 PetscCallMPI(MPIU_Allreduce(&red, &min, 1, MPIU_PETSCLOGDOUBLE, MPI_MIN, comm)); in PetscLogHandlerView_Default_Info()
1419 PetscCallMPI(MPIU_Allreduce(&red, &max, 1, MPIU_PETSCLOGDOUBLE, MPI_MAX, comm)); in PetscLogHandlerView_Default_Info()
1420 PetscCallMPI(MPIU_Allreduce(&red, &tot, 1, MPIU_PETSCLOGDOUBLE, MPI_SUM, comm)); in PetscLogHandlerView_Default_Info()
1424 numReductions = red; /* wrong because uses count from process zero */ in PetscLogHandlerView_Default_Info()
1482 …PetscCallMPI(MPIU_Allreduce(&stage_info->numReductions, &red, 1, MPIU_PETSCLOGDOUBLE, MPI_SUM, com… in PetscLogHandlerView_Default_Info()
1485 red /= size; in PetscLogHandlerView_Default_Info()
1497 if (numReductions != 0.0) fracReductions = red / numReductions; in PetscLogHandlerView_Default_Info()
1499 …0 * fracFlops, mess, 100.0 * fracMessages, avgMessLen, 100.0 * fracLength, red, 100.0 * fracReduct… in PetscLogHandlerView_Default_Info()
[all …]
/petsc/src/sys/logging/handler/impls/nested/
H A Dxmlviewer.c194 PetscLogDouble flops, mem, red, mess; in PetscPrintGlobalPerformance() local
200 red = petsc_allreduce_ct + petsc_gather_ct + petsc_scatter_ct; in PetscPrintGlobalPerformance()
232 …PetscCall(PetscPrintXMLGlobalPerformanceElement(viewer, "reductions", "MPI Reductions", red, print… in PetscPrintGlobalPerformance()
/petsc/src/vec/vec/interface/
H A Drvector.c1500 PetscBool red[2] = {PETSC_TRUE /*contiguous*/, PETSC_TRUE /*validVBS*/}; in VecGetSubVectorContiguityAndBS_Private() local
1509 PetscCall(ISContiguousLocal(is, gstart, gend, &lstart, &red[0])); in VecGetSubVectorContiguityAndBS_Private()
1512 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, red, 1, MPI_C_BOOL, MPI_LAND, PetscObjectComm((PetscObje… in VecGetSubVectorContiguityAndBS_Private()
1515 …if (n % vbs || vbs == 1) red[1] = PETSC_FALSE; /* this process invalidate the collectiveness of bl… in VecGetSubVectorContiguityAndBS_Private()
1516 …PetscCallMPI(MPIU_Allreduce(MPI_IN_PLACE, red, 2, MPI_C_BOOL, MPI_LAND, PetscObjectComm((PetscObje… in VecGetSubVectorContiguityAndBS_Private()
1517 …if (red[0] && red[1]) bs = vbs; /* all processes have a valid block size and the access will be co… in VecGetSubVectorContiguityAndBS_Private()
1520 *contig = red[0]; in VecGetSubVectorContiguityAndBS_Private()
/petsc/src/ksp/pc/impls/mpi/
H A Dpcmpi.c996 PC_MPI *red = (PC_MPI *)pc->data; in PCMPIGetKSP() local
1001 *innerksp = red->ksps[0]; in PCMPIGetKSP()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DPC.pyx2838 def setDeflationReductionFactor(self, red: int) -> None:
2845 red
2853 cdef PetscInt cred = asInt(red)
/petsc/share/petsc/datafiles/meshes/
H A Dtestcase3D.cas1812 (patternator/red-edfile "")
4732 (species/dr-num-red-species 12)
7800 (adapt/refine/marker/color "red")