feat(poly): preconditioner is now being computed

This commit is contained in:
2025-04-21 08:35:29 -04:00
parent 184f92faf1
commit 58cebc6167
4 changed files with 31 additions and 24 deletions

View File

@@ -19,6 +19,12 @@ namespace laneEmden {
double thetaSeriesExpansion(double xi, double n, int order);
}
// Struct to persist lifetime of the linear and nonlinear solvers
struct solverBundle {
mfem::GMRESSolver solver;
mfem::NewtonSolver newton;
};
class PolySolver {
public: // Public methods
PolySolver(double n, double order);
@@ -58,7 +64,7 @@ private: // Private methods
std::pair<mfem::Array<int>, mfem::Array<int>> findCenterElement() const;
void setInitialGuess() const;
void saveAndViewSolution(const mfem::BlockVector& state_vector) const;
mfem::NewtonSolver setupNewtonSolver() const;
solverBundle setupNewtonSolver() const;
void setupOperator() const;
void LoadSolverUserParams(double &newtonRelTol, double &newtonAbsTol, int &newtonMaxIter, int &newtonPrintLevel,