Merge pull request #235 from joakim-hove/ert-master

Minor update to build opm-core with current ert master
This commit is contained in:
Atgeirr Flø Rasmussen
2013-05-02 13:24:27 -07:00
2 changed files with 19 additions and 5 deletions

View File

@@ -966,9 +966,16 @@ ecl_grid_type * EclipseGridParser::newGrid( ) {
void EclipseGridParser::saveEGRID( const std::string & filename) const {
bool endian_flip = true;//ECL_ENDIAN_FLIP;
bool fmt_file = ecl_util_fmt_file( filename.c_str() );
bool fmt_file;
struct grdecl grdecl = get_grdecl();
fortio_type * fortio = fortio_open_writer( filename.c_str() , fmt_file , endian_flip );
fortio_type * fortio;
if (!ecl_util_fmt_file( filename.c_str() , &fmt_file)) {
cerr << "Could not determine formatted/unformatted status of file:" << filename << " non-standard name?" << endl;
throw exception();
}
fortio = fortio_open_writer( filename.c_str() , fmt_file , endian_flip );
{
float * mapaxes = NULL;
if (grdecl.mapaxes != NULL) {
@@ -1023,9 +1030,16 @@ void EclipseGridParser::save_kw( fortio_type * fortio , const std::string & kw ,
void EclipseGridParser::saveINIT( const std::string & filename , const ecl_grid_type * ecl_grid) {
int phases = ECL_OIL_PHASE + ECL_WATER_PHASE;
bool fmt_file = ecl_util_fmt_file( filename.c_str() );
bool endian_flip = true;//ECL_ENDIAN_FLIP;
fortio_type * fortio = fortio_open_writer( filename.c_str() , fmt_file , endian_flip );
bool fmt_file;
fortio_type * fortio;
if (!ecl_util_fmt_file( filename.c_str() , &fmt_file)) {
cerr << "Could not determine formatted/unformatted status of file:" << filename << " non-standard name?" << endl;
throw exception();
}
fortio = fortio_open_writer( filename.c_str() , fmt_file , endian_flip );
{
ecl_kw_type * poro_kw = newEclKW( PORO_KW , ECL_FLOAT_TYPE );
time_t start_date;

View File

@@ -94,7 +94,7 @@ namespace Opm
const std::string& base_name) {
ecl_file_enum file_type = ECL_UNIFIED_RESTART_FILE; // Alternatively ECL_RESTART_FILE for multiple restart files.
bool fmt_file = true;
bool fmt_file = false;
char * filename = ecl_util_alloc_filename(output_dir.c_str() , base_name.c_str() , file_type , fmt_file , current_step );
int phases = ECL_OIL_PHASE + ECL_WATER_PHASE;