Lines Matching refs:fem
6 static PetscErrorCode PetscFEDestroy_Composite(PetscFE fem) in PetscFEDestroy_Composite() argument
8 PetscFE_Composite *cmp = (PetscFE_Composite *)fem->data; in PetscFEDestroy_Composite()
16 static PetscErrorCode PetscFESetUp_Composite(PetscFE fem) in PetscFESetUp_Composite() argument
18 PetscFE_Composite *cmp = (PetscFE_Composite *)fem->data; in PetscFESetUp_Composite()
31 PetscCall(PetscDualSpaceGetDM(fem->dualSpace, &K)); in PetscFESetUp_Composite()
39 PetscCall(PetscDualSpaceGetDimension(fem->dualSpace, &pdim)); in PetscFESetUp_Composite()
40 PetscCall(PetscSpaceGetDimension(fem->basisSpace, &spdim)); in PetscFESetUp_Composite()
43 PetscCall(PetscDualSpaceGetSection(fem->dualSpace, §ion)); in PetscFESetUp_Composite()
59 …PetscCheck(sd == spdim, PetscObjectComm((PetscObject)fem), PETSC_ERR_PLIB, "Subelement %" PetscInt… in PetscFESetUp_Composite()
63 PetscCall(PetscMalloc1(cmp->numSubelements * spdim * spdim, &fem->invV)); in PetscFESetUp_Composite()
68 invVscalar = fem->invV; in PetscFESetUp_Composite()
77 PetscCall(PetscDualSpaceGetFunctional(fem->dualSpace, cmp->embedding[s * spdim + j], &f)); in PetscFESetUp_Composite()
80 PetscCall(PetscSpaceEvaluate(fem->basisSpace, Nq, points, Bf, NULL, NULL)); in PetscFESetUp_Composite()
93 …for (s = 0; s < cmp->numSubelements * spdim * spdim; s++) fem->invV[s] = PetscRealPart(invVscalar[… in PetscFESetUp_Composite()
100 static PetscErrorCode PetscFEComputeTabulation_Composite(PetscFE fem, PetscInt npoints, const Petsc… in PetscFEComputeTabulation_Composite() argument
102 PetscFE_Composite *cmp = (PetscFE_Composite *)fem->data; in PetscFEComputeTabulation_Composite()
117 PetscCall(PetscDualSpaceGetDM(fem->dualSpace, &dm)); in PetscFEComputeTabulation_Composite()
120 PetscCall(PetscSpaceGetDimension(fem->basisSpace, &spdim)); in PetscFEComputeTabulation_Composite()
121 PetscCall(PetscDualSpaceGetDimension(fem->dualSpace, &pdim)); in PetscFEComputeTabulation_Composite()
122 PetscCall(PetscFEGetNumComponents(fem, &comp)); in PetscFEComputeTabulation_Composite()
148 PetscCall(PetscSpaceEvaluate(fem->basisSpace, npoints, points, tmpB, tmpD, tmpH)); in PetscFEComputeTabulation_Composite()
162 … for (k = 0; k < spdim; ++k) B[i] += fem->invV[(s * spdim + k) * spdim + j] * tmpB[p * spdim + k]; in PetscFEComputeTabulation_Composite()
172 …for (k = 0; k < spdim; ++k) D[i] += fem->invV[(s * spdim + k) * spdim + j] * tmpD[(p * spdim + k) … in PetscFEComputeTabulation_Composite()
183 …for (k = 0; k < spdim; ++k) H[i] += fem->invV[(s * spdim + k) * spdim + j] * tmpH[(p * spdim + k) … in PetscFEComputeTabulation_Composite()
195 static PetscErrorCode PetscFEInitialize_Composite(PetscFE fem) in PetscFEInitialize_Composite() argument
198 fem->ops->setfromoptions = NULL; in PetscFEInitialize_Composite()
199 fem->ops->setup = PetscFESetUp_Composite; in PetscFEInitialize_Composite()
200 fem->ops->view = NULL; in PetscFEInitialize_Composite()
201 fem->ops->destroy = PetscFEDestroy_Composite; in PetscFEInitialize_Composite()
202 fem->ops->getdimension = PetscFEGetDimension_Basic; in PetscFEInitialize_Composite()
203 fem->ops->computetabulation = PetscFEComputeTabulation_Composite; in PetscFEInitialize_Composite()
204 fem->ops->integrateresidual = PetscFEIntegrateResidual_Basic; in PetscFEInitialize_Composite()
205 fem->ops->integratebdresidual = PetscFEIntegrateBdResidual_Basic; in PetscFEInitialize_Composite()
206 fem->ops->integratejacobianaction = NULL /* PetscFEIntegrateJacobianAction_Basic */; in PetscFEInitialize_Composite()
207 fem->ops->integratejacobian = PetscFEIntegrateJacobian_Basic; in PetscFEInitialize_Composite()
218 PETSC_EXTERN PetscErrorCode PetscFECreate_Composite(PetscFE fem) in PetscFECreate_Composite() argument
223 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); in PetscFECreate_Composite()
225 fem->data = cmp; in PetscFECreate_Composite()
231 PetscCall(PetscFEInitialize_Composite(fem)); in PetscFECreate_Composite()
256 PetscErrorCode PetscFECompositeGetMapping(PetscFE fem, PeOp PetscInt *numSubelements, PeOp const Pe… in PetscFECompositeGetMapping() argument
258 PetscFE_Composite *cmp = (PetscFE_Composite *)fem->data; in PetscFECompositeGetMapping()
261 PetscValidHeaderSpecific(fem, PETSCFE_CLASSID, 1); in PetscFECompositeGetMapping()