@@ -201,18 +201,17 @@ namespace ngcomp
201201
202202 class H1HOProlongation : public Prolongation
203203 {
204- weak_ptr<H1HighOrderFESpace > fes;
204+ weak_ptr<FESpace > fes;
205205 shared_ptr<FESpace> fesL2;
206206
207207 mutable Array<shared_ptr<BaseMatrix>> convL2toH1;
208208 mutable Array<shared_ptr<BaseMatrix>> convH1toL2;
209209 public:
210- H1HOProlongation (weak_ptr<H1HighOrderFESpace> afes)
211- : fes(afes)
210+ H1HOProlongation (const FESpace & afes)
212211 {
213212 Flags flagsL2;
214- flagsL2.SetFlag (" order" , fes. lock ()-> GetOrder ());
215- fesL2 = CreateFESpace (" L2" , fes. lock ()-> GetMeshAccess (), flagsL2);
213+ flagsL2.SetFlag (" order" , afes. GetOrder ());
214+ fesL2 = CreateFESpace (" L2" , afes. GetMeshAccess (), flagsL2);
216215 // fesL2->Update();
217216 // fesL2->FinalizeUpdate();
218217 // int levels = fes.lock()->GetMeshAccess()->GetNLevels();
@@ -224,8 +223,9 @@ namespace ngcomp
224223 // convH1toL2[levels-1] = ConvertOperator(fes.lock(), fesL2, VOL, lh);
225224 }
226225
227- virtual void Update (const FESpace & /* fes */ ) override
226+ virtual void Update (const FESpace & afes ) override
228227 {
228+ fes = dynamic_pointer_cast<FESpace>(const_cast <FESpace*>(&afes)->shared_from_this ());
229229 fesL2->Update ();
230230 fesL2->FinalizeUpdate ();
231231
@@ -482,7 +482,8 @@ namespace ngcomp
482482
483483 if (!test_ho_prolongation)
484484 prol = make_shared<LinearProlongation> (GetMeshAccess ());
485-
485+ else
486+ prol = make_shared<H1HOProlongation> (*this );
486487 needs_transform_vec = false ;
487488 }
488489
@@ -770,11 +771,13 @@ into the wirebasket.
770771 IsComplex ());
771772 // timer3.Stop();
772773
774+ /*
773775 if (test_ho_prolongation && !prol)
774776 {
775777 prol = make_shared<H1HOProlongation> (dynamic_pointer_cast<H1HighOrderFESpace>(this->shared_from_this()));
776778 // prol->Update(*this);
777779 }
780+ */
778781 }
779782
780783
0 commit comments