@@ -327,8 +327,9 @@ EquationSystem::BuildJacobian(mfem::BlockVector & trueX, mfem::BlockVector & tru
327327void
328328EquationSystem ::Mult (const mfem ::Vector & sol , mfem ::Vector & residual ) const
329329{
330- const_cast < EquationSystem * > (this )-> CopyVec (sol , _trueBlockSol );
331-
330+ // const_cast<EquationSystem *>(this)->CopyVec(sol, _trueBlockSol);
331+ //_trueBlockSol.mfem::Vector::operator=(sol);
332+ static_cast < mfem ::Vector & > (_trueBlockSol ) = sol ;
332333 for (unsigned int i = 0 ; i < _trial_var_names .size (); i ++ )
333334 {
334335 auto & trial_var_name = _trial_var_names .at (i );
@@ -386,17 +387,21 @@ TimeDependentEquationSystem::UpdateEssDerivativeVals(const mfem::real_t & dt,
386387 // Update the old vector
387388 mfem ::BlockVector block_x_old ;
388389 block_x_old .Update (* _block_true_offsets );
390+ mfem ::ParGridFunction u_old_gf ;
389391
390392 // Update the old vector
391393 CopyVec (x_old , block_x_old );
394+ // mfem::BlockVector block_x_old(const_cast<mfem::Vector &>(x_old), *_block_true_offsets);
392395
393396 // Update the xs boundary conditions
394397 ApplyEssentialBCs ();
395398
396399 // Update the dxdts boundary conditions
397400 for (unsigned int i = 0 ; i < _test_var_names .size (); i ++ )
398401 {
399- * (_var_ess_constraints .at (i )) -= block_x_old .GetBlock (i );
402+ u_old_gf .SetSpace (_test_pfespaces [i ]);
403+ u_old_gf .SetFromTrueDofs (block_x_old .GetBlock (i ));
404+ * (_var_ess_constraints .at (i )) -= u_old_gf ;
400405 * (_var_ess_constraints .at (i )) /= dt ;
401406 }
402407}
0 commit comments