fastSparseProduct.hpp --> fastSparseOperations.hpp

This commit is contained in:
Robert Kloefkorn 2016-02-15 11:38:09 +01:00
parent 743fad877a
commit 4df4c9147a
4 changed files with 7 additions and 6 deletions

View File

@ -138,7 +138,7 @@ list (APPEND PUBLIC_HEADER_FILES
opm/autodiff/BlackoilSolventState.hpp
opm/autodiff/BlackoilMultiSegmentModel.hpp
opm/autodiff/BlackoilMultiSegmentModel_impl.hpp
opm/autodiff/fastSparseProduct.hpp
opm/autodiff/fastSparseOperations.hpp
opm/autodiff/DuneMatrix.hpp
opm/autodiff/ExtractParallelGridInformationToISTL.hpp
opm/autodiff/FlowMain.hpp

View File

@ -24,7 +24,7 @@
#include <Eigen/Eigen>
#include <Eigen/Sparse>
#include <opm/autodiff/fastSparseProduct.hpp>
#include <opm/autodiff/fastSparseOperations.hpp>
#include <opm/common/utility/platform_dependent/reenable_warnings.h>

View File

@ -28,7 +28,7 @@
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
#include <opm/common/ErrorMacros.hpp>
#include <opm/autodiff/fastSparseProduct.hpp>
#include <opm/autodiff/fastSparseOperations.hpp>
#include <vector>

View File

@ -181,8 +181,8 @@ template<typename Lhs, typename Rhs>
inline bool
equalSparsityPattern(const Lhs& lhs, const Rhs& rhs)
{
// if non zeros don't match, matrices don't have the same sparsity pattern
bool equal = (lhs.nonZeros() == rhs.nonZeros());
// if both matrices have equal storage and non zeros match, we can check sparsity pattern
bool equal = (Lhs::IsRowMajor == Rhs::IsRowMajor) && (lhs.nonZeros() == rhs.nonZeros());
// check complete sparsity pattern
if( equal )
@ -195,7 +195,6 @@ equalSparsityPattern(const Lhs& lhs, const Rhs& rhs)
for(Index i=0; i<nnz; ++i )
{
//equal &= ( lhsJ[ i ] == rhsJ[ i ] );
if( lhsJ[ i ] != rhsJ[ i ] )
return false;
}
@ -228,6 +227,7 @@ fastSparseAdd(Lhs& lhs, const Rhs& rhs)
}
else
{
// default Eigen operator+=
lhs += rhs;
}
}
@ -256,6 +256,7 @@ fastSparseSubstract(Lhs& lhs, const Rhs& rhs)
}
else
{
// default Eigen operator-=
lhs -= rhs;
}
}