Skip to content
Snippets Groups Projects
Commit 3d2e0eca authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[NL] Pass current solution to Newton's DirichletBC

parent bdb16d78
No related branches found
No related tags found
No related merge requests found
......@@ -375,7 +375,7 @@ NonlinearSolverStatus NonlinearSolver<NonlinearSolverTag::Newton>::solve(
minus_delta_x.setZero();
timer_dirichlet.start();
sys.applyKnownSolutionsNewton(J, res, minus_delta_x);
sys.applyKnownSolutionsNewton(J, res, *x[process_id], minus_delta_x);
time_dirichlet += timer_dirichlet.elapsed();
INFO("[time] Applying Dirichlet BCs took {:g} s.", time_dirichlet);
......
......@@ -75,7 +75,7 @@ public:
//! \f$ \mathit{Jac} \cdot (-\Delta x) = \mathit{res} \f$.
//! \pre computeKnownSolutions() must have been called before.
virtual void applyKnownSolutionsNewton(
GlobalMatrix& Jac, GlobalVector& res,
GlobalMatrix& Jac, GlobalVector& res, GlobalVector const& x,
GlobalVector& minus_delta_x) const = 0;
//! Apply known solutions to the linearized equation system
......
......@@ -133,6 +133,7 @@ void TimeDiscretizedODESystem<
void TimeDiscretizedODESystem<ODESystemTag::FirstOrderImplicitQuasilinear,
NonlinearSolverTag::Newton>::
applyKnownSolutionsNewton(GlobalMatrix& Jac, GlobalVector& res,
GlobalVector const& x,
GlobalVector& minus_delta_x) const
{
if (!_known_solutions)
......
......@@ -106,6 +106,7 @@ public:
void applyKnownSolutions(GlobalVector& x) const override;
void applyKnownSolutionsNewton(GlobalMatrix& Jac, GlobalVector& res,
GlobalVector const& x,
GlobalVector& minus_delta_x) const override;
void applyKnownSolutionsPETScSNES(GlobalMatrix& Jac, GlobalVector& res,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment