Home
last modified time | relevance | path

Searched refs:nf (Results 1 – 25 of 32) sorted by relevance

12

/petsc/src/dm/impls/da/
H A Ddacorn.c39 PetscErrorCode DMDASetFieldName(DM da, PetscInt nf, const char name[]) in DMDASetFieldName() argument
45 …PetscCheck(nf >= 0 && nf < dd->w, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid field number… in DMDASetFieldName()
47 PetscCall(PetscFree(dd->fieldname[nf])); in DMDASetFieldName()
48 PetscCall(PetscStrallocpy(name, &dd->fieldname[nf])); in DMDASetFieldName()
102 PetscInt nf = 0; in DMDASetFieldNames() local
106 while (names[nf++]) { } in DMDASetFieldNames()
107 …PetscCheck(nf == dd->w + 1, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid number of fields %… in DMDASetFieldNames()
135 PetscErrorCode DMDAGetFieldName(DM da, PetscInt nf, const char *name[]) in DMDAGetFieldName() argument
142 …PetscCheck(nf >= 0 && nf < dd->w, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Invalid field number… in DMDAGetFieldName()
144 *name = dd->fieldname[nf]; in DMDAGetFieldName()
[all …]
H A Dgrglvis.c89 static PetscErrorCode DMDASampleGLVisFields_Private(PetscObject oX, PetscInt nf, PetscObject oXf[],… in DMDASampleGLVisFields_Private() argument
116 PetscCall(PetscMalloc3(nf, &arrayf, nf, &bss, nf, &nfs)); in DMDASampleGLVisFields_Private()
118 for (f = 0; f < nf; f++) { in DMDASampleGLVisFields_Private()
128 for (f = 0, cf = 0; f < nf; f++) { in DMDASampleGLVisFields_Private()
136 for (f = 0; f < nf; f++) PetscCall(VecRestoreArray((Vec)oXf[f], &arrayf[f])); in DMDASampleGLVisFields_Private()
252 PetscInt dim, M, N, P, dof, s, i, nf; in DMSetUpGLVisViewer_DMDA() local
263 nf = dof; in DMSetUpGLVisViewer_DMDA()
266 …vis_dm_da_bs", "Block sizes for subfields; enable vector representation", NULL, bss, &nf, &bsset)); in DMSetUpGLVisViewer_DMDA()
270 for (i = 0, t = 0; i < nf; i++) t += bss[i]; in DMSetUpGLVisViewer_DMDA()
272 } else nf = dof; in DMSetUpGLVisViewer_DMDA()
[all …]
H A Ddainterp.c1009 PetscInt dimc, Mc, Nc, Pc, mc, nc, pc, dofc, sc, dimf, Mf, Nf, Pf, mf, nf, pf, doff, sf; in DMCreateInterpolation_DA() local
1021 …PetscCall(DMDAGetInfo(daf, &dimf, &Mf, &Nf, &Pf, &mf, &nf, &pf, &doff, &sf, &bxf, &byf, &bzf, &stf… in DMCreateInterpolation_DA()
1266 PetscInt dimc, Mc, Nc, Pc, mc, nc, pc, dofc, sc, dimf, Mf, Nf, Pf, mf, nf, pf, doff, sf; in DMCreateInjection_DA() local
1277 …PetscCall(DMDAGetInfo(daf, &dimf, &Mf, &Nf, &Pf, &mf, &nf, &pf, &doff, &sf, &bxf, &byf, &bzf, &stf… in DMCreateInjection_DA()
1335 PetscInt dimf, Mf, Nf, Pf, mf, nf, pf, doff, sf; in DMDACreateAggregates() local
1360 …PetscCall(DMDAGetInfo(daf, &dimf, &Mf, &Nf, &Pf, &mf, &nf, &pf, &doff, &sf, &bxf, &byf, &bzf, &stf… in DMDACreateAggregates()
/petsc/src/snes/interface/noise/
H A Dsnesdnest.c11 PetscErrorCode SNESNoise_dnest_(PetscInt *nf, double *fval, double *h__, double *fnoise, double *fd… in SNESNoise_dnest_() argument
119 mh = (*nf + 1) / 2; in SNESNoise_dnest_()
141 i__1 = *nf; in SNESNoise_dnest_()
159 i__1 = *nf - j; in SNESNoise_dnest_()
175 i__1 = *nf - j; in SNESNoise_dnest_()
181 stdv = scale * PetscSqrtScalar(stdv / (*nf - j)); in SNESNoise_dnest_()
185 i__1 = *nf - j - 1; in SNESNoise_dnest_()
H A Dsnesnoise.c86 PetscInt nf = 7; /* number of function evaluations */ in SNESDiffParameterCompute_More() local
118 for (k = 0; k < nf; k++) { in SNESDiffParameterCompute_More()
119 alpha = h * (k + 1 - (nf + 1) / 2); in SNESDiffParameterCompute_More()
125 f = fval[(nf + 1) / 2 - 1]; in SNESDiffParameterCompute_More()
128 for (i = 0; i < nf; i++) tab[i][0] = fval[i]; in SNESDiffParameterCompute_More()
130 for (j = 0; j < nf - 1; j++) { in SNESDiffParameterCompute_More()
131 for (i = 0; i < nf - j - 1; i++) tab[i][j + 1] = tab[i + 1][j] - tab[i][j]; in SNESDiffParameterCompute_More()
136 for (i = 0; i < nf; i++) { in SNESDiffParameterCompute_More()
137 for (j = 0; j < nf - i; j++) PetscCall(PetscFPrintf(comm, fp, " %10.2e ", tab[i][j])); in SNESDiffParameterCompute_More()
142 PetscCall(SNESNoise_dnest_(&nf, fval, &h, fnoise, &fder2, hopt, &info, eps)); in SNESDiffParameterCompute_More()
/petsc/src/vec/is/utils/
H A Disltog.h9 PetscInt i, nf = 0, tmp, start, end, bs; in ISGlobalToLocalMappingApply() local
40 idxout[nf++] = tmp; in ISGlobalToLocalMappingApply()
49 nf++; in ISGlobalToLocalMappingApply()
52 if (nout) *nout = nf; in ISGlobalToLocalMappingApply()
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A DDS.pyx180 cdef PetscInt nf = 0
181 CHKERR(PetscDSGetNumFields(self.ds, &nf))
182 return toInt(nf)
241 cdef PetscInt nf = 0, *dims = NULL
242 CHKERR(PetscDSGetNumFields(self.ds, &nf))
244 return array_i(nf, dims)
256 cdef PetscInt nf = 0, *cmps = NULL
257 CHKERR(PetscDSGetNumFields(self.ds, &nf))
259 return array_i(nf, cmps)
H A DDMSwarm.pyx128 cdef PetscInt i = 0, nf = <PetscInt> len(fieldnames)
130 cdef object unused = oarray_p(empty_p(nf), NULL, <void**>&cfieldnames)
132 for i from 0 <= i < nf:
136 CHKERR(DMSwarmCreateGlobalVectorFromFields(self.dm, nf, cfieldnames, &vg.vec))
155 cdef PetscInt i = 0, nf = <PetscInt> len(fieldnames)
157 cdef object unused = oarray_p(empty_p(nf), NULL, <void**>&cfieldnames)
159 for i from 0 <= i < nf:
163 CHKERR(DMSwarmDestroyGlobalVectorFromFields(self.dm, nf, cfieldnames, &vec))
228 cdef PetscInt i = 0, nf = <PetscInt> len(fieldnames)
230 cdef object unused = oarray_p(empty_p(nf), NULL, <void**>&cfieldnames)
[all …]
/petsc/src/dm/impls/plex/
H A Dplexglvis.c10 PetscInt nf; member
20 for (i = 0; i < ctx->nf; i++) PetscCall(VecScatterDestroy(&ctx->scctx[i])); in DestroyGLVisViewerCtx_Private()
26 static PetscErrorCode DMPlexSampleGLVisFields_Private(PetscObject oX, PetscInt nf, PetscObject oXfi… in DMPlexSampleGLVisFields_Private() argument
32 for (f = 0; f < nf; f++) { in DMPlexSampleGLVisFields_Private()
138 PetscCall(PetscStrallocpy(name, &fieldname[ctx->nf])); in DMSetUpGLVisViewer_Plex()
139 bs[ctx->nf] = Nc; in DMSetUpGLVisViewer_Plex()
140 dims[ctx->nf] = dim; in DMSetUpGLVisViewer_Plex()
142 nlocal[ctx->nf] = Nc * Nv; in DMSetUpGLVisViewer_Plex()
143 PetscCall(PetscStrallocpy(fec, &fec_type[ctx->nf])); in DMSetUpGLVisViewer_Plex()
154 nlocal[ctx->nf] = Nc * totc; in DMSetUpGLVisViewer_Plex()
[all …]
H A Dplexvtu.c150 PetscInt nf; in DMGetFieldIfFV_Private() local
154 PetscCall(DMGetNumFields(dm, &nf)); in DMGetFieldIfFV_Private()
155 if (nf > 0) { in DMGetFieldIfFV_Private()
/petsc/src/dm/interface/
H A Ddmi.c238 PetscInt nf = 0, of = 0; in DMSelectFields_Private() local
338 PetscInt onf, nf; in DMSelectFields_Private() local
343 PetscCall(ISGetLocalSize(dsfields, &nf)); in DMSelectFields_Private()
344 PetscCheck(nf, PETSC_COMM_SELF, PETSC_ERR_PLIB, "DS cannot be supported on 0 fields"); in DMSelectFields_Private()
348 PetscCall(PetscMalloc1(nf, &fidx)); in DMSelectFields_Private()
349 for (PetscInt f = 0, g = 0; f < onf && g < nf; ++f) { in DMSelectFields_Private()
355 …PetscCall(PetscDSSelectDiscretizations(dm->probs[0].ds, nf, fidx, PETSC_DETERMINE, PETSC_DETERMINE… in DMSelectFields_Private()
356 PetscCall(PetscDSSelectEquations(dm->probs[0].ds, nf, fidx, (*subdm)->probs[0].ds)); in DMSelectFields_Private()
373 nf = f; in DMSelectFields_Private()
381 PetscCall((*(*subdm)->nullspaceConstructors[nf])(*subdm, of, nf, &nullSpace)); in DMSelectFields_Private()
H A Ddm.c5984 PetscInt *fld, nf; in DMCreateDS() local
5986 for (f = 0, nf = 0; f < Nf; ++f) in DMCreateDS()
5987 if (!dm->fields[f].label) ++nf; in DMCreateDS()
5988 …PetscCheck(nf, comm, PETSC_ERR_PLIB, "All fields have labels, but we are trying to create a defaul… in DMCreateDS()
5989 PetscCall(PetscMalloc1(nf, &fld)); in DMCreateDS()
5990 for (f = 0, nf = 0; f < Nf; ++f) in DMCreateDS()
5991 if (!dm->fields[f].label) fld[nf++] = f; in DMCreateDS()
5995 PetscCall(ISGeneralSetIndices(fields, nf, fld, PETSC_OWN_POINTER)); in DMCreateDS()
6011 PetscInt depth, nf = 0, n, c; in DMCreateDS() local
6039 if (!dm->fields[f].label) fields[nf++] = f; in DMCreateDS()
[all …]
/petsc/src/dm/impls/stag/
H A Dstagmulti.c31 …PetscInt d, nf[DMSTAG_MAX_DIM], nc[DMSTAG_MAX_DIM], doff[DMSTAG_MAX_STRATA], dofc[DMSTAG_MAX_STRAT… in DMStagRestrictSimple() local
33 PetscCall(DMStagGetLocalSizes(dmf, &nf[0], &nf[1], &nf[2])); in DMStagRestrictSimple()
35 …for (d = 0; d < dim; ++d) PetscCheck(nf[d] % nc[d] == 0, PetscObjectComm((PetscObject)dmf), PETSC_… in DMStagRestrictSimple()
510 PetscInt xf, yf, mf, nf, nExtraxf, nExtrayf, i, j, d, count; in DMStagPopulateInterpolation2d_Internal() local
527 PetscCall(DMStagGetCorners(dmf, &xf, &yf, NULL, &mf, &nf, NULL, &nExtraxf, &nExtrayf, NULL)); in DMStagPopulateInterpolation2d_Internal()
531 for (j = yf; j < yf + nf + nExtrayf; ++j) in DMStagPopulateInterpolation2d_Internal()
558 for (j = yf; j < yf + nf; ++j) in DMStagPopulateInterpolation2d_Internal()
592 for (j = yf; j < yf + nf + nExtrayf; ++j) in DMStagPopulateInterpolation2d_Internal()
626 for (j = yf; j < yf + nf; ++j) in DMStagPopulateInterpolation2d_Internal()
647 PetscInt xf, yf, zf, mf, nf, pf, nExtraxf, nExtrayf, nExtrazf, i, j, k, d, count; in DMStagPopulateInterpolation3d_Internal() local
[all …]
H A Dstag.c384 …PetscInt dim, stencilWidthc, stencilWidthf, nf[DMSTAG_MAX_DIM], nc[DMSTAG_MAX_DIM], doff[DMSTAG_MA… in CheckTransferOperatorRequirements_Private() local
392 PetscCall(DMStagGetLocalSizes(dmf, &nf[0], &nf[1], &nf[2])); in CheckTransferOperatorRequirements_Private()
394 …for (PetscInt d = 0; d < dim; ++d) PetscCheck(nf[d] % nc[d] == 0, PetscObjectComm((PetscObject)dmc… in CheckTransferOperatorRequirements_Private()
/petsc/src/tao/leastsquares/tutorials/matlab/more_wild_probs/
H A Dperf_profile.m28 [nf,np,ns] = size(H); % Grab the dimensions
32 for i = 2:nf
/petsc/doc/manualpages/doctext/
H A Dnroff.def25 s_synopsis %n.SH SYNOPSIS%n.nf%n
/petsc/src/tao/complementarity/impls/asls/
H A Dasils.c115 PetscInt nf; in TaoSolve_ASILS() local
177 PetscCall(ISGetSize(asls->fixed, &nf)); in TaoSolve_ASILS()
178 PetscCall(PetscInfo(tao, "Number of fixed variables: %" PetscInt_FMT "\n", nf)); in TaoSolve_ASILS()
H A Dasfls.c115 PetscInt nf; in TaoSolve_ASFLS() local
180 PetscCall(ISGetSize(asls->fixed, &nf)); in TaoSolve_ASFLS()
181 PetscCall(PetscInfo(tao, "Number of fixed variables: %" PetscInt_FMT "\n", nf)); in TaoSolve_ASFLS()
/petsc/src/dm/impls/composite/
H A Dpack.c1307 static PetscErrorCode DMCompositeSampleGLVisFields_Private(PetscObject oX, PetscInt nf, PetscObject… in DMCompositeSampleGLVisFields_Private() argument
1348 PetscInt nf; in DMSetUpGLVisViewer_Composite() local
1353 PetscCall(PetscViewerGLVisGetFields_Internal(ctx->subv[i], &nf, NULL, NULL, NULL, NULL, NULL)); in DMSetUpGLVisViewer_Composite()
1354 tnf += nf; in DMSetUpGLVisViewer_Composite()
1359 PetscInt *sd, nf, f; in DMSetUpGLVisViewer_Composite() local
1363 …PetscCall(PetscViewerGLVisGetFields_Internal(ctx->subv[i], &nf, &fec, &sd, NULL, (PetscObject **)&… in DMSetUpGLVisViewer_Composite()
1364 for (f = 0; f < nf; f++) { in DMSetUpGLVisViewer_Composite()
1369 tnf += nf; in DMSetUpGLVisViewer_Composite()
/petsc/src/vec/is/section/interface/
H A Dsection.c2203 PetscInt nf, pStarti, pEndi; in PetscSectionCreateSupersection() local
2205 PetscCall(PetscSectionGetNumFields(s[i], &nf)); in PetscSectionCreateSupersection()
2209 Nf += nf; in PetscSectionCreateSupersection()
2214 PetscInt nf, fi, ci; in PetscSectionCreateSupersection() local
2216 PetscCall(PetscSectionGetNumFields(s[i], &nf)); in PetscSectionCreateSupersection()
2217 for (fi = 0; fi < nf; ++fi, ++f) { in PetscSectionCreateSupersection()
2236 PetscInt nf, fi, pStarti, pEndi; in PetscSectionCreateSupersection() local
2239 PetscCall(PetscSectionGetNumFields(s[i], &nf)); in PetscSectionCreateSupersection()
2242 for (fi = 0; fi < nf; ++fi, ++f) { in PetscSectionCreateSupersection()
2269 PetscInt nf, fi, pStarti, pEndi, fdof, cfdof, fc; in PetscSectionCreateSupersection() local
[all …]
/petsc/src/dm/dt/dualspace/impls/lagrange/
H A Ddspacelagrange.c18 …reate(PetscDTNodeType family, PetscReal gaussJacobiExp, PetscBool endpoints, Petsc1DNodeFamily *nf) in Petsc1DNodeFamilyCreate() argument
39 *nf = f; in Petsc1DNodeFamilyCreate()
43 static PetscErrorCode Petsc1DNodeFamilyReference(Petsc1DNodeFamily nf) in Petsc1DNodeFamilyReference() argument
46 if (nf) nf->refct++; in Petsc1DNodeFamilyReference()
50 static PetscErrorCode Petsc1DNodeFamilyDestroy(Petsc1DNodeFamily *nf) in Petsc1DNodeFamilyDestroy() argument
55 if (!*nf) PetscFunctionReturn(PETSC_SUCCESS); in Petsc1DNodeFamilyDestroy()
56 if (--(*nf)->refct > 0) { in Petsc1DNodeFamilyDestroy()
57 *nf = NULL; in Petsc1DNodeFamilyDestroy()
60 nc = (*nf)->nComputed; in Petsc1DNodeFamilyDestroy()
61 for (i = 0; i < nc; i++) PetscCall(PetscFree((*nf)->nodesets[i])); in Petsc1DNodeFamilyDestroy()
[all …]
/petsc/src/sys/classes/viewer/impls/glvis/
H A Dglvis.c128 PetscErrorCode PetscViewerGLVisSetFields(PetscViewer viewer, PetscInt nf, const char *fec_type[], P… in PetscViewerGLVisSetFields() argument
132 PetscValidLogicalCollectiveInt(viewer, nf, 2); in PetscViewerGLVisSetFields()
137 …scObject[], void *), PetscObject[], void *, PetscCtxDestroyFn *), (viewer, nf, fec_type, dim, g2l,… in PetscViewerGLVisSetFields()
/petsc/src/ksp/pc/impls/bddc/
H A Dbddc.c2587 PetscInt i, nf; in PCBDDCCreateFETIDPOperators_BDDC() local
2590 for (i = 0, nf = 0; i < pcbddc->n_ISForDofsLocal; i++) { in PCBDDCCreateFETIDPOperators_BDDC()
2593 PetscCall(MatISSubMatrixEmbedLocalIS(M, pcbddc->ISForDofsLocal[i], &split[nf])); in PCBDDCCreateFETIDPOperators_BDDC()
2594 PetscCall(ISGetSize(split[nf], &ns)); in PCBDDCCreateFETIDPOperators_BDDC()
2595 if (!ns) PetscCall(ISDestroy(&split[nf])); in PCBDDCCreateFETIDPOperators_BDDC()
2596 else nf++; in PCBDDCCreateFETIDPOperators_BDDC()
2598 PetscCall(PCBDDCSetDofsSplittingLocal(bddcipc_ctx->bddc, nf, split)); in PCBDDCCreateFETIDPOperators_BDDC()
2599 for (i = 0; i < nf; i++) PetscCall(ISDestroy(&split[i])); in PCBDDCCreateFETIDPOperators_BDDC()
/petsc/src/ksp/ksp/impls/fetidp/
H A Dfetidp.c559 PetscInt nf, i; in KSPFETIDPSetUpOperators() local
561 PetscCall(DMCreateFieldDecomposition(dm, &nf, NULL, &fields, NULL)); in KSPFETIDPSetUpOperators()
562 PetscCall(PCBDDCSetDofsSplitting(fetidp->innerbddc, nf, fields)); in KSPFETIDPSetUpOperators()
563 for (i = 0; i < nf; i++) PetscCall(ISDestroy(&fields[i])); in KSPFETIDPSetUpOperators()
/petsc/src/mat/impls/nest/
H A Dmatnest.c2027 PetscInt nf; in MatConvert_Nest_AIJ() local
2060 for (i = 0, nf = 0; i < nest->nr && fast; ++i) { in MatConvert_Nest_AIJ()
2066 if (f != nf || s != 1) { in MatConvert_Nest_AIJ()
2070 nf += f; in MatConvert_Nest_AIJ()
2074 for (i = 0, nf = 0; i < nest->nc && fast; ++i) { in MatConvert_Nest_AIJ()
2080 if (f != nf || s != 1) { in MatConvert_Nest_AIJ()
2084 nf += f; in MatConvert_Nest_AIJ()

12