mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Move multMatrixTransposed for better testability.
Otherwise we need to deal with the property system of ewoms.
This commit is contained in:
parent
e53374b8ec
commit
3be954fe98
@ -310,6 +310,27 @@ public:
|
|||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
|
namespace Detail
|
||||||
|
{
|
||||||
|
//! calculates ret = A^T * B
|
||||||
|
template< class K, int m, int n, int p >
|
||||||
|
static inline void multMatrixTransposed ( const Dune::FieldMatrix< K, n, m > &A,
|
||||||
|
const Dune::FieldMatrix< K, n, p > &B,
|
||||||
|
Dune::FieldMatrix< K, m, p > &ret )
|
||||||
|
{
|
||||||
|
typedef typename Dune::FieldMatrix< K, m, p > :: size_type size_type;
|
||||||
|
|
||||||
|
for( size_type i = 0; i < m; ++i )
|
||||||
|
{
|
||||||
|
for( size_type j = 0; j < p; ++j )
|
||||||
|
{
|
||||||
|
ret[ i ][ j ] = K( 0 );
|
||||||
|
for( size_type k = 0; k < n; ++k )
|
||||||
|
ret[ i ][ j ] += A[ k ][ i ] * B[ k ][ j ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/// This class solves the fully implicit black-oil system by
|
/// This class solves the fully implicit black-oil system by
|
||||||
/// solving the reduced system (after eliminating well variables)
|
/// solving the reduced system (after eliminating well variables)
|
||||||
/// as a block-structured matrix (one block for all cell variables) for a fixed
|
/// as a block-structured matrix (one block for all cell variables) for a fixed
|
||||||
|
@ -22,27 +22,6 @@
|
|||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
namespace Detail
|
|
||||||
{
|
|
||||||
//! calculates ret = A^T * B
|
|
||||||
template< class K, int m, int n, int p >
|
|
||||||
static inline void multMatrixTransposed ( const Dune::FieldMatrix< K, n, m > &A,
|
|
||||||
const Dune::FieldMatrix< K, n, p > &B,
|
|
||||||
Dune::FieldMatrix< K, m, p > &ret )
|
|
||||||
{
|
|
||||||
typedef typename Dune::FieldMatrix< K, m, p > :: size_type size_type;
|
|
||||||
|
|
||||||
for( size_type i = 0; i < m; ++i )
|
|
||||||
{
|
|
||||||
for( size_type j = 0; j < p; ++j )
|
|
||||||
{
|
|
||||||
ret[ i ][ j ] = K( 0 );
|
|
||||||
for( size_type k = 0; k < n; ++k )
|
|
||||||
ret[ i ][ j ] += A[ k ][ i ] * B[ k ][ j ];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
StandardWell<TypeTag>::
|
StandardWell<TypeTag>::
|
||||||
|
Loading…
Reference in New Issue
Block a user