mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
commit
d007cd8e6e
@ -828,7 +828,6 @@ namespace Opm
|
||||
|
||||
if( msWells().empty() ) return ;
|
||||
|
||||
std::string modestring[4] = { "BHP", "THP", "RESERVOIR_RATE", "SURFACE_RATE" };
|
||||
// Find, for each well, if any constraints are broken. If so,
|
||||
// switch control to first broken constraint.
|
||||
const int np = numPhases();
|
||||
|
@ -23,6 +23,7 @@
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#include <opm/simulators/WellSwitchingLogger.hpp>
|
||||
#include <numeric>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -115,18 +116,19 @@ void WellSwitchingLogger::unpackDataAndLog(std::vector<char>& recv_buffer,
|
||||
well_name_lengths.data(), well_name_lengths.size(),
|
||||
MPI_INT, MPI_COMM_WORLD);
|
||||
|
||||
std::vector<char> well_name;
|
||||
for ( int i = 0; i < no_switches; ++i )
|
||||
{
|
||||
char well_name[well_name_lengths[i]] = {};
|
||||
well_name.resize(well_name_lengths[i]);
|
||||
MPI_Unpack(recv_buffer.data(), recv_buffer.size(), &offset,
|
||||
well_name, well_name_lengths[i], MPI_CHAR,
|
||||
well_name.data(), well_name_lengths[i], MPI_CHAR,
|
||||
MPI_COMM_WORLD);
|
||||
|
||||
std::array<char,2> fromto{{}};
|
||||
MPI_Unpack(recv_buffer.data(), recv_buffer.size(), &offset,
|
||||
fromto.data(), 2, MPI_CHAR, MPI_COMM_WORLD);
|
||||
|
||||
logSwitch(well_name, fromto, p);
|
||||
logSwitch(well_name.data(), fromto, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#ifndef OPM_WELLSWITCHINGLOGGER_HEADER_INCLUDED
|
||||
#define OPM_WELLSWITCHINGLOGGER_HEADER_INCLUDED
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
Loading…
Reference in New Issue
Block a user