Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/sources/scalar_potential_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,8 @@ ScalarPotentialSource::Apply(mfem::ParLinearForm * lf)
_a0->FormLinearSystem(
poisson_ess_tdof_list, phi_gf, *_b0, *_diffusion_mat, *_p_tdofs, *_b0_tdofs);

if (_a0_solver == nullptr)
{
_a0_solver = std::make_unique<hephaestus::DefaultH1PCGSolver>(_solver_options, *_diffusion_mat);
}
// Solve
_a0_solver = std::make_unique<hephaestus::DefaultH1PCGSolver>(_solver_options, *_diffusion_mat);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big performance hit here if a0_solver does not need to be reused; but necessary for mesh updates, since the solver will need to be rebuilt then. Rebuild could go into an Update() method?

_a0_solver->Mult(*_b0_tdofs, *_p_tdofs);

// "undo" the static condensation saving result in grid function dP
Expand Down