| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex71.c | 114 PetscScalar *elemMat; member 127 options->elemMat = NULL; in ProcessOptions() 167 options->elemMat = elast_1D_emat; in ProcessOptions() 170 options->elemMat = elast_2D_emat; in ProcessOptions() 173 options->elemMat = elast_3D_emat; in ProcessOptions() 183 options->elemMat = poiss_1D_emat; in ProcessOptions() 186 options->elemMat = poiss_2D_emat; in ProcessOptions() 189 options->elemMat = poiss_3D_emat; in ProcessOptions() 322 PetscCall(MatSetValuesBlockedLocal(A, nen, idxs, nen, idxs, user.elemMat, ADD_VALUES)); in main() 325 PetscCall(MatSetValuesBlocked(A, nen, idxs, nen, idxs, user.elemMat, ADD_VALUES)); in main()
|
| /petsc/src/mat/tutorials/ |
| H A D | ex3.c | 29 PetscScalar elemMat[4] = {1.0, -1.0, -1.0, 1.0}; in main() local 48 PetscCall(MatSetValues(A, 2, globalIdx, 2, globalIdx, elemMat, ADD_VALUES)); in main()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexfem.c | 2940 PetscScalar *elemMat; in DMPlexComputeInterpolatorNested() local 3003 PetscCall(PetscMalloc1(rTotDim * cTotDim, &elemMat)); in DMPlexComputeInterpolatorNested() 3004 PetscCall(PetscArrayzero(elemMat, rTotDim * cTotDim)); in DMPlexComputeInterpolatorNested() 3066 …for (c = 0; c < Nc; ++c) elemMat[(offsetI + i) * cTotDim + offsetJ + j] += T->T[0][k * cpdim * NcJ… in DMPlexComputeInterpolatorNested() 3087 …for (c = 0; c < Nc; ++c) elemMat[(offsetI + i) * cTotDim + offsetJ + j] += 1.0 * qweights[p * qNc … in DMPlexComputeInterpolatorNested() 3098 if (mesh->printFEM > 1) PetscCall(DMPrintCellMatrix(0, name, rTotDim, cTotDim, elemMat)); in DMPlexComputeInterpolatorNested() 3132 …ined(dmf, fsection, fglobalSection, dmc, csection, cglobalSection, In, c, elemMat, INSERT_VALUES)); in DMPlexComputeInterpolatorNested() 3134 …lSection, PETSC_FALSE, dmc, csection, cglobalSection, PETSC_FALSE, In, c, elemMat, INSERT_VALUES)); in DMPlexComputeInterpolatorNested() 3139 PetscCall(PetscFree(elemMat)); in DMPlexComputeInterpolatorNested() 3182 PetscScalar *elemMat; in DMPlexComputeInterpolatorGeneral() local [all …]
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarm.c | 478 PetscScalar *elemMat; in DMSwarmComputeMassMatrix_Private() local 577 PetscCall(PetscMalloc3(maxC * totNc * totDim, &elemMat, maxC * totNc, &rowIDXs, maxC * dim, &xi)); in DMSwarmComputeMassMatrix_Private() 611 PetscCall(PetscArrayzero(elemMat, numCIndices * Nc * totDim)); in DMSwarmComputeMassMatrix_Private() 617 …elemMat[(j * totNc + c) * numFIndices + i * Nc + c] += Tcoarse->T[0][(j * numFIndices + i * Nc + c… in DMSwarmComputeMassMatrix_Private() 624 if (0) PetscCall(DMPrintCellMatrix(cell, name, numCIndices * Nc, numFIndices, elemMat)); in DMSwarmComputeMassMatrix_Private() 625 …PetscCall(MatSetValues(mass, numCIndices * Nc, rowIDXs, numFIndices, findices, elemMat, ADD_VALUES… in DMSwarmComputeMassMatrix_Private() 632 PetscCall(PetscFree3(elemMat, rowIDXs, xi)); in DMSwarmComputeMassMatrix_Private() 701 PetscScalar *elemMat, *elemMatSq; in DMSwarmComputeMassMatrixSquare_Private() local 797 …PetscCall(PetscMalloc4(maxC * totDim, &elemMat, maxC * maxC, &elemMatSq, maxC, &rowIDXs, maxC * cd… in DMSwarmComputeMassMatrixSquare_Private() 836 PetscCall(PetscArrayzero(elemMat, numCIndices * totDim)); in DMSwarmComputeMassMatrixSquare_Private() [all …]
|
| /petsc/src/dm/dt/fe/interface/ |
| H A D | fe.c | 1601 …dsAux, const PetscScalar coefficientsAux[], PetscReal t, PetscReal u_tshift, PetscScalar elemMat[]) in PetscFEIntegrateJacobian() argument 1611 …type, key, Ne, cgeom, coefficients, coefficients_t, dsAux, coefficientsAux, t, u_tshift, elemMat)); in PetscFEIntegrateJacobian() 1653 …obAux, const PetscScalar coefficientsAux[], PetscReal t, PetscReal u_tshift, PetscScalar elemMat[]) in PetscFEIntegrateBdJacobian() argument 1662 …pe, key, Ne, fgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat)); in PetscFEIntegrateBdJacobian() 1706 …obAux, const PetscScalar coefficientsAux[], PetscReal t, PetscReal u_tshift, PetscScalar elemMat[]) in PetscFEIntegrateHybridJacobian() argument 1715 …, Ne, fgeom, cgeom, coefficients, coefficients_t, probAux, coefficientsAux, t, u_tshift, elemMat)); in PetscFEIntegrateHybridJacobian() 2600 elemMat[(offsetI + f) * totDim + (offsetJ + g)] += s * tBIv; \ 2618 elemMat[(offsetI + f) * totDim + (offsetJ + g)] += s * tBJv; \ 2638 elemMat[(offsetI + f) * totDim + (offsetJ + g)] += s; \ 2645 …const PetscScalar g3[], PetscInt totDim, PetscInt offsetI, PetscInt offsetJ, PetscScalar elemMat[]) in PetscFEUpdateElementMat_Internal() argument [all …]
|
| /petsc/src/dm/dt/fe/impls/basic/ |
| H A D | febasic.c | 743 …dsAux, const PetscScalar coefficientsAux[], PetscReal t, PetscReal u_tshift, PetscScalar elemMat[]) in PetscFEIntegrateJacobian_Basic() argument 873 …J], testReal, testDerReal, &fegeom, g0, g1, g2, g3, ctotDim, offsetI, offsetJ, elemMat + eOffset)); in PetscFEIntegrateJacobian_Basic() 881 …" PetscInt_FMT ", %" PetscInt_FMT "]: %g\n", f, g, (double)PetscRealPart(elemMat[eOffset + i * cto… in PetscFEIntegrateJacobian_Basic() 893 …dsAux, const PetscScalar coefficientsAux[], PetscReal t, PetscReal u_tshift, PetscScalar elemMat[]) in PetscFEIntegrateBdJacobian_Basic() argument 1033 …ldJ], testReal, testDerReal, &cgeom, g0, g1, g2, g3, totDim, offsetI, offsetJ, elemMat + eOffset)); in PetscFEIntegrateBdJacobian_Basic() 1045 …Int_FMT ",%" PetscInt_FMT "]: %g\n", f, fc, g, gc, (double)PetscRealPart(elemMat[eOffset + i * tot… in PetscFEIntegrateBdJacobian_Basic() 1059 …dsAux, const PetscScalar coefficientsAux[], PetscReal t, PetscReal u_tshift, PetscScalar elemMat[]) in PetscFEIntegrateHybridJacobian_Basic() argument 1204 …ldJ], testReal, testDerReal, &fegeom, g0, g1, g2, g3, eOffset, totDim, offsetI, offsetJ, elemMat)); in PetscFEIntegrateHybridJacobian_Basic() 1206 …ldJ], testReal, testDerReal, &fegeom, g0, g1, g2, g3, eOffset, totDim, offsetI, offsetJ, elemMat)); in PetscFEIntegrateHybridJacobian_Basic() 1207 …m], &g2[NcI * NcJ * dim], &g3[NcI * NcJ * dim * dim], eOffset, totDim, offsetI, offsetJ, elemMat)); in PetscFEIntegrateHybridJacobian_Basic() [all …]
|
| /petsc/src/ts/utils/dmplexlandau/ |
| H A D | plexland.c | 325 PetscScalar *elemMat; in LandauFormJacobian_Internal() local 327 PetscCall(PetscMalloc1(elemMatSize, &elemMat)); in LandauFormJacobian_Internal() 328 PetscCall(PetscMemzero(elemMat, elemMatSize * sizeof(*elemMat))); in LandauFormJacobian_Internal() 454 elemMat[fOff] += DIq[f * dim + d] * g2[fieldA][d] * BJq[g]; in LandauFormJacobian_Internal() 455 …for (d2 = 0; d2 < dim; ++d2) elemMat[fOff] += DIq[f * dim + d] * g3[fieldA][d][d2] * DIq[g * dim +… in LandauFormJacobian_Internal() 458 elemMat[fOff] += BJq[f] * g0[fieldA] * BJq[g]; in LandauFormJacobian_Internal() 479 …rid], globsection[grid], subJ[LAND_PACK_IDX(b_id, grid)], loc_elem + cStart, elemMat, ADD_VALUES)); in LandauFormJacobian_Internal() 519 const PetscScalar Aij = elemMat[i * totDim + j]; in LandauFormJacobian_Internal() 541 …; ++f) PetscCall(PetscPrintf(ctx->comm, " %12.5e", (double)PetscRealPart(elemMat[d * totDim + f]))… in LandauFormJacobian_Internal() 546 PetscCall(PetscFree(elemMat)); in LandauFormJacobian_Internal()
|