16 auto create_post_step_ksp = [&]() {
21 using DomainEle = VolumeElementForcesAndSourcesCore;
23 using OpDomainMass = FormsIntegrators<DomainEleOp>::Assembly<
25 using OpRhs = FormsIntegrators<DomainEleOp>::Assembly<
26 PETSC>::LinearForm<GAUSS>::OpBaseTimesVector<1, 3, 1>;
27 auto fe_lhs = boost::make_shared<DomainEle>(ep_ptr->mField);
28 auto fe_rhs = boost::make_shared<DomainEle>(ep_ptr->mField);
30 fe_lhs->getUserPolynomialBase() =
31 boost::shared_ptr<BaseFunction>(
new CGGUserPolynomialBase());
32 fe_rhs->getUserPolynomialBase() =
33 boost::shared_ptr<BaseFunction>(
new CGGUserPolynomialBase());
36 fe_lhs->getOpPtrVector(), {L2}, ep_ptr->materialH1Positions,
37 ep_ptr->frontAdjEdges);
40 fe_rhs->getOpPtrVector(), {L2}, ep_ptr->materialH1Positions,
41 ep_ptr->frontAdjEdges);
43 fe_lhs->getOpPtrVector().push_back(
44 new OpDomainMass(ep_ptr->spatialH1Disp, ep_ptr->spatialH1Disp));
45 auto w_ptr = boost::make_shared<MatrixDouble>();
46 fe_rhs->getOpPtrVector().push_back(
47 new OpCalculateVectorFieldValues<3>(ep_ptr->spatialL2Disp, w_ptr));
48 fe_rhs->getOpPtrVector().push_back(
49 new OpRhs(ep_ptr->spatialH1Disp, w_ptr));
52 ep_ptr->elementVolumeName, fe_lhs,
55 ep_ptr->elementVolumeName, fe_rhs,
65 CHKERR KSPAppendOptionsPrefix(ksp,
"prjspatial_");
66 CHKERR KSPSetFromOptions(ksp);
67 CHKERR KSPSetDM(ksp, ep_ptr->dmPrjSpatial);
77 prjKsp = create_post_step_ksp();
80 prjDM = ep_ptr->dmPrjSpatial;