Home
last modified time | relevance | path

Searched refs:gval (Results 1 – 7 of 7) sorted by relevance

/petsc/src/ts/event/tests/
H A Dex4.c41 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx);
189 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx) in EventFunction() argument
198 …if (Ctx->F == 0 || Ctx->F == -1) gval[n++] = PetscSinReal(Ctx->pi * t) / Ctx->pi; // FUNC-0, roots… in EventFunction()
199 …if (Ctx->F == 1 || Ctx->F == -1) gval[n++] = PetscLogReal(t); // FUNC-2, root 1 in EventFunction()
201 if (t < 2) gval[n++] = (1 - PetscPowReal(t - 2, 12)) / 12.0; in EventFunction()
202 else gval[n++] = 1 / 12.0; in EventFunction()
204 …if (Ctx->F == 3 || Ctx->F == -1) gval[n++] = t - PetscExpReal(PetscSinReal(t)) + 1; … in EventFunction()
205 …if (Ctx->F == 4 || Ctx->F == -1) gval[n++] = (1e10 * PetscPowReal(t, 1 / t) - 1) / 100; … in EventFunction()
206 …if (Ctx->F == 5 || Ctx->F == -1) gval[n++] = PetscLogReal(t - 0.02) * PetscLogReal(t - 0.02) * Pet… in EventFunction()
207 …if (Ctx->F == 6 || Ctx->F == -1) gval[n++] = 4 * PetscCosReal(t) - PetscExpReal(t); … in EventFunction()
[all …]
H A Dex2.c37 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx);
144 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx) in EventFunction() argument
153 if (t < 2.0) gval[n++] = 0.5 * (1 - PetscPowReal(t - 2.0, 12)); in EventFunction()
154 else gval[n++] = 0.5; in EventFunction()
159 if (t > 8.0) gval[n++] = 0.25 * (1 - PetscPowReal(t - 8.0, 12)); in EventFunction()
160 else gval[n++] = 0.25; in EventFunction()
H A Dex3.c48 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx);
176 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx) in EventFunction() argument
185 if (t < 2.05) gval[n++] = 0.5 * (1 - PetscPowReal(t - 2.05, 12)); in EventFunction()
186 else gval[n++] = 0.5; in EventFunction()
191 if (t > 8.05) gval[n++] = 0.25 * (1 - PetscPowReal(t - 8.05, 12)); in EventFunction()
192 else gval[n++] = 0.25; in EventFunction()
196 if (Ctx->rank == 1 % Ctx->size) gval[n++] = Ctx->V * PetscSinReal(Ctx->pi * t); in EventFunction()
H A Dex5.c43 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx);
178 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx) in EventFunction() argument
189 if (t < 2 + P) gval[n++] = 1 - PetscPowReal(2 + P - t, i + 5); in EventFunction()
190 else gval[n++] = 1; in EventFunction()
196 if (t > 8 - P) gval[n++] = 1 - PetscPowReal(t - 8 + P, i + 5); in EventFunction()
197 else gval[n++] = 1; in EventFunction()
200 …if (Ctx->rank == 0) gval[n++] = (t - 5) * (t - 5) * PetscSinReal(Ctx->pi * t); // sin-event -- on … in EventFunction()
201 …if (Ctx->rank == Ctx->size - 1) gval[n++] = 0.5 * PetscCosReal(Ctx->pi * t); // cos-event -- on … in EventFunction()
H A Dex3span.c51 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx);
214 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx) in EventFunction() argument
223 if (t < 2.05) gval[n++] = 0.5 * (1 - PetscPowReal(t - 2.05, 12)); in EventFunction()
224 else gval[n++] = 0.5; in EventFunction()
229 if (t > 8.05) gval[n++] = 0.25 * (1 - PetscPowReal(t - 8.05, 12)); in EventFunction()
230 else gval[n++] = 0.25; in EventFunction()
234 if (Ctx->rank == 1 % Ctx->size) gval[n++] = PetscSinReal(Ctx->pi * t); in EventFunction()
H A Dex1sin.c37 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx);
143 PetscErrorCode EventFunction(TS ts, PetscReal t, Vec U, PetscReal gval[], PetscCtx ctx) in EventFunction() argument
151 if (Ctx->rank == 0) gval[n++] = PetscSinReal(Ctx->pi * t); in EventFunction()
/petsc/src/ksp/pc/impls/gamg/
H A Dclassical.c89 PetscScalar *gval; in PCGAMGCreateGraph_Classical() local
133 PetscCall(PetscMalloc2(cmax, &gval, cmax, &gcol)); in PCGAMGCreateGraph_Classical()
148 gval[idx] = rval[c]; in PCGAMGCreateGraph_Classical()
152 PetscCall(MatSetValues(*G, 1, &r, idx, gcol, gval, INSERT_VALUES)); in PCGAMGCreateGraph_Classical()
158 PetscCall(PetscFree2(gval, gcol)); in PCGAMGCreateGraph_Classical()