fixes str.find bug and cmake files

This commit is contained in:
John Dupuy
2023-09-28 13:30:50 -05:00
parent 1f32157513
commit 0a0a1ad547
7 changed files with 20 additions and 28 deletions

View File

@@ -25,13 +25,13 @@ void VelSolver::basicSolveEquations()
void VelSolver::handleSingularMatrix()
{
std::string str = typeid(*matrixSolver).name();
if (str.find("GESpMatParPvMarkoFast") >= 0) {
if (str.find("GESpMatParPvMarkoFast") != std::string::npos) {
matrixSolver = CREATE<GESpMatParPvPrecise>::With();
this->solveEquations();
}
else {
str = typeid(*matrixSolver).name();
if (str.find("GESpMatParPvPrecise") >= 0) {
if (str.find("GESpMatParPvPrecise") != std::string::npos) {
this->logSingularMatrixMessage();
matrixSolver = this->matrixSolverClassNew();
}