Conversation
teseoch
left a comment
There was a problem hiding this comment.
can you try to add to the ci (UNIX only) trilinos installed with apt?
linear-solver-spec.json
Outdated
| ], | ||
| "doc": "Settings for the AMGCL solver." | ||
| }, | ||
| { |
There was a problem hiding this comment.
i dont think you need any of these, there are no options for trilinos
There was a problem hiding this comment.
you need to add the options from trilinos
src/polysolve/linear/Solver.cpp
Outdated
| Eigen::MatrixXd test_vertices; | ||
| Eigen::MatrixXd init_vertices; | ||
| std::vector<int> test_boundary_nodes; | ||
| Eigen::MatrixXd remove_boundary_vertices(const Eigen::MatrixXd &vertices, const std::vector<int> &boundary_nodes) |
src/polysolve/linear/Solver.hpp
Outdated
|
|
||
| namespace polysolve::linear | ||
| { | ||
| #ifdef POLYSOLVE_LARGE_INDEX |
| { | ||
| if (params.contains("Trilinos")) | ||
| { | ||
| if (params["Trilinos"].contains("block_size")) |
src/polysolve/linear/Solver.hpp
Outdated
| extern Eigen::MatrixXd init_vertices; | ||
| extern Eigen::MatrixXd test_vertices; | ||
| extern std::vector<int> test_boundary_nodes; | ||
| Eigen::MatrixXd remove_boundary_vertices(const Eigen::MatrixXd &vertices, const std::vector<int> &boundary_nodes); |
There was a problem hiding this comment.
this should be inside trilinos, not here
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #69 +/- ##
==========================================
- Coverage 81.20% 80.84% -0.37%
==========================================
Files 49 47 -2
Lines 2001 1879 -122
Branches 267 257 -10
==========================================
- Hits 1625 1519 -106
+ Misses 376 360 -16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
teseoch
left a comment
There was a problem hiding this comment.
we need unit test, with and without block size and null space
CMakeLists.txt
Outdated
| option(POLYSOLVE_WITH_CUSOLVER "Enable cuSOLVER library" OFF) | ||
| option(POLYSOLVE_WITH_PARDISO "Enable Pardiso library" OFF) | ||
| option(POLYSOLVE_WITH_HYPRE "Enable hypre" ON) | ||
| option(POLYSOLVE_WITH_HYPRE "Enable hypre" OFF) |
src/polysolve/linear/Solver.hpp
Outdated
|
|
||
| #include <Eigen/Dense> | ||
| #include <Eigen/Sparse> | ||
| #include <vector> |
| { | ||
| if (params.contains("Trilinos")) | ||
| { | ||
| if (params["Trilinos"].contains("block_size")) |
| { | ||
| conv_tol_ = params["Trilinos"]["tolerance"]; | ||
| } | ||
| if (params["Trilinos"].contains("is_nullspace")) |
There was a problem hiding this comment.
is_nullspace is not necessary to exist anymore, so it is removed.
| { | ||
| if (test_vertices.cols()==3) | ||
| { | ||
| reduced_vertices=remove_boundary_vertices(test_vertices,test_boundary_nodes); |
There was a problem hiding this comment.
this shoudnt be here, the null space is a method
| Eigen::MatrixXd test_vertices; | ||
| Eigen::MatrixXd init_vertices; | ||
| std::vector<int> test_boundary_nodes; | ||
| Eigen::MatrixXd remove_boundary_vertices(const Eigen::MatrixXd &vertices, const std::vector<int> &boundary_nodes) |
There was a problem hiding this comment.
this should be inside an util file
| #include <Eigen/Sparse> | ||
| #include <vector> | ||
|
|
||
| #ifdef HAVE_MPI |
| // column-major matrix, the solver will actually solve A^T x = b. | ||
| // | ||
|
|
||
| extern Eigen::MatrixXd init_vertices; |
There was a problem hiding this comment.
no extern, this is not part of the api
| #include "Teuchos_CommandLineProcessor.hpp" | ||
| #include "Epetra_Map.h" | ||
| #include "Epetra_Vector.h" | ||
| #include "Epetra_CrsMatrix.h" |
There was a problem hiding this comment.
they are all pointers, we could forward declare
src/polysolve/linear/Solver.hpp
Outdated
| /// and initialized. } | ||
| /// | ||
| virtual void solve(const Ref<const VectorXd> b, Ref<VectorXd> x) = 0; | ||
| virtual void solve(const Ref<const VectorXd> b, const Ref<const MatrixXd> nullspace, Ref<VectorXd> x) {} |
There was a problem hiding this comment.
this should call the other solve
|
|
||
| // Solve the linear system Ax = b | ||
| virtual void solve(const Ref<const VectorXd> b, Ref<VectorXd> x) override; | ||
| virtual void solve(const Ref<const VectorXd> b, const Ref<const MatrixXd> nullspace, Ref<VectorXd> x); |
No description provided.