Home
last modified time | relevance | path

Searched refs:Nc (Results 1 – 25 of 137) sorted by relevance

123456

/petsc/src/ksp/pc/impls/mg/
H A Dmgadapt.c4 static PetscErrorCode xfunc(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nc, Pe… in xfunc() argument
8 for (c = 0; c < Nc; ++c) u[c] = PetscPowRealInt(coords[0], k); in xfunc()
11 static PetscErrorCode yfunc(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nc, Pe… in yfunc() argument
15 for (c = 0; c < Nc; ++c) u[c] = PetscPowRealInt(coords[1], k); in yfunc()
18 static PetscErrorCode zfunc(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nc, Pe… in zfunc() argument
22 for (c = 0; c < Nc; ++c) u[c] = PetscPowRealInt(coords[2], k); in zfunc()
25 static PetscErrorCode xsin(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nc, Pet… in xsin() argument
29 for (c = 0; c < Nc; ++c) u[c] = PetscSinReal(PETSC_PI * (k + 1) * coords[0]); in xsin()
32 static PetscErrorCode ysin(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nc, Pet… in ysin() argument
36 for (c = 0; c < Nc; ++c) u[c] = PetscSinReal(PETSC_PI * (k + 1) * coords[1]); in ysin()
[all …]
/petsc/src/dm/dt/dualspace/interface/
H A Ddualspace.c186 …" PetscInt_FMT "\n", PetscAbsInt(sp->k), sp->k < 0 ? "(stored in dual form) " : "", sp->Nc, pdim)); in PetscDualSpaceView_ASCII()
188 …Printf(v, "Dual space with %" PetscInt_FMT " components, size %" PetscInt_FMT "\n", sp->Nc, pdim)); in PetscDualSpaceView_ASCII()
308 …ponents", "The number of components", "PetscDualSpaceSetNumComponents", sp->Nc, &sp->Nc, NULL, 1)); in PetscDualSpaceSetFromOptions()
454 s->Nc = 1; in PetscDualSpaceCreate()
498 (*spNew)->Nc = sp->Nc; in PetscDualSpaceDuplicate()
616 PetscErrorCode PetscDualSpaceGetNumComponents(PetscDualSpace sp, PetscInt *Nc) in PetscDualSpaceGetNumComponents() argument
620 PetscAssertPointer(Nc, 2); in PetscDualSpaceGetNumComponents()
621 *Nc = sp->Nc; in PetscDualSpaceGetNumComponents()
636 PetscErrorCode PetscDualSpaceSetNumComponents(PetscDualSpace sp, PetscInt Nc) in PetscDualSpaceSetNumComponents() argument
641 sp->Nc = Nc; in PetscDualSpaceSetNumComponents()
[all …]
/petsc/src/snes/tests/
H A Dex8.c131 PetscInt Nc; /* Number of field components */ member
149 PetscErrorCode constant(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nc, PetscS… in constant() argument
154 if (Nc > 1) { in constant()
155 for (d = 0; d < Nc; ++d) u[d] = user->constants[d]; in constant()
161 …m, PetscReal time, const PetscReal coords[], const PetscReal n[], PetscInt Nc, PetscScalar *u, Pet… in constantDer() argument
166 if (Nc > 1) { in constantDer()
167 for (d = 0; d < Nc; ++d) u[d] = 0.0; in constantDer()
175 PetscErrorCode linear(PetscInt dim, PetscReal time, const PetscReal coords[], PetscInt Nc, PetscSca… in linear() argument
180 if (Nc > 1) { in linear()
181 for (d = 0; d < Nc; ++d) u[d] = coords[d]; in linear()
[all …]
H A Dex2.c25 static PetscErrorCode constant(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, Pets… in constant() argument
28 for (PetscInt c = 0; c < Nc; ++c) u[c] = c + 1.; in constant()
32 static PetscErrorCode linear(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, PetscS… in linear() argument
35 …PetscCheck(Nc == 3, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Something is wrong: %" PetscInt_FMT, Nc in linear()
36 for (PetscInt c = 0; c < Nc; ++c) { in linear()
225 static PetscErrorCode CreateDiscretization(DM dm, PetscInt Nc, AppCtx *ctx) in CreateDiscretization() argument
235 PetscCall(PetscFVSetNumComponents(fv, Nc)); in CreateDiscretization()
249 PetscCall(PetscFECreateByCell(PetscObjectComm((PetscObject)dm), dim, Nc, ct, NULL, -1, &fe)); in CreateDiscretization()
268 PetscInt dim, spaceDim, Nc, c, Np, p; in main() local
291 Nc = dim; in main()
[all …]
/petsc/src/dm/interface/
H A Ddmperiodicity.c339 …PetscInt Nc, vStart, vEnd, sStart, sEnd, newStart = PETSC_INT_MAX, newEnd = PETSC_INT_MIN,… in DMLocalizeCoordinates() local
378 PetscCall(PetscSectionGetFieldComponents(cs, 0, &Nc)); in DMLocalizeCoordinates()
379 PetscCall(PetscSectionSetFieldComponents(csDG, 0, Nc)); in DMLocalizeCoordinates()
381 …tscCheck(bs == Nc, comm, PETSC_ERR_ARG_INCOMP, "Coordinate block size %" PetscInt_FMT " != %" Pets… in DMLocalizeCoordinates()
383 PetscCall(DMGetWorkArray(dm, 2 * Nc, MPIU_SCALAR, &anchor)); in DMLocalizeCoordinates()
384 localized = &anchor[Nc]; in DMLocalizeCoordinates()
396Nc), comm, PETSC_ERR_ARG_INCOMP, "Coordinate size on cell %" PetscInt_FMT " closure %" PetscInt_FM… in DMLocalizeCoordinates()
397 for (d = 0; d < Nc; ++d) anchor[d] = cellCoords[d]; in DMLocalizeCoordinates()
398 for (p = 0; p < dof / Nc; ++p) { in DMLocalizeCoordinates()
399 PetscCall(DMLocalizeCoordinate_Internal(dm, Nc, anchor, &cellCoords[p * Nc], localized)); in DMLocalizeCoordinates()
[all …]
/petsc/src/dm/impls/plex/tests/
H A Dex47.c380 PetscInt Nc = 0; in main() local
409 Nc = sNLoclCells2x5Mesh; //Same on each rank for this example... in main()
418 PetscCall(PetscMalloc1(Nc * Ncor, &cells)); in main()
419 for (c = 0; c < Nc; ++c) { in main()
425 … PetscCall(DMPlexBuildFromCellListParallel(dm, Nc, PETSC_DECIDE, Nv, Ncor, cells, &sfVert, NULL)); in main()
427 Nc = sNLoclCellsMixedTQMesh; //Same on each rank for this example... in main()
438 PetscInt vStart = 0, vEnd = Nc; in main()
444 PetscCall(PetscMalloc1(Nc * NcorMax, &cells)); in main()
446 for (c = 0; c < Nc; ++c) { in main()
459 … PetscCall(DMPlexBuildFromCellSectionParallel(dm, Nc, PETSC_DECIDE, Nv, s, cells, &sfVert, NULL)); in main()
[all …]
H A Dex49.c101 PetscInt *offsets, Ncell, Ncl, Nc, n; in CheckOffsets() local
103 …PetscCall(DMPlexGetLocalOffsets(dm, domain_label, label_value, height, f, &Ncell, &Ncl, &Nc, &n, &… in CheckOffsets()
111 PetscInt *offsets, *offsetsNeg, *offsetsPos, Nface, Nc, n, i = 0; in CheckOffsets() local
113 …PetscCall(DMPlexGetLocalOffsetsSupport(dm, domain_label, label_value, &Nface, &Nc, &n, &offsetsNeg… in CheckOffsets()
114 PetscCall(PetscMalloc1(Nface * Nc * 2, &offsets)); in CheckOffsets()
116 for (PetscInt c = 0; c < Nc; ++c) offsets[i++] = offsetsNeg[f] + c; in CheckOffsets()
117 for (PetscInt c = 0; c < Nc; ++c) offsets[i++] = offsetsPos[f] + c; in CheckOffsets()
119 …scCheck(i == Nface * Nc * 2, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Total offsets %" PetscInt_FMT " … in CheckOffsets()
122 … PetscCall(ISCreateGeneral(PETSC_COMM_SELF, Nface * Nc * 2, offsets, PETSC_OWN_POINTER, &offIS)); in CheckOffsets()
138 PetscInt cdim, *offsets, Ncell, Ncl, Nc, n; in CheckOffsets() local
[all …]
/petsc/src/dm/dt/tests/
H A Dex5.c13 PetscInt dim = 2, Nc = 3, cStart, cEnd; in main() local
23 …PetscCall(PetscOptionsBoundedInt("-num_comp", "Number of components in space", "ex5.c", Nc, &Nc, N… in main()
26 PetscCall(PetscFECreateDefault(comm, dim, Nc, simplex, NULL, PETSC_DEFAULT, &fe)); in main()
30 PetscCall(PetscSpaceGetNumComponents(space, &Nc)); in main()
60 PetscCall(PetscMalloc4(dim - 1, &testSub, dim, &testFull, Nc, &outSub, Nc, &outFull)); in main()
88 for (i = 0; i < Nc; i++) { in main()
90 for (j = 0; j < nSub; j++) outSub[i] += Tsub->T[0][j * Nc + i] * arraySub[j]; in main()
94 for (i = 0; i < Nc; i++) { in main()
98 for (j = 0; j < nFull; j++) outFull[i] += Tfull->T[0][j * Nc + i] * arrayFull[j]; in main()
/petsc/include/petsc/private/
H A Dpetscfeimpl.h41 PetscInt Nc; /* The number of components */ member
110 PetscInt Nc; /* The number of components */ member
305 const PetscInt Nc = T->Nc; in PetscFEInterpolate_Static() local
306 for (PetscInt fc = 0; fc < Nc; ++fc) { in PetscFEInterpolate_Static()
308 for (PetscInt f = 0; f < Nb; ++f) interpolant[fc] += x[f] * basis[(q * Nb + f) * Nc + fc]; in PetscFEInterpolate_Static()
323 const PetscInt Nc = T->Nc; in PetscFEInterpolateAtPoints_Static() local
324 for (fc = 0; fc < Nc; ++fc) { in PetscFEInterpolateAtPoints_Static()
326 for (f = 0; f < Nb; ++f) interpolant[fc] += x[f] * basis[(q * Nb + f) * Nc + fc]; in PetscFEInterpolateAtPoints_Static()
344 const PetscInt Nc = T->Nc; in PetscFEInterpolateGradient_Static() local
348 for (fc = 0; fc < Nc; ++fc) { in PetscFEInterpolateGradient_Static()
[all …]
/petsc/src/dm/dt/interface/ftn-custom/
H A Dzdtf90.c14 PETSC_EXTERN void petscquadraturegetdata_(PetscQuadrature *q, PetscInt *dim, PetscInt *Nc, PetscInt… in petscquadraturegetdata_() argument
18 *ierr = PetscQuadratureGetData(*q, dim, Nc, npoints, &points, &weights); in petscquadraturegetdata_()
22 …*ierr = F90Array1dCreate((void *)weights, MPIU_REAL, 1, (*npoints) * (*Nc), ptrW PETSC_F90_2PTR_PA… in petscquadraturegetdata_()
25 PETSC_EXTERN void petscquadraturerestoredata_(PetscQuadrature *q, PetscInt *dim, PetscInt *Nc, Pets… in petscquadraturerestoredata_() argument
32 PETSC_EXTERN void petscquadraturesetdata_(PetscQuadrature *q, PetscInt *dim, PetscInt *Nc, PetscInt… in petscquadraturesetdata_() argument
40 *ierr = PetscQuadratureSetData(*q, *dim, *Nc, *npoints, points, weights); in petscquadraturesetdata_()
/petsc/src/dm/field/impls/shell/
H A Ddmfieldshell.c37 PetscInt dimC, dim, numPoints, Nq, p, Nc; in DMFieldShellEvaluateFEDefault() local
41 Nc = field->numComponents; in DMFieldShellEvaluateFEDefault()
58 for (q = 0; q < Nc; q++) { in DMFieldShellEvaluateFEDefault()
63 for (i = 0; i < dimC; i++) d[i] = sD[(p * Nc + q) * dimC + i]; in DMFieldShellEvaluateFEDefault()
64 for (i = 0; i < dimC; i++) sD[(p * Nc + q) * dimC + i] = 0.; in DMFieldShellEvaluateFEDefault()
66 …for (j = 0; j < dimC; j++) sD[(p * Nc + q) * dimC + i] += geom->J[(p * dimC + j) * dimC + i] * d[j… in DMFieldShellEvaluateFEDefault()
75 for (q = 0; q < Nc; q++) { in DMFieldShellEvaluateFEDefault()
80 for (i = 0; i < dimC; i++) d[i] = rD[(p * Nc + q) * dimC + i]; in DMFieldShellEvaluateFEDefault()
81 for (i = 0; i < dimC; i++) rD[(p * Nc + q) * dimC + i] = 0.; in DMFieldShellEvaluateFEDefault()
83 …for (j = 0; j < dimC; j++) rD[(p * Nc + q) * dimC + i] += geom->J[(p * dimC + j) * dimC + i] * d[j… in DMFieldShellEvaluateFEDefault()
[all …]
/petsc/src/dm/dt/space/impls/tensor/
H A Dspacetensor.c31 PetscInt Ns, Nc, i, Nv, deg; in PetscSpaceSetFromOptions_Tensor() local
37 PetscCall(PetscSpaceGetNumComponents(sp, &Nc)); in PetscSpaceSetFromOptions_Tensor()
68 Ncs = (PetscInt)PetscPowReal((PetscReal)Nc, 1. / Ns); in PetscSpaceSetFromOptions_Tensor()
69Nc % PetscPowInt(Ncs, Ns) == 0, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_WRONG, "Cannot use… in PetscSpaceSetFromOptions_Tensor()
133 PetscInt Nc, Nv, Ns; in PetscSpaceSetUp_Tensor() local
141 PetscCall(PetscSpaceGetNumComponents(sp, &Nc)); in PetscSpaceSetUp_Tensor()
168 Ncs = (PetscInt)(PetscPowReal((PetscReal)Nc, 1. / Ns)); in PetscSpaceSetUp_Tensor()
169Nc % PetscPowInt(Ncs, Ns) == 0, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_WRONG, "Cannot use… in PetscSpaceSetUp_Tensor()
198Nc % Ncprod == 0, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_WRONG, "Product of subspace comp… in PetscSpaceSetUp_Tensor()
200 if (Ncprod != Nc) { in PetscSpaceSetUp_Tensor()
[all …]
/petsc/src/dm/dt/fe/tests/
H A Dex3.c14 const PetscInt Nc = uOff[1] - uOff[0]; in constant() local
15 for (PetscInt c = 0; c < Nc; ++c) f0[c] += 5.; in constant()
20 const PetscInt Nc = uOff[1] - uOff[0]; in linear() local
21 for (PetscInt c = 0; c < Nc; ++c) f0[c] += 5. * x[c]; in linear()
26 const PetscInt Nc = uOff[1] - uOff[0]; in quadratic() local
27 for (PetscInt c = 0; c < Nc; ++c) f0[c] += 5. * x[c] * x[c]; in quadratic()
32 const PetscInt Nc = uOff[1] - uOff[0]; in trig() local
33 for (PetscInt c = 0; c < Nc; ++c) f0[c] += PetscCosReal(2. * PETSC_PI * x[c]); in trig()
85 static PetscErrorCode exactSolution(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc,… in exactSolution() argument
88 PetscInt uOff[2] = {0, Nc}; in exactSolution()
[all …]
/petsc/src/dm/dt/space/interface/
H A Dspace.c160 …T " variables with %" PetscInt_FMT " components, size %" PetscInt_FMT "\n", sp->Nv, sp->Nc, pdim)); in PetscSpaceView()
210 …components", "The number of components", "PetscSpaceSetNumComponents", sp->Nc, &sp->Nc, NULL, -1)); in PetscSpaceSetFromOptions()
296 s->Nc = 1; in PetscSpaceCreate()
391 PetscErrorCode PetscSpaceGetNumComponents(PetscSpace sp, PetscInt *Nc) in PetscSpaceGetNumComponents() argument
395 PetscAssertPointer(Nc, 2); in PetscSpaceGetNumComponents()
396 *Nc = sp->Nc; in PetscSpaceGetNumComponents()
411 PetscErrorCode PetscSpaceSetNumComponents(PetscSpace sp, PetscInt Nc) in PetscSpaceSetNumComponents() argument
415 sp->Nc = Nc; in PetscSpaceSetNumComponents()
/petsc/src/snes/tutorials/
H A Dex62.c56 const PetscInt Nc = uOff[1] - uOff[0]; in f1_u() local
59 for (c = 0; c < Nc; ++c) { in f1_u()
86 const PetscInt Nc = uOff[1] - uOff[0]; in g3_uu() local
89 for (c = 0; c < Nc; ++c) { in g3_uu()
91 g3[((c * Nc + c) * dim + d) * dim + d] += mu; /* < \nabla v, \nabla u > */ in g3_uu()
92 g3[((c * Nc + d) * dim + d) * dim + c] += mu; /* < \nabla v, {\nabla u}^T > */ in g3_uu()
135 static PetscErrorCode quadratic_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, P… in quadratic_u() argument
140 for (c = 1; c < Nc; ++c) { in quadratic_u()
147 static PetscErrorCode quadratic_p(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, P… in quadratic_p() argument
196 static PetscErrorCode trig_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, PetscS… in trig_u() argument
[all …]
H A Dex17.c59 static PetscErrorCode zero(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, PetscSca… in zero() argument
66 static PetscErrorCode ge_shift(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, Pets… in ge_shift() argument
74 static PetscErrorCode quadratic_2d_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc in quadratic_2d_u() argument
81 static PetscErrorCode quadratic_3d_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc in quadratic_3d_u() argument
147 static PetscErrorCode trig_2d_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, Pet… in trig_2d_u() argument
154 static PetscErrorCode trig_3d_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, Pet… in trig_3d_u() argument
208 static PetscErrorCode axial_disp_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, … in axial_disp_u() argument
262 …iform_strain_u(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, PetscScalar *u, Pet… in uniform_strain_u() argument
277 const PetscInt Nc = dim; in f0_mass_u() local
280 for (c = 0; c < Nc; ++c) f0[c] = u[c]; in f0_mass_u()
[all …]
/petsc/src/dm/impls/plex/
H A Dplexply.c28 int snum, Nv, Nc; in DMPlexCreatePLYFromFile() local
114 snum = sscanf(line, "%d", &Nc); in DMPlexCreatePLYFromFile()
128 Nc = Nv = 0; in DMPlexCreatePLYFromFile()
132 PetscCall(DMPlexSetChart(*dm, 0, Nc + Nv)); in DMPlexCreatePLYFromFile()
139 PetscCall(PetscSectionSetChart(coordSection, Nc, Nc + Nv)); in DMPlexCreatePLYFromFile()
140 for (v = Nc; v < Nc + Nv; ++v) { in DMPlexCreatePLYFromFile()
184 for (c = 0; c < Nc; ++c) PetscCall(DMPlexSetConeSize(*dm, c, corners)); in DMPlexCreatePLYFromFile()
186 for (c = 0; c < Nc; ++c) { in DMPlexCreatePLYFromFile()
191 for (v = 0; v < ibuf[0]; ++v) vbuf[v] += Nc; in DMPlexCreatePLYFromFile()
/petsc/src/dm/dt/fe/interface/
H A Dfe.c644 PetscInt Nc, qNc; in PetscFESetQuadrature() local
649 PetscCall(PetscFEGetNumComponents(fem, &Nc)); in PetscFESetQuadrature()
651Nc != qNc), PetscObjectComm((PetscObject)fem), PETSC_ERR_ARG_SIZ, "FE components %" PetscInt_FMT "… in PetscFESetQuadrature()
702 PetscInt Nc, qNc; in PetscFESetFaceQuadrature() local
707 PetscCall(PetscFEGetNumComponents(fem, &Nc)); in PetscFESetFaceQuadrature()
709Nc != qNc), PetscObjectComm((PetscObject)fem), PETSC_ERR_ARG_SIZ, "FE components %" PetscInt_FMT "… in PetscFESetFaceQuadrature()
814 PetscInt dim, cStart, Nf, Nc, Np, order; in PetscFEExpandFaceQuadrature() local
823 PetscCall(PetscQuadratureGetData(fq, NULL, &Nc, &Np, &points, &weights)); in PetscFEExpandFaceQuadrature()
825 PetscCall(PetscMalloc1(Nf * Np * Nc, &faceWeights)); in PetscFEExpandFaceQuadrature()
833 for (PetscInt c = 0; c < Nc; ++c) faceWeights[(f * Np + q) * Nc + c] = weights[q * Nc + c]; in PetscFEExpandFaceQuadrature()
[all …]
/petsc/src/dm/field/impls/ds/
H A Ddmfieldds.c86 …tClosure_Internal(DMField field, PetscInt cell, PetscBool *isDG, PetscInt *Nc, const PetscScalar *… in DMFieldGetClosure_Internal() argument
96 *Nc = 0; in DMFieldGetClosure_Internal()
106 PetscCall(PetscSectionGetDof(s, cell, Nc)); in DMFieldGetClosure_Internal()
107 if (!*Nc) goto cg; in DMFieldGetClosure_Internal()
113 PetscCall(DMGetWorkArray(fdm, *Nc, MPIU_SCALAR, values)); in DMFieldGetClosure_Internal()
114 PetscCall(PetscArraycpy(*values, cvalues, *Nc)); in DMFieldGetClosure_Internal()
123 PetscCall(DMPlexVecGetClosure(fdm, s, dsfield->vec, cell, Nc, values)); in DMFieldGetClosure_Internal()
127 …eClosure_Internal(DMField field, PetscInt cell, PetscBool *isDG, PetscInt *Nc, const PetscScalar *… in DMFieldRestoreClosure_Internal() argument
135 PetscCall(DMRestoreWorkArray(dsfield->dmDG, *Nc, MPIU_SCALAR, values)); in DMFieldRestoreClosure_Internal()
139 PetscCall(DMPlexVecRestoreClosure(fdm, s, dsfield->vec, cell, Nc, values)); in DMFieldRestoreClosure_Internal()
[all …]
/petsc/src/dm/impls/plex/tutorials/
H A Dex6.c7 PetscInt *Nc; /* Number of components per field */ member
18 options->Nc = NULL; in ProcessOptions()
25 PetscCall(PetscMalloc1(len, &options->Nc)); in ProcessOptions()
26 …tArray("-num_components", "The number of components per field", "ex6.c", options->Nc, &len, &flg)); in ProcessOptions()
54 …for (c = 0; c < user->Nc[f]; ++c) closure[o++] = ((kj + joff) * (Ni * user->k[f] + 1) + ki + ioff)… in LoadData2D()
84 … 0; c < user->Nc[f]; ++c) closure[o++] = (((kk + koff) * (Nj * user->k[f] + 1) + kj + joff) * (Ni … in LoadData3D()
136 for (c = 0; c < user->Nc[f]; ++c) { in ReadData2D()
138 …, "%2.0f", (double)PetscRealPart(closure[(kj * (user->k[f] + 1) + ki) * user->Nc[f] + c + foff]))); in ReadData2D()
170 for (c = 0; c < user->Nc[f]; ++c) { in ReadData3D()
172 …alPart(closure[((kk * (user->k[f] + 1) + kj) * (user->k[f] + 1) + ki) * user->Nc[f] + c + foff]))); in ReadData3D()
[all …]
/petsc/src/dm/dt/space/impls/sum/
H A Dspacesum.c230 PetscInt Ns, Nc, Nv, deg, i; in PetscSpaceSetFromOptions_Sum() local
237 PetscCall(PetscSpaceGetNumComponents(sp, &Nc)); in PetscSpaceSetFromOptions_Sum()
277 PetscInt Nv, Ns, Nc, i, sum_Nc = 0, deg = PETSC_INT_MAX, maxDeg = PETSC_INT_MIN; in PetscSpaceSetUp_Sum() local
284 PetscCall(PetscSpaceGetNumComponents(sp, &Nc)); in PetscSpaceSetUp_Sum()
307 minNc = Nc; in PetscSpaceSetUp_Sum()
308 maxNc = Nc; in PetscSpaceSetUp_Sum()
318 if (i == 0 && sNc == Nc) concatenate = PETSC_FALSE; in PetscSpaceSetUp_Sum()
328Nc, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_OUTOFRANGE, "Total number of subspace componen… in PetscSpaceSetUp_Sum()
329 …else PetscCheck(minNc == Nc && maxNc == Nc, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_OUTOFR… in PetscSpaceSetUp_Sum()
422 PetscInt Nc = sp->Nc, Nv = sp->Nv, Ns = sum->numSumSpaces; in PetscSpaceEvaluate_Sum() local
[all …]
/petsc/src/ksp/ksp/utils/dm/
H A Ddmproject.c231 PetscInt debug = 0, rStart, rEnd, r, maxcols = 0, k, Nc, ldac, ldaf; in DMAdaptInterpolator() local
237 PetscCall(MatGetSize(MF, NULL, &Nc)); in DMAdaptInterpolator()
251Nc < maxcols) PetscCall(PetscPrintf(PETSC_COMM_SELF, "The number of input vectors %" PetscInt_FMT … in DMAdaptInterpolator()
252 for (k = 0; k < Nc && debug; ++k) { in DMAdaptInterpolator()
272 …PetscCall(PetscBLASIntCast(3 * PetscMin(Nc, maxcols) + PetscMax(2 * PetscMin(Nc, maxcols), PetscMa… in DMAdaptInterpolator()
273 …Call(PetscMalloc7(Nc * maxcols, &A, PetscMax(Nc, maxcols), &b, Nc, &w, maxcols, &x, maxcols, &sing… in DMAdaptInterpolator()
278 for (k = 0; k < Nc; ++k) { in DMAdaptInterpolator()
316 for (k = 0; k < Nc; ++k) { in DMAdaptInterpolator()
326 A[c * Nc + k] = wk * ac[cols[c] - rStart + k * ldac]; in DMAdaptInterpolator()
329 PetscCall(PetscBLASIntCast(Nc, &M)); in DMAdaptInterpolator()
[all …]
/petsc/src/dm/dt/fv/interface/ceed/
H A Dfvceed.c48 PetscInt dim, Nc, ord; in PetscFVGetCeedBasis() local
55 PetscCall(PetscFVGetNumComponents(fv, &Nc)); in PetscFVGetCeedBasis()
58 …PetscCallCEED(CeedBasisCreateTensorH1Lagrange(fv->ceed, dim, Nc, 1, (ord + 1) / 2, CEED_GAUSS, &fv… in PetscFVGetCeedBasis()
/petsc/src/dm/dt/fe/interface/ceed/
H A Dfeceed.c49 PetscInt dim, Nc, deg, ord; in PetscFEGetCeedBasis() local
56 PetscCall(PetscFEGetNumComponents(fe, &Nc)); in PetscFEGetCeedBasis()
61 …PetscCallCEED(CeedBasisCreateTensorH1Lagrange(fe->ceed, dim, Nc, deg + 1, (ord + 1) / 2, CEED_GAUS… in PetscFEGetCeedBasis()
/petsc/src/dm/dt/fv/interface/
H A Dfv.c1487 PetscInt dim, Nc; in PetscFVCreateDualSpace() local
1491 PetscCall(PetscFVGetNumComponents(fvm, &Nc)); in PetscFVCreateDualSpace()
1495 PetscCall(PetscDualSpaceSetNumComponents(fvm->dualSpace, Nc)); in PetscFVCreateDualSpace()
1498 PetscCall(PetscDualSpaceSimpleSetDimension(fvm->dualSpace, Nc)); in PetscFVCreateDualSpace()
1500 for (PetscInt c = 0; c < Nc; ++c) { in PetscFVCreateDualSpace()
1506 PetscCall(PetscCalloc1(Nc, &weights)); in PetscFVCreateDualSpace()
1508 PetscCall(PetscQuadratureSetData(qc, dim, Nc, 1, points, weights)); in PetscFVCreateDualSpace()
1642 PetscInt Nc; // Field components in PetscFVCreateTabulation() local
1654 PetscCall(PetscFVGetNumComponents(fvm, &Nc)); in PetscFVCreateTabulation()
1655 pdim = Nc; in PetscFVCreateTabulation()
[all …]

123456