diff --git a/src/poly/solver/private/polySolver.cpp b/src/poly/solver/private/polySolver.cpp index d3e70cd..adb23ed 100644 --- a/src/poly/solver/private/polySolver.cpp +++ b/src/poly/solver/private/polySolver.cpp @@ -335,31 +335,6 @@ void PolySolver::LoadSolverUserParams(double &newtonRelTol, double &newtonAbsTol LOG_DEBUG(m_logger, "GMRES Solver (relTol: {:0.2E}, absTol: {:0.2E}, maxIter: {}, printLevel: {})", gmresRelTol, gmresAbsTol, gmresMaxIter, gmresPrintLevel); } -mfem::BlockDiagonalPreconditioner PolySolver::build_preconditioner() const { - // --- Set up the preconditioners. The non-linear form will use a Chebyshev Preconditioner while the linear terms will use a simpler Jacobi preconditioner --- - mfem::BlockDiagonalPreconditioner prec(m_polytropOperator->GetBlockOffsets()); - const mfem::BlockOperator &jacobian = m_polytropOperator->GetJacobianOperator(); - - // Get all the blocks. J00 -> Non-linear form (df(θ)/dθ), J01-> -M, J10 -> -Q, J11 -> D - const mfem::Operator& J00 = jacobian.GetBlock(0, 0); - mfem::Vector J00diag; - - J00.AssembleDiagonal(J00diag); - - SSE::MFEMArrayPairSet ess_tdof_pair_set = m_polytropOperator->GetEssentialTrueDofs(); - - // TODO: This order may need to be tuned (EMB) - // --- ess_tdof_pair_set.first -> (theta dof ids, theta dof vals).first -> theta dof ids - // --- ess_tdof_pair_set.second -> (phi dof ids, phi dof vals).first -> phi dof ids - mfem::OperatorChebyshevSmoother J00Prec(J00, J00diag, ess_tdof_pair_set.first.first, 2); - mfem::OperatorJacobiSmoother J11Prec(m_polytropOperator->GetJ11diag(), ess_tdof_pair_set.second.first); - - prec.SetDiagonalBlock(0, &J00Prec); - prec.SetDiagonalBlock(1, &J11Prec); - - return prec; -} - mfem::NewtonSolver PolySolver::setupNewtonSolver() const { // --- Load configuration parameters --- double newtonRelTol, newtonAbsTol, gmresRelTol, gmresAbsTol; diff --git a/src/poly/solver/public/polySolver.h b/src/poly/solver/public/polySolver.h index ce2aa87..081e087 100644 --- a/src/poly/solver/public/polySolver.h +++ b/src/poly/solver/public/polySolver.h @@ -64,7 +64,6 @@ private: // Private methods void LoadSolverUserParams(double &newtonRelTol, double &newtonAbsTol, int &newtonMaxIter, int &newtonPrintLevel, double &gmresRelTol, double &gmresAbsTol, int &gmresMaxIter, int &gmresPrintLevel) const; - mfem::BlockDiagonalPreconditioner build_preconditioner() const; }; #endif // POLYSOLVER_H \ No newline at end of file