mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fastSparseProduct.hpp --> fastSparseOperations.hpp
This commit is contained in:
parent
743fad877a
commit
4df4c9147a
@ -138,7 +138,7 @@ list (APPEND PUBLIC_HEADER_FILES
|
|||||||
opm/autodiff/BlackoilSolventState.hpp
|
opm/autodiff/BlackoilSolventState.hpp
|
||||||
opm/autodiff/BlackoilMultiSegmentModel.hpp
|
opm/autodiff/BlackoilMultiSegmentModel.hpp
|
||||||
opm/autodiff/BlackoilMultiSegmentModel_impl.hpp
|
opm/autodiff/BlackoilMultiSegmentModel_impl.hpp
|
||||||
opm/autodiff/fastSparseProduct.hpp
|
opm/autodiff/fastSparseOperations.hpp
|
||||||
opm/autodiff/DuneMatrix.hpp
|
opm/autodiff/DuneMatrix.hpp
|
||||||
opm/autodiff/ExtractParallelGridInformationToISTL.hpp
|
opm/autodiff/ExtractParallelGridInformationToISTL.hpp
|
||||||
opm/autodiff/FlowMain.hpp
|
opm/autodiff/FlowMain.hpp
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include <Eigen/Eigen>
|
#include <Eigen/Eigen>
|
||||||
#include <Eigen/Sparse>
|
#include <Eigen/Sparse>
|
||||||
#include <opm/autodiff/fastSparseProduct.hpp>
|
#include <opm/autodiff/fastSparseOperations.hpp>
|
||||||
|
|
||||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
#include <opm/common/utility/platform_dependent/reenable_warnings.h>
|
||||||
|
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
#include <opm/autodiff/fastSparseProduct.hpp>
|
#include <opm/autodiff/fastSparseOperations.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
@ -181,8 +181,8 @@ template<typename Lhs, typename Rhs>
|
|||||||
inline bool
|
inline bool
|
||||||
equalSparsityPattern(const Lhs& lhs, const Rhs& rhs)
|
equalSparsityPattern(const Lhs& lhs, const Rhs& rhs)
|
||||||
{
|
{
|
||||||
// if non zeros don't match, matrices don't have the same sparsity pattern
|
// if both matrices have equal storage and non zeros match, we can check sparsity pattern
|
||||||
bool equal = (lhs.nonZeros() == rhs.nonZeros());
|
bool equal = (Lhs::IsRowMajor == Rhs::IsRowMajor) && (lhs.nonZeros() == rhs.nonZeros());
|
||||||
|
|
||||||
// check complete sparsity pattern
|
// check complete sparsity pattern
|
||||||
if( equal )
|
if( equal )
|
||||||
@ -195,7 +195,6 @@ equalSparsityPattern(const Lhs& lhs, const Rhs& rhs)
|
|||||||
|
|
||||||
for(Index i=0; i<nnz; ++i )
|
for(Index i=0; i<nnz; ++i )
|
||||||
{
|
{
|
||||||
//equal &= ( lhsJ[ i ] == rhsJ[ i ] );
|
|
||||||
if( lhsJ[ i ] != rhsJ[ i ] )
|
if( lhsJ[ i ] != rhsJ[ i ] )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -228,6 +227,7 @@ fastSparseAdd(Lhs& lhs, const Rhs& rhs)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// default Eigen operator+=
|
||||||
lhs += rhs;
|
lhs += rhs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -256,6 +256,7 @@ fastSparseSubstract(Lhs& lhs, const Rhs& rhs)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// default Eigen operator-=
|
||||||
lhs -= rhs;
|
lhs -= rhs;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user