| /petsc/src/sys/classes/draw/utils/ |
| H A D | dscatter.c | 40 PetscDrawSP sp; in PetscDrawSPCreate() local 46 …PetscCall(PetscHeaderCreate(sp, PETSC_DRAWSP_CLASSID, "DrawSP", "Scatter Plot", "Draw", PetscObjec… in PetscDrawSPCreate() 48 sp->win = draw; in PetscDrawSPCreate() 49 sp->view = NULL; in PetscDrawSPCreate() 50 sp->destroy = NULL; in PetscDrawSPCreate() 51 sp->nopts = 0; in PetscDrawSPCreate() 52 sp->dim = -1; in PetscDrawSPCreate() 53 sp->xmin = (PetscReal)1.e20; in PetscDrawSPCreate() 54 sp->ymin = (PetscReal)1.e20; in PetscDrawSPCreate() 55 sp->zmin = (PetscReal)1.e20; in PetscDrawSPCreate() [all …]
|
| /petsc/src/dm/dt/space/interface/ |
| H A D | space.c | 64 PetscErrorCode PetscSpaceSetType(PetscSpace sp, PetscSpaceType name) in PetscSpaceSetType() argument 70 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceSetType() 71 PetscCall(PetscObjectTypeCompare((PetscObject)sp, name, &match)); in PetscSpaceSetType() 76 …PetscCheck(r, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown PetscSpace ty… in PetscSpaceSetType() 78 PetscTryTypeMethod(sp, destroy); in PetscSpaceSetType() 79 sp->ops->destroy = NULL; in PetscSpaceSetType() 81 sp->dim = PETSC_DETERMINE; in PetscSpaceSetType() 82 PetscCall((*r)(sp)); in PetscSpaceSetType() 83 PetscCall(PetscObjectChangeTypeName((PetscObject)sp, name)); in PetscSpaceSetType() 102 PetscErrorCode PetscSpaceGetType(PetscSpace sp, PetscSpaceType *name) in PetscSpaceGetType() argument [all …]
|
| /petsc/src/dm/dt/dualspace/impls/refined/ |
| H A D | dualspacerefined.c | 23 PetscErrorCode PetscDualSpaceRefinedSetCellSpaces(PetscDualSpace sp, const PetscDualSpace cellSpace… in PetscDualSpaceRefinedSetCellSpaces() argument 26 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceRefinedSetCellSpaces() 28 …PetscCheck(!sp->setupcalled, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_WRONGSTATE, "Cannot c… in PetscDualSpaceRefinedSetCellSpaces() 29 …PetscTryMethod(sp, "PetscDualSpaceRefinedSetCellSpaces_C", (PetscDualSpace, const PetscDualSpace[]… in PetscDualSpaceRefinedSetCellSpaces() 33 static PetscErrorCode PetscDualSpaceRefinedSetCellSpaces_Refined(PetscDualSpace sp, const PetscDual… in PetscDualSpaceRefinedSetCellSpaces_Refined() argument 40 dm = sp->dm; in PetscDualSpaceRefinedSetCellSpaces_Refined() 41 …PetscCheck(dm, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_WRONGSTATE, "PetscDualSpace must ha… in PetscDualSpaceRefinedSetCellSpaces_Refined() 43 if (!sp->pointSpaces) PetscCall(PetscCalloc1(pEnd - pStart, &sp->pointSpaces)); in PetscDualSpaceRefinedSetCellSpaces_Refined() 47 PetscCall(PetscDualSpaceDestroy(&sp->pointSpaces[c + cStart - pStart])); in PetscDualSpaceRefinedSetCellSpaces_Refined() 48 sp->pointSpaces[c + cStart - pStart] = cellSpaces[c]; in PetscDualSpaceRefinedSetCellSpaces_Refined() [all …]
|
| /petsc/src/dm/dt/dualspace/impls/simple/ |
| H A D | dspacesimple.c | 4 static PetscErrorCode PetscDualSpaceSetUp_Simple(PetscDualSpace sp) in PetscDualSpaceSetUp_Simple() argument 6 PetscDualSpace_Simple *s = (PetscDualSpace_Simple *)sp->data; in PetscDualSpaceSetUp_Simple() 7 DM dm = sp->dm; in PetscDualSpaceSetUp_Simple() 18 sp->pointSection = section; in PetscDualSpaceSetUp_Simple() 22 static PetscErrorCode PetscDualSpaceDestroy_Simple(PetscDualSpace sp) in PetscDualSpaceDestroy_Simple() argument 24 PetscDualSpace_Simple *s = (PetscDualSpace_Simple *)sp->data; in PetscDualSpaceDestroy_Simple() 29 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceSimpleSetDimension_C", NULL)); in PetscDualSpaceDestroy_Simple() 30 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceSimpleSetFunctional_C", NULL)… in PetscDualSpaceDestroy_Simple() 34 static PetscErrorCode PetscDualSpaceDuplicate_Simple(PetscDualSpace sp, PetscDualSpace spNew) in PetscDualSpaceDuplicate_Simple() argument 39 PetscCall(PetscDualSpaceGetDimension(sp, &dim)); in PetscDualSpaceDuplicate_Simple() [all …]
|
| /petsc/src/dm/dt/space/impls/ptrimmed/ |
| H A D | spaceptrimmed.c | 3 static PetscErrorCode PetscSpaceSetFromOptions_Ptrimmed(PetscSpace sp, PetscOptionItems PetscOption… in PetscSpaceSetFromOptions_Ptrimmed() argument 5 PetscSpace_Ptrimmed *pt = (PetscSpace_Ptrimmed *)sp->data; in PetscSpaceSetFromOptions_Ptrimmed() 14 static PetscErrorCode PetscSpacePTrimmedView_Ascii(PetscSpace sp, PetscViewer v) in PetscSpacePTrimmedView_Ascii() argument 16 PetscSpace_Ptrimmed *pt = (PetscSpace_Ptrimmed *)sp->data; in PetscSpacePTrimmedView_Ascii() 21 tdegree = f == 0 ? sp->degree : sp->degree + 1; in PetscSpacePTrimmedView_Ascii() 22 … PetscInt_FMT "/\\%" PetscInt_FMT ")\n", PetscAbsInt(f), f < 0 ? "*" : "", sp->degree, tdegree, Pe… in PetscSpacePTrimmedView_Ascii() 26 static PetscErrorCode PetscSpaceView_Ptrimmed(PetscSpace sp, PetscViewer viewer) in PetscSpaceView_Ptrimmed() argument 31 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceView_Ptrimmed() 34 if (isascii) PetscCall(PetscSpacePTrimmedView_Ascii(sp, viewer)); in PetscSpaceView_Ptrimmed() 38 static PetscErrorCode PetscSpaceDestroy_Ptrimmed(PetscSpace sp) in PetscSpaceDestroy_Ptrimmed() argument [all …]
|
| /petsc/src/dm/dt/space/impls/poly/ |
| H A D | spacepoly.c | 3 static PetscErrorCode PetscSpaceSetFromOptions_Polynomial(PetscSpace sp, PetscOptionItems PetscOpti… in PetscSpaceSetFromOptions_Polynomial() argument 5 PetscSpace_Poly *poly = (PetscSpace_Poly *)sp->data; in PetscSpaceSetFromOptions_Polynomial() 14 static PetscErrorCode PetscSpacePolynomialView_Ascii(PetscSpace sp, PetscViewer v) in PetscSpacePolynomialView_Ascii() argument 16 PetscSpace_Poly *poly = (PetscSpace_Poly *)sp->data; in PetscSpacePolynomialView_Ascii() 19 …ce of degree %" PetscInt_FMT "\n", poly->tensor ? "Tensor polynomial" : "Polynomial", sp->degree)); in PetscSpacePolynomialView_Ascii() 23 static PetscErrorCode PetscSpaceView_Polynomial(PetscSpace sp, PetscViewer viewer) in PetscSpaceView_Polynomial() argument 28 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceView_Polynomial() 31 if (isascii) PetscCall(PetscSpacePolynomialView_Ascii(sp, viewer)); in PetscSpaceView_Polynomial() 35 static PetscErrorCode PetscSpaceDestroy_Polynomial(PetscSpace sp) in PetscSpaceDestroy_Polynomial() argument 37 PetscSpace_Poly *poly = (PetscSpace_Poly *)sp->data; in PetscSpaceDestroy_Polynomial() [all …]
|
| /petsc/src/mat/interface/ |
| H A D | matnull.c | 24 PetscErrorCode MatNullSpaceSetFunction(MatNullSpace sp, MatNullSpaceRemoveFn *rem, PetscCtx ctx) in MatNullSpaceSetFunction() argument 27 PetscValidHeaderSpecific(sp, MAT_NULLSPACE_CLASSID, 1); in MatNullSpaceSetFunction() 28 sp->remove = rem; in MatNullSpaceSetFunction() 29 sp->rmctx = ctx; in MatNullSpaceSetFunction() 56 PetscErrorCode MatNullSpaceGetVecs(MatNullSpace sp, PetscBool *has_const, PetscInt *n, const Vec *v… in MatNullSpaceGetVecs() argument 59 PetscValidHeaderSpecific(sp, MAT_NULLSPACE_CLASSID, 1); in MatNullSpaceGetVecs() 60 if (has_const) *has_const = sp->has_cnst; in MatNullSpaceGetVecs() 61 if (n) *n = sp->n; in MatNullSpaceGetVecs() 62 if (vecs) *vecs = sp->vecs; in MatNullSpaceGetVecs() 88 PetscErrorCode MatNullSpaceCreateRigidBody(Vec coords, MatNullSpace *sp) in MatNullSpaceCreateRigidBody() argument [all …]
|
| /petsc/src/dm/dt/dualspace/interface/ |
| H A D | dualspace.c | 129 PetscErrorCode PetscDualSpaceSetType(PetscDualSpace sp, PetscDualSpaceType name) in PetscDualSpaceSetType() argument 135 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceSetType() 136 PetscCall(PetscObjectTypeCompare((PetscObject)sp, name, &match)); in PetscDualSpaceSetType() 141 …PetscCheck(r, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_UNKNOWN_TYPE, "Unknown PetscDualSpac… in PetscDualSpaceSetType() 143 PetscTryTypeMethod(sp, destroy); in PetscDualSpaceSetType() 144 sp->ops->destroy = NULL; in PetscDualSpaceSetType() 146 PetscCall((*r)(sp)); in PetscDualSpaceSetType() 147 PetscCall(PetscObjectChangeTypeName((PetscObject)sp, name)); in PetscDualSpaceSetType() 166 PetscErrorCode PetscDualSpaceGetType(PetscDualSpace sp, PetscDualSpaceType *name) in PetscDualSpaceGetType() argument 169 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceGetType() [all …]
|
| /petsc/src/dm/dt/space/impls/point/ |
| H A D | spacepoint.c | 4 static PetscErrorCode PetscSpacePointView_Ascii(PetscSpace sp, PetscViewer viewer) in PetscSpacePointView_Ascii() argument 6 PetscSpace_Point *pt = (PetscSpace_Point *)sp->data; in PetscSpacePointView_Ascii() 12 …PetscCall(PetscViewerASCIIPrintf(viewer, "Point space in dimension %" PetscInt_FMT ":\n", sp->Nv)); in PetscSpacePointView_Ascii() 16 …Point space in dimension %" PetscInt_FMT " on %" PetscInt_FMT " points\n", sp->Nv, pt->quad->numPo… in PetscSpacePointView_Ascii() 20 static PetscErrorCode PetscSpaceView_Point(PetscSpace sp, PetscViewer viewer) in PetscSpaceView_Point() argument 25 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceView_Point() 28 if (isascii) PetscCall(PetscSpacePointView_Ascii(sp, viewer)); in PetscSpaceView_Point() 32 static PetscErrorCode PetscSpaceSetUp_Point(PetscSpace sp) in PetscSpaceSetUp_Point() argument 34 PetscSpace_Point *pt = (PetscSpace_Point *)sp->data; in PetscSpaceSetUp_Point() 37 if (!pt->quad->points && sp->degree >= 0) { in PetscSpaceSetUp_Point() [all …]
|
| /petsc/src/dm/dt/space/impls/sum/ |
| H A D | spacesum.c | 19 PetscErrorCode PetscSpaceSumGetNumSubspaces(PetscSpace sp, PetscInt *numSumSpaces) in PetscSpaceSumGetNumSubspaces() argument 22 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceSumGetNumSubspaces() 24 …PetscTryMethod(sp, "PetscSpaceSumGetNumSubspaces_C", (PetscSpace, PetscInt *), (sp, numSumSpaces)); in PetscSpaceSumGetNumSubspaces() 42 PetscErrorCode PetscSpaceSumSetNumSubspaces(PetscSpace sp, PetscInt numSumSpaces) in PetscSpaceSumSetNumSubspaces() argument 45 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceSumSetNumSubspaces() 46 PetscTryMethod(sp, "PetscSpaceSumSetNumSubspaces_C", (PetscSpace, PetscInt), (sp, numSumSpaces)); in PetscSpaceSumSetNumSubspaces() 68 PetscErrorCode PetscSpaceSumGetConcatenate(PetscSpace sp, PetscBool *concatenate) in PetscSpaceSumGetConcatenate() argument 71 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceSumGetConcatenate() 72 PetscTryMethod(sp, "PetscSpaceSumGetConcatenate_C", (PetscSpace, PetscBool *), (sp, concatenate)); in PetscSpaceSumGetConcatenate() 92 PetscErrorCode PetscSpaceSumSetConcatenate(PetscSpace sp, PetscBool concatenate) in PetscSpaceSumSetConcatenate() argument [all …]
|
| /petsc/src/dm/dt/dualspace/impls/sum/ |
| H A D | dualspacesum.c | 19 PetscErrorCode PetscDualSpaceSumGetNumSubspaces(PetscDualSpace sp, PetscInt *numSumSpaces) in PetscDualSpaceSumGetNumSubspaces() argument 22 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceSumGetNumSubspaces() 24 …PetscTryMethod(sp, "PetscDualSpaceSumGetNumSubspaces_C", (PetscDualSpace, PetscInt *), (sp, numSum… in PetscDualSpaceSumGetNumSubspaces() 42 PetscErrorCode PetscDualSpaceSumSetNumSubspaces(PetscDualSpace sp, PetscInt numSumSpaces) in PetscDualSpaceSumSetNumSubspaces() argument 45 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceSumSetNumSubspaces() 46 …PetscTryMethod(sp, "PetscDualSpaceSumSetNumSubspaces_C", (PetscDualSpace, PetscInt), (sp, numSumSp… in PetscDualSpaceSumSetNumSubspaces() 68 PetscErrorCode PetscDualSpaceSumGetConcatenate(PetscDualSpace sp, PetscBool *concatenate) in PetscDualSpaceSumGetConcatenate() argument 71 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceSumGetConcatenate() 72 …PetscTryMethod(sp, "PetscDualSpaceSumGetConcatenate_C", (PetscDualSpace, PetscBool *), (sp, concat… in PetscDualSpaceSumGetConcatenate() 92 PetscErrorCode PetscDualSpaceSumSetConcatenate(PetscDualSpace sp, PetscBool concatenate) in PetscDualSpaceSumSetConcatenate() argument [all …]
|
| /petsc/src/dm/dt/space/impls/tensor/ |
| H A D | spacetensor.c | 28 static PetscErrorCode PetscSpaceSetFromOptions_Tensor(PetscSpace sp, PetscOptionItems PetscOptionsO… in PetscSpaceSetFromOptions_Tensor() argument 30 PetscSpace_Tensor *tens = (PetscSpace_Tensor *)sp->data; in PetscSpaceSetFromOptions_Tensor() 35 PetscCall(PetscSpaceGetNumVariables(sp, &Nv)); in PetscSpaceSetFromOptions_Tensor() 37 PetscCall(PetscSpaceGetNumComponents(sp, &Nc)); in PetscSpaceSetFromOptions_Tensor() 38 PetscCall(PetscSpaceTensorGetNumSubspaces(sp, &Ns)); in PetscSpaceSetFromOptions_Tensor() 39 PetscCall(PetscSpaceGetDegree(sp, °, NULL)); in PetscSpaceSetFromOptions_Tensor() 43 PetscCall(PetscSpaceTensorGetSubspace(sp, 0, &s0)); in PetscSpaceSetFromOptions_Tensor() 47 PetscCall(PetscSpaceTensorGetSubspace(sp, i, &si)); in PetscSpaceSetFromOptions_Tensor() 59 …PetscCheck(Ns >= 0 && (Nv <= 0 || Ns != 0), PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_OUTOFR… in PetscSpaceSetFromOptions_Tensor() 60 …PetscCheck(Nv <= 0 || Ns <= Nv, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_OUTOFRANGE, "Canno… in PetscSpaceSetFromOptions_Tensor() [all …]
|
| /petsc/src/ts/tutorials/ |
| H A D | ex27.c | 47 PetscScalar sp[N_SPECIES]; member 81 ctx->x_0.sp[0] = 0.0; in SetFromOptions() 82 ctx->x_0.sp[1] = 0.0; in SetFromOptions() 83 ctx->x_0.sp[2] = 0.0; in SetFromOptions() 85 ctx->x_inflow.sp[0] = 0.05; in SetFromOptions() 86 ctx->x_inflow.sp[1] = 0.05; in SetFromOptions() 87 ctx->x_inflow.sp[2] = 0.0; in SetFromOptions() 106 PetscCall(PetscOptionsGetRealArray(NULL, NULL, "-sp_inflow", ctx->x_inflow.sp, &as, NULL)); in SetFromOptions() 107 PetscCall(PetscOptionsGetRealArray(NULL, NULL, "-sp_0", ctx->x_0.sp, &as, NULL)); in SetFromOptions() 176 if (l == 0) x[j][i].sp[l] = (ctx->x_inflow.sp[l] * ((PetscScalar)j) / (My - 1)); in FormInitialGuess() [all …]
|
| /petsc/src/dm/dt/dualspace/impls/lagrange/ |
| H A D | dspacelagrange.c | 856 static PetscErrorCode PetscDualSpaceDestroy_Lagrange(PetscDualSpace sp) in PetscDualSpaceDestroy_Lagrange() argument 858 PetscDualSpace_Lag *lag = (PetscDualSpace_Lag *)sp->data; in PetscDualSpaceDestroy_Lagrange() 889 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeGetContinuity_C", NUL… in PetscDualSpaceDestroy_Lagrange() 890 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeSetContinuity_C", NUL… in PetscDualSpaceDestroy_Lagrange() 891 PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeGetTensor_C", NULL)); in PetscDualSpaceDestroy_Lagrange() 892 PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeSetTensor_C", NULL)); in PetscDualSpaceDestroy_Lagrange() 893 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeGetTrimmed_C", NULL)); in PetscDualSpaceDestroy_Lagrange() 894 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeSetTrimmed_C", NULL)); in PetscDualSpaceDestroy_Lagrange() 895 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeGetNodeType_C", NULL)… in PetscDualSpaceDestroy_Lagrange() 896 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceLagrangeSetNodeType_C", NULL)… in PetscDualSpaceDestroy_Lagrange() [all …]
|
| /petsc/src/dm/dt/space/impls/ptrimmed/tests/ |
| H A D | ex1.c | 8 PetscSpace sp; in test() local 18 PetscCall(PetscSpaceCreate(comm, &sp)); in test() 19 PetscCall(PetscObjectSetName((PetscObject)sp, "ptrimmed")); in test() 20 PetscCall(PetscSpaceSetType(sp, PETSCSPACEPTRIMMED)); in test() 21 PetscCall(PetscSpaceSetNumVariables(sp, dim)); in test() 23 PetscCall(PetscSpaceSetNumComponents(sp, Nf * nCopies)); in test() 24 PetscCall(PetscSpaceSetDegree(sp, degree, PETSC_DETERMINE)); in test() 25 PetscCall(PetscSpacePTrimmedSetFormDegree(sp, formDegree)); in test() 26 PetscCall(PetscSpaceSetUp(sp)); in test() 27 PetscCall(PetscSpaceView(sp, NULL)); in test() [all …]
|
| /petsc/src/dm/dt/space/impls/subspace/ |
| H A D | spacesubspace.c | 19 static PetscErrorCode PetscSpaceDestroy_Subspace(PetscSpace sp) in PetscSpaceDestroy_Subspace() argument 24 subsp = (PetscSpace_Subspace *)sp->data; in PetscSpaceDestroy_Subspace() 37 sp->data = NULL; in PetscSpaceDestroy_Subspace() 38 PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscSpacePolynomialGetTensor_C", NULL)); in PetscSpaceDestroy_Subspace() 42 static PetscErrorCode PetscSpaceView_Subspace(PetscSpace sp, PetscViewer viewer) in PetscSpaceView_Subspace() argument 48 subsp = (PetscSpace_Subspace *)sp->data; in PetscSpaceView_Subspace() 55 PetscCall(PetscSpaceGetNumVariables(sp, &subDim)); in PetscSpaceView_Subspace() 56 PetscCall(PetscSpaceGetNumComponents(sp, &subNc)); in PetscSpaceView_Subspace() 92 static PetscErrorCode PetscSpaceEvaluate_Subspace(PetscSpace sp, PetscInt npoints, const PetscReal … in PetscSpaceEvaluate_Subspace() argument 94 PetscSpace_Subspace *subsp = (PetscSpace_Subspace *)sp->data; in PetscSpaceEvaluate_Subspace() [all …]
|
| /petsc/src/mat/tests/ |
| H A D | ex212f.F90 | 13 MatNullSpace sp, sp1 26 PetscCallA(MatGetNullSpace(A, sp, ierr)) 27 …PetscCheckA(PetscObjectIsNull(sp), PETSC_COMM_SELF, PETSC_ERR_PLIB, 'Matrix null space should not … 30 PetscCallA(MatGetNullSpace(A, sp, ierr)) 31 …PetscCheckA(PetscObjectIsNull(sp), PETSC_COMM_SELF, PETSC_ERR_PLIB, 'Matrix null space should not … 33 PetscCallA(MatNullSpaceCreate(PETSC_COMM_WORLD, PETSC_TRUE, zero, PETSC_NULL_VEC_ARRAY, sp, ierr)) 34 PetscCallA(MatSetNullSpace(A, sp, ierr)) 36 …PetscCheckA(.not. PetscObjectIsNull(sp), PETSC_COMM_SELF, PETSC_ERR_PLIB, 'Matrix null space shoul… 37 PetscCallA(MatNullSpaceDestroy(sp, ierr))
|
| /petsc/src/dm/dt/space/impls/wxy/ |
| H A D | spacewxy.c | 3 static PetscErrorCode PetscSpaceSetFromOptions_WXY(PetscSpace sp, PetscOptionItems PetscOptionsObje… in PetscSpaceSetFromOptions_WXY() argument 11 static PetscErrorCode PetscSpacePolynomialView_Ascii(PetscSpace sp, PetscViewer v) in PetscSpacePolynomialView_Ascii() argument 14 PetscCall(PetscViewerASCIIPrintf(v, "WXY space of degree %" PetscInt_FMT "\n", sp->degree)); in PetscSpacePolynomialView_Ascii() 18 static PetscErrorCode PetscSpaceView_WXY(PetscSpace sp, PetscViewer viewer) in PetscSpaceView_WXY() argument 23 PetscValidHeaderSpecific(sp, PETSCSPACE_CLASSID, 1); in PetscSpaceView_WXY() 26 if (isascii) PetscCall(PetscSpacePolynomialView_Ascii(sp, viewer)); in PetscSpaceView_WXY() 30 static PetscErrorCode PetscSpaceDestroy_WXY(PetscSpace sp) in PetscSpaceDestroy_WXY() argument 32 PetscSpace_WXY *wxy = (PetscSpace_WXY *)sp->data; in PetscSpaceDestroy_WXY() 39 static PetscErrorCode PetscSpaceSetUp_WXY(PetscSpace sp) in PetscSpaceSetUp_WXY() argument 41 PetscSpace_WXY *wxy = (PetscSpace_WXY *)sp->data; in PetscSpaceSetUp_WXY() [all …]
|
| /petsc/src/dm/dt/tests/ |
| H A D | ex4.c | 9 PetscDualSpace sp; in CheckSymmetry() local 19 PetscCall(PetscDualSpaceCreate(PETSC_COMM_SELF, &sp)); in CheckSymmetry() 21 PetscCall(PetscDualSpaceSetType(sp, PETSCDUALSPACELAGRANGE)); in CheckSymmetry() 22 PetscCall(PetscDualSpaceSetDM(sp, dm)); in CheckSymmetry() 23 PetscCall(PetscDualSpaceSetOrder(sp, order)); in CheckSymmetry() 24 PetscCall(PetscDualSpaceLagrangeSetContinuity(sp, PETSC_TRUE)); in CheckSymmetry() 25 PetscCall(PetscDualSpaceLagrangeSetTensor(sp, tensor)); in CheckSymmetry() 26 PetscCall(PetscDualSpaceSetFromOptions(sp)); in CheckSymmetry() 27 PetscCall(PetscDualSpaceSetUp(sp)); in CheckSymmetry() 28 PetscCall(PetscDualSpaceGetDimension(sp, &nFunc)); in CheckSymmetry() [all …]
|
| /petsc/src/ts/tutorials/hybrid/ |
| H A D | ex1fwd.c | 32 Mat sp; in MyMonitor() local 40 PetscCall(TSForwardGetSensitivities(ts, &nump, &sp)); in MyMonitor() 41 PetscCall(MatDenseGetColumn(sp, 2, &u)); in MyMonitor() 44 PetscCall(MatDenseRestoreColumn(sp, &u)); in MyMonitor() 68 Mat sp; in ShiftGradients() local 75 PetscCall(TSForwardGetSensitivities(ts, &nump, &sp)); in ShiftGradients() 100 PetscCall(MatDenseGetColumn(sp, 0, &x)); in ShiftGradients() 105 PetscCall(MatDenseRestoreColumn(sp, &x)); in ShiftGradients() 107 PetscCall(MatDenseGetColumn(sp, 1, &x)); in ShiftGradients() 112 PetscCall(MatDenseRestoreColumn(sp, &x)); in ShiftGradients() [all …]
|
| /petsc/src/dm/dt/dualspace/impls/lagrange/tests/ |
| H A D | ex1.c | 162 PetscDualSpace sp; in testLagrange() local 172 PetscCall(PetscDualSpaceCreate(comm, &sp)); in testLagrange() 173 PetscCall(PetscDualSpaceSetType(sp, PETSCDUALSPACELAGRANGE)); in testLagrange() 174 PetscCall(PetscDualSpaceSetDM(sp, K)); in testLagrange() 175 PetscCall(PetscDualSpaceSetOrder(sp, order)); in testLagrange() 176 PetscCall(PetscDualSpaceSetFormDegree(sp, formDegree)); in testLagrange() 177 PetscCall(PetscDualSpaceSetNumComponents(sp, nCopies * Nk)); in testLagrange() 178 PetscCall(PetscDualSpaceLagrangeSetContinuity(sp, continuous)); in testLagrange() 179 PetscCall(PetscDualSpaceLagrangeSetTensor(sp, (PetscBool)(tensorCell > 0))); in testLagrange() 180 PetscCall(PetscDualSpaceLagrangeSetTrimmed(sp, trimmed)); in testLagrange() [all …]
|
| /petsc/src/mat/interface/ftn-custom/ |
| H A D | zmatrixf.c | 21 static PetscErrorCode ournullfunction(MatNullSpace sp, Vec x, PetscCtx ctx) in ournullfunction() argument 23 …llSpace *, Vec *, void *, PetscErrorCode *))(((PetscObject)sp)->fortran_func_pointers[0]))(&sp, &x… in ournullfunction() 27 PETSC_EXTERN void matnullspacesetfunction_(MatNullSpace *sp, PetscErrorCode (*rem)(MatNullSpace, Ve… in matnullspacesetfunction_() argument 29 PetscObjectAllocateFortranPointers(*sp, 1); in matnullspacesetfunction_() 30 ((PetscObject)*sp)->fortran_func_pointers[0] = (PetscFortranCallbackFn *)rem; in matnullspacesetfunction_() 32 *ierr = MatNullSpaceSetFunction(*sp, ournullfunction, ctx); in matnullspacesetfunction_()
|
| H A D | zmatnullf.c | 13 PETSC_EXTERN void matnullspacegetvecs_(MatNullSpace *sp, PetscBool *HAS_CNST, PetscInt *N, F90Array… in matnullspacegetvecs_() argument 21 *ierr = MatNullSpaceGetVecs(*sp, &has_cnst, &n, (const Vec **)&tvecs); in matnullspacegetvecs_() 27 PETSC_EXTERN void matnullspacerestorevecs_(MatNullSpace *sp, PetscBool *HAS_CNST, PetscInt *N, F90A… in matnullspacerestorevecs_() argument
|
| /petsc/doc/ |
| H A D | build_man_pages.py | 57 sp = subprocess.run(command, cwd=dir, capture_output=True, encoding='UTF-8', check=True) 58 if sp.stdout and sp.stdout.find('WARNING') > -1: 59 print(sp.stdout) 61 if sp.stderr and sp.stderr.find('WARNING') > -1: 62 print(sp.stderr)
|
| /petsc/src/dm/dt/fe/interface/ceed/ |
| H A D | feceed.c | 47 PetscSpace sp; in PetscFEGetCeedBasis() local 57 PetscCall(PetscFEGetBasisSpace(fe, &sp)); in PetscFEGetCeedBasis() 58 PetscCall(PetscSpaceGetDegree(sp, °, NULL)); in PetscFEGetCeedBasis()
|