Lines Matching refs:sp

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()
44 PetscCall(PetscDualSpaceGetFunctional(sp, d, &q)); in PetscDualSpaceDuplicate_Simple()
50 static PetscErrorCode PetscDualSpaceSimpleSetDimension_Simple(PetscDualSpace sp, const PetscInt dim) in PetscDualSpaceSimpleSetDimension_Simple() argument
52 PetscDualSpace_Simple *s = (PetscDualSpace_Simple *)sp->data; in PetscDualSpaceSimpleSetDimension_Simple()
57 for (f = 0; f < s->dim; ++f) PetscCall(PetscQuadratureDestroy(&sp->functional[f])); in PetscDualSpaceSimpleSetDimension_Simple()
58 PetscCall(PetscFree(sp->functional)); in PetscDualSpaceSimpleSetDimension_Simple()
60 PetscCall(PetscCalloc1(s->dim, &sp->functional)); in PetscDualSpaceSimpleSetDimension_Simple()
62 PetscCall(PetscDualSpaceGetDM(sp, &dm)); in PetscDualSpaceSimpleSetDimension_Simple()
69 static PetscErrorCode PetscDualSpaceSimpleSetFunctional_Simple(PetscDualSpace sp, PetscInt f, Petsc… in PetscDualSpaceSimpleSetFunctional_Simple() argument
71 PetscDualSpace_Simple *s = (PetscDualSpace_Simple *)sp->data; in PetscDualSpaceSimpleSetFunctional_Simple()
76 …PetscCheck(!(f < 0) && !(f >= s->dim), PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_OUTOFRANGE,… in PetscDualSpaceSimpleSetFunctional_Simple()
77 PetscCall(PetscQuadratureDuplicate(q, &sp->functional[f])); in PetscDualSpaceSimpleSetFunctional_Simple()
79 …PetscCall(PetscQuadratureGetData(sp->functional[f], NULL, &Nc, &Nq, NULL, (const PetscReal **)&wei… in PetscDualSpaceSimpleSetFunctional_Simple()
102 PetscErrorCode PetscDualSpaceSimpleSetDimension(PetscDualSpace sp, PetscInt dim) in PetscDualSpaceSimpleSetDimension() argument
105 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceSimpleSetDimension()
106 PetscValidLogicalCollectiveInt(sp, dim, 2); in PetscDualSpaceSimpleSetDimension()
107 …PetscCheck(!sp->setupcalled, PetscObjectComm((PetscObject)sp), PETSC_ERR_ARG_WRONGSTATE, "Cannot c… in PetscDualSpaceSimpleSetDimension()
108 PetscTryMethod(sp, "PetscDualSpaceSimpleSetDimension_C", (PetscDualSpace, PetscInt), (sp, dim)); in PetscDualSpaceSimpleSetDimension()
129 PetscErrorCode PetscDualSpaceSimpleSetFunctional(PetscDualSpace sp, PetscInt func, PetscQuadrature … in PetscDualSpaceSimpleSetFunctional() argument
132 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceSimpleSetFunctional()
133 …PetscTryMethod(sp, "PetscDualSpaceSimpleSetFunctional_C", (PetscDualSpace, PetscInt, PetscQuadratu… in PetscDualSpaceSimpleSetFunctional()
137 static PetscErrorCode PetscDualSpaceInitialize_Simple(PetscDualSpace sp) in PetscDualSpaceInitialize_Simple() argument
140 sp->ops->setup = PetscDualSpaceSetUp_Simple; in PetscDualSpaceInitialize_Simple()
141 sp->ops->view = NULL; in PetscDualSpaceInitialize_Simple()
142 sp->ops->destroy = PetscDualSpaceDestroy_Simple; in PetscDualSpaceInitialize_Simple()
143 sp->ops->duplicate = PetscDualSpaceDuplicate_Simple; in PetscDualSpaceInitialize_Simple()
144 sp->ops->createheightsubspace = NULL; in PetscDualSpaceInitialize_Simple()
145 sp->ops->createpointsubspace = NULL; in PetscDualSpaceInitialize_Simple()
146 sp->ops->getsymmetries = NULL; in PetscDualSpaceInitialize_Simple()
147 sp->ops->apply = PetscDualSpaceApplyDefault; in PetscDualSpaceInitialize_Simple()
148 sp->ops->applyall = PetscDualSpaceApplyAllDefault; in PetscDualSpaceInitialize_Simple()
149 sp->ops->applyint = PetscDualSpaceApplyInteriorDefault; in PetscDualSpaceInitialize_Simple()
150 sp->ops->createalldata = PetscDualSpaceCreateAllDataDefault; in PetscDualSpaceInitialize_Simple()
151 sp->ops->createintdata = PetscDualSpaceCreateInteriorDataDefault; in PetscDualSpaceInitialize_Simple()
166 PETSC_EXTERN PetscErrorCode PetscDualSpaceCreate_Simple(PetscDualSpace sp) in PetscDualSpaceCreate_Simple() argument
171 PetscValidHeaderSpecific(sp, PETSCDUALSPACE_CLASSID, 1); in PetscDualSpaceCreate_Simple()
173 sp->data = s; in PetscDualSpaceCreate_Simple()
178 PetscCall(PetscDualSpaceInitialize_Simple(sp)); in PetscDualSpaceCreate_Simple()
179 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceSimpleSetDimension_C", PetscD… in PetscDualSpaceCreate_Simple()
180 …PetscCall(PetscObjectComposeFunction((PetscObject)sp, "PetscDualSpaceSimpleSetFunctional_C", Petsc… in PetscDualSpaceCreate_Simple()