mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #590 from dr-robertk/PR/bugfix-in-backup-restore
Bugfix in backup/restore.
This commit is contained in:
@@ -106,7 +106,7 @@ namespace Opm {
|
|||||||
void readContainerImpl( std::istream& stream, Container& container, const bool adjustSize )
|
void readContainerImpl( std::istream& stream, Container& container, const bool adjustSize )
|
||||||
{
|
{
|
||||||
typedef typename Container :: value_type T;
|
typedef typename Container :: value_type T;
|
||||||
size_t dataSize = 0;
|
unsigned int dataSize = 0;
|
||||||
readValue( stream, dataSize );
|
readValue( stream, dataSize );
|
||||||
if( adjustSize && dataSize > 0 ) {
|
if( adjustSize && dataSize > 0 ) {
|
||||||
resizeContainer( container, dataSize/sizeof(T) );
|
resizeContainer( container, dataSize/sizeof(T) );
|
||||||
@@ -115,7 +115,7 @@ namespace Opm {
|
|||||||
if( dataSize != container.size() * sizeof( T ) )
|
if( dataSize != container.size() * sizeof( T ) )
|
||||||
{
|
{
|
||||||
OPM_THROW(std::logic_error,
|
OPM_THROW(std::logic_error,
|
||||||
"Size of stored data and simulation data does not match"
|
"Size of stored data and simulation data does not match "
|
||||||
<< dataSize << " " << (container.size() * sizeof( T )) );
|
<< dataSize << " " << (container.size() * sizeof( T )) );
|
||||||
}
|
}
|
||||||
if( dataSize > 0 ) {
|
if( dataSize > 0 ) {
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ fastSparseAdd(Lhs& lhs, const Rhs& rhs)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// default Eigen operator+=
|
// default Eigen operator+=
|
||||||
lhs = lhs + rhs;
|
lhs += rhs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ fastSparseSubstract(Lhs& lhs, const Rhs& rhs)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// default Eigen operator-=
|
// default Eigen operator-=
|
||||||
lhs = lhs - rhs;
|
lhs -= rhs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user