Lines Matching full:n

17 …ctor space themselves, Alt^k V.  The dimension of Alt^k V, if V is N dimensional, is N choose k.  …
18 shows that for an N dimensional space, only 0 <= k <= N are valid form degrees.)
19 …scDTAltV, has one basis k-form for each ordered subset of k coordinates of the N dimensional space:
27 …If j + k <= N, then a j-form f and a k-form g can be multiplied to create a (j+k)-form using the w…
43 …When there is a linear map L: V -> W from an N dimensional vector space to an M dimensional vector…
47 …Alt^k V and Alt^(N-k) V have the same dimension, and the Hodge star operator maps between them. W…
58 …PetscDTAltVApply - Apply an a k-form (an alternating k-linear map) to a set of k N-dimensional vec…
61 + N - the dimension of the vector space, N >= 0
62 . k - the degree k of the k-form w, 0 <= k <= N
63 . w - a k-form, size [N choose k] (each degree of freedom of a k-form is associated with a subset o…
65 - v - a set of k vectors of size N, size [k x N], each vector stored contiguously
75 PetscErrorCode PetscDTAltVApply(PetscInt N, PetscInt k, const PetscReal *w, const PetscReal *v, Pet… in PetscDTAltVApply() argument
78 PetscCheck(N >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid dimension"); in PetscDTAltVApply()
79 PetscCheck(k >= 0 && k <= N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid form degree"); in PetscDTAltVApply()
80 if (N <= 3) { in PetscDTAltVApply()
84 if (N == 1) { in PetscDTAltVApply()
86 } else if (N == 2) { in PetscDTAltVApply()
109 PetscCall(PetscDTBinomialInt(N, k, &Nk)); in PetscDTAltVApply()
114 PetscCall(PetscDTEnumSubset(N, k, i, subset)); in PetscDTAltVApply()
121 for (l = 0; l < k; l++) prod *= v[perm[l] * N + subset[l]]; in PetscDTAltVApply()
136 + N - the dimension of the vector space, N >= 0
137 . j - the degree j of the j-form a, 0 <= j <= N
138 . k - the degree k of the k-form b, 0 <= k <= N and 0 <= j+k <= N
139 . a - a j-form, size [N choose j]
140 - b - a k-form, size [N choose k]
143 . awedgeb - the (j+k)-form a wedge b, size [N choose (j+k)]: (a wedge b)(v_1,...,v_{j+k}) = \sum_{s…
150 PetscErrorCode PetscDTAltVWedge(PetscInt N, PetscInt j, PetscInt k, const PetscReal *a, const Petsc… in PetscDTAltVWedge() argument
155 PetscCheck(N >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid dimension"); in PetscDTAltVWedge()
157 PetscCheck(j + k <= N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Wedge greater than dimension"); in PetscDTAltVWedge()
158 if (N <= 3) { in PetscDTAltVWedge()
161 PetscCall(PetscDTBinomialInt(N, j + k, &Njk)); in PetscDTAltVWedge()
167 if (N == 2) { in PetscDTAltVWedge()
185 PetscCall(PetscDTBinomialInt(N, j + k, &Njk)); in PetscDTAltVWedge()
192 PetscCall(PetscDTEnumSubset(N, j + k, i, subset)); in PetscDTAltVWedge()
200 PetscCall(PetscDTSubsetIndex(N, j, subsetj, &jInd)); in PetscDTAltVWedge()
201 PetscCall(PetscDTSubsetIndex(N, k, subsetk, &kInd)); in PetscDTAltVWedge()
215 + N - the dimension of the vector space, N >= 0
216 . j - the degree j of the j-form a, 0 <= j <= N
217 . k - the degree k of the k-forms that (a wedge) will be applied to, 0 <= k <= N and 0 <= j+k <= N
218 - a - a j-form, size [N choose j]
221 . awedgeMat - (a wedge), an [(N choose j+k) x (N choose k)] matrix in row-major order, such that (a…
227 PetscErrorCode PetscDTAltVWedgeMatrix(PetscInt N, PetscInt j, PetscInt k, const PetscReal *a, Petsc… in PetscDTAltVWedgeMatrix() argument
232 PetscCheck(N >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid dimension"); in PetscDTAltVWedgeMatrix()
234 PetscCheck(j + k <= N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Wedge greater than dimension"); in PetscDTAltVWedgeMatrix()
235 if (N <= 3) { in PetscDTAltVWedgeMatrix()
238 PetscCall(PetscDTBinomialInt(N, j + k, &Njk)); in PetscDTAltVWedgeMatrix()
245 if (N == 2) { in PetscDTAltVWedgeMatrix()
272 PetscCall(PetscDTBinomialInt(N, k, &Nk)); in PetscDTAltVWedgeMatrix()
273 PetscCall(PetscDTBinomialInt(N, j + k, &Njk)); in PetscDTAltVWedgeMatrix()
280 PetscCall(PetscDTEnumSubset(N, j + k, i, subset)); in PetscDTAltVWedgeMatrix()
288 PetscCall(PetscDTSubsetIndex(N, j, subsetj, &jInd)); in PetscDTAltVWedgeMatrix()
289 PetscCall(PetscDTSubsetIndex(N, k, subsetk, &kInd)); in PetscDTAltVWedgeMatrix()
302 + N - the dimension of the origin vector space of the linear transformation, M >= 0
303 . M - the dimension of the image vector space of the linear transformation, N >= 0
304 . L - a linear transformation, an [M x N] matrix in row-major format
305 . k - the *signed* degree k of the |k|-form w, -(min(M,N)) <= k <= min(M,N). A negative form degre…
310 . Lstarw - the pullback of w to a |k|-form in the origin space, size [N choose |k|]: (Lstarw)(v_1,.…
323 PetscErrorCode PetscDTAltVPullback(PetscInt N, PetscInt M, const PetscReal *L, PetscInt k, const Pe… in PetscDTAltVPullback() argument
328 PetscCheck(N >= 0 && M >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid dimensions"); in PetscDTAltVPullback()
329 …PetscCheck(PetscAbsInt(k) <= N && PetscAbsInt(k) <= M, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, … in PetscDTAltVPullback()
330 if (N <= 3 && M <= 3) { in PetscDTAltVPullback()
332 PetscCall(PetscDTBinomialInt(N, PetscAbsInt(k), &Nk)); in PetscDTAltVPullback()
360 …um += (L[pairs[j][0] * N + pairs[i][0]] * L[pairs[j][1] * N + pairs[i][1]] - L[pairs[j][1] * N + p… in PetscDTAltVPullback()
369 PetscInt offi = (N == 2) ? 2 : 0; in PetscDTAltVPullback()
375 …* N + pairs[offi + i][0]] * L[pairs[offj + j][1] * N + pairs[offi + i][1]] - L[pairs[offj + j][1] … in PetscDTAltVPullback()
393 PetscCall(PetscDTBinomialInt(N, PetscAbsInt(k), &Nk)); in PetscDTAltVPullback()
404 PetscCall(PetscMalloc5(k, &subsetw, k, &subsetv, k, &perm, N * k, &Lw, k * k, &Lwv)); in PetscDTAltVPullback()
409 PetscCall(PetscDTEnumSubset(N, k, j, subsetv)); in PetscDTAltVPullback()
416 for (l = 0; l < k; l++) prod *= L[subsetw[perm[l]] * N + subsetv[l]]; in PetscDTAltVPullback()
425 PetscCall(PetscDTAltVStar(N, N - k, -1, Lstarw, sLsw)); in PetscDTAltVPullback()
439 + N - the dimension of the origin vector space of the linear transformation, N >= 0
441 . L - a linear transformation, an [M x N] matrix in row-major format
442 - k - the *signed* degree k of the |k|-forms on which Lstar acts, -(min(M,N)) <= k <= min(M,N).
446 . Lstar - the pullback matrix, an [(N choose |k|) x (M choose |k|)] matrix in row-major format such…
452 PetscErrorCode PetscDTAltVPullbackMatrix(PetscInt N, PetscInt M, const PetscReal *L, PetscInt k, Pe… in PetscDTAltVPullbackMatrix() argument
461 PetscCheck(N >= 0 && M >= 0, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid dimensions"); in PetscDTAltVPullbackMatrix()
462 …PetscCheck(PetscAbsInt(k) <= N && PetscAbsInt(k) <= M, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, … in PetscDTAltVPullbackMatrix()
463 if (N <= 3 && M <= 3) { in PetscDTAltVPullbackMatrix()
467 PetscCall(PetscDTBinomialInt(N, PetscAbsInt(k), &Nk)); in PetscDTAltVPullbackMatrix()
486 …+ j] = L[pairs[j][0] * N + pairs[i][0]] * L[pairs[j][1] * N + pairs[i][1]] - L[pairs[j][1] * N + p… in PetscDTAltVPullbackMatrix()
494 PetscInt offi = (N == 2) ? 2 : 0; in PetscDTAltVPullbackMatrix()
498 …* N + pairs[offi + i][0]] * L[pairs[offj + j][1] * N + pairs[offi + i][1]] - L[pairs[offj + j][1] … in PetscDTAltVPullbackMatrix()
511 PetscCall(PetscDTBinomialInt(N, PetscAbsInt(k), &Nk)); in PetscDTAltVPullbackMatrix()
513 PetscCall(PetscMalloc5(M, &subsetw, N, &subsetv, k, &perm, N * k, &Lw, k * k, &Lwv)); in PetscDTAltVPullbackMatrix()
525 PetscCall(PetscDTEnumSplit(N, k, j, subsetv, &jOdd)); in PetscDTAltVPullbackMatrix()
527 jOdd = negative ? (PetscBool)(iOdd ^ jOdd ^ ((k * (N - k)) & 1)) : PETSC_FALSE; in PetscDTAltVPullbackMatrix()
535 for (l = 0; l < k; l++) prod *= L[subsetw[perm[l]] * N + subsetv[l]]; in PetscDTAltVPullbackMatrix()
549 + N - the dimension of the vector space, N >= 0
550 . k - the degree k of the k-form w, 0 <= k <= N
551 . w - a k-form, size [N choose k]
552 - v - an N dimensional vector
555 . wIntv - the (k-1)-form (w int v), size [N choose (k-1)]: (w int v) is defined by its action on (k…
561 PetscErrorCode PetscDTAltVInterior(PetscInt N, PetscInt k, const PetscReal *w, const PetscReal *v, … in PetscDTAltVInterior() argument
566 PetscCheck(k > 0 && k <= N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid form degree"); in PetscDTAltVInterior()
567 PetscCall(PetscDTBinomialInt(N, k, &Nk)); in PetscDTAltVInterior()
568 PetscCall(PetscDTBinomialInt(N, k - 1, &Nkm)); in PetscDTAltVInterior()
569 if (N <= 3) { in PetscDTAltVInterior()
573 for (i = 0; i < N; i++) sum += w[i] * v[i]; in PetscDTAltVInterior()
575 } else if (k == N) { in PetscDTAltVInterior()
578 for (i = 0; i < N; i++) wIntv[N - 1 - i] = w[0] * v[i] * mult[i]; in PetscDTAltVInterior()
592 PetscCall(PetscDTEnumSubset(N, k, i, subset)); in PetscDTAltVInterior()
600 PetscCall(PetscDTSubsetIndex(N, k - 1, work, &idx)); in PetscDTAltVInterior()
613 + N - the dimension of the vector space, N >= 0
614 . k - the degree k of the k-forms on which intvMat acts, 0 <= k <= N
615 - v - an N dimensional vector
618 . intvMat - an [(N choose (k-1)) x (N choose k)] matrix, row-major: (intvMat) * w = (w int v)
624 PetscErrorCode PetscDTAltVInteriorMatrix(PetscInt N, PetscInt k, const PetscReal *v, PetscReal *int… in PetscDTAltVInteriorMatrix() argument
629 PetscCheck(k > 0 && k <= N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid form degree"); in PetscDTAltVInteriorMatrix()
630 PetscCall(PetscDTBinomialInt(N, k, &Nk)); in PetscDTAltVInteriorMatrix()
631 PetscCall(PetscDTBinomialInt(N, k - 1, &Nkm)); in PetscDTAltVInteriorMatrix()
632 if (N <= 3) { in PetscDTAltVInteriorMatrix()
634 for (i = 0; i < N; i++) intvMat[i] = v[i]; in PetscDTAltVInteriorMatrix()
635 } else if (k == N) { in PetscDTAltVInteriorMatrix()
638 for (i = 0; i < N; i++) intvMat[N - 1 - i] = v[i] * mult[i]; in PetscDTAltVInteriorMatrix()
658 PetscCall(PetscDTEnumSubset(N, k, i, subset)); in PetscDTAltVInteriorMatrix()
666 PetscCall(PetscDTSubsetIndex(N, k - 1, work, &idx)); in PetscDTAltVInteriorMatrix()
679 + N - the dimension of the vector space, $N \ge 0$
680 … degree of the k-forms on which `intvMat` from `PetscDTAltVInteriorMatrix()` acts, $ 0 le k le N $.
683 …The interior product matrix `intvMat` has dimensions [(N choose (k-1)) x (N choose k)] and has (N
694 PetscErrorCode PetscDTAltVInteriorPattern(PetscInt N, PetscInt k, PetscInt (*indices)[3]) in PetscDTAltVInteriorPattern() argument
699 PetscCheck(k > 0 && k <= N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid form degree"); in PetscDTAltVInteriorPattern()
700 PetscCall(PetscDTBinomialInt(N, k, &Nk)); in PetscDTAltVInteriorPattern()
701 PetscCall(PetscDTBinomialInt(N, k - 1, &Nkm)); in PetscDTAltVInteriorPattern()
702 if (N <= 3) { in PetscDTAltVInteriorPattern()
704 for (i = 0; i < N; i++) { in PetscDTAltVInteriorPattern()
709 } else if (k == N) { in PetscDTAltVInteriorPattern()
712 for (i = 0; i < N; i++) { in PetscDTAltVInteriorPattern()
713 indices[i][0] = N - 1 - i; in PetscDTAltVInteriorPattern()
744 PetscCall(PetscDTEnumSubset(N, k, i, subset)); in PetscDTAltVInteriorPattern()
752 PetscCall(PetscDTSubsetIndex(N, k - 1, work, &idx)); in PetscDTAltVInteriorPattern()
764 …PetscDTAltVStar - Apply a power of the Hodge star operator, which maps k-forms to (N-k) forms, to …
767 + N - the dimension of the vector space, N >= 0
768 . k - the degree k of the k-form w, 0 <= k <= N
770 - w - a k-form, size [N choose k]
778 Each degree of freedom of a k-form is associated with a subset S of k coordinates of the N
782 implies (star)^2 w = (-1)^{k(N-k)} w, and (star)^4 w = w.
786 PetscErrorCode PetscDTAltVStar(PetscInt N, PetscInt k, PetscInt pow, const PetscReal *w, PetscReal … in PetscDTAltVStar() argument
791 PetscCheck(k >= 0 && k <= N, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "invalid form degree"); in PetscDTAltVStar()
792 PetscCall(PetscDTBinomialInt(N, k, &Nk)); in PetscDTAltVStar()
796 if (N <= 3) { in PetscDTAltVStar()
804 if (pow > 1 && ((k * (N - k)) & 1)) { in PetscDTAltVStar()
810 PetscCall(PetscMalloc1(N, &subset)); in PetscDTAltVStar()
812 PetscInt l = (pow == 1) ? k : N - k; in PetscDTAltVStar()
817 PetscCall(PetscDTEnumSplit(N, l, i, subset, &sOdd)); in PetscDTAltVStar()
818 PetscCall(PetscDTSubsetIndex(N, l, subset, &idx)); in PetscDTAltVStar()
819 PetscCall(PetscDTSubsetIndex(N, N - l, &subset[l], &j)); in PetscDTAltVStar()
825 /* star^2 = -1^(k * (N - k)) */ in PetscDTAltVStar()
826 if (pow > 1 && (k * (N - k)) % 2) { in PetscDTAltVStar()