for some of these files this is needed to make to keep it compiling after the next patch because the new ErrorMacros.hpp file will no longer implicitly includes <iostream>. for the remaining files it is just good style. While at it, the includes for most of these files have been ordered in order of decreasing abstraction level.
63 lines
1.3 KiB
C++
63 lines
1.3 KiB
C++
//===========================================================================
|
|
//
|
|
// File: test_readpolymer.cpp
|
|
//
|
|
// Created: Thu Jan 12 15:18:46 2012
|
|
//
|
|
// Author: Bjørn Spjelkavik <bsp@sintef.no>
|
|
//
|
|
// Revision: $Id$
|
|
//
|
|
//===========================================================================
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <opm/core/io/eclipse/EclipseGridParser.hpp>
|
|
|
|
#include <iostream>
|
|
|
|
// Test program for reading Eclipse Polymer keywords.
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
using namespace std;
|
|
|
|
std::string ecl_filename;
|
|
if (argc == 2) {
|
|
ecl_filename = argv[1];
|
|
} else {
|
|
std::cout << "\nUsage: test_readpolymer filename.grdecl\n";
|
|
exit( 1 );
|
|
}
|
|
|
|
|
|
bool convert_to_SI = true;
|
|
Opm::EclipseGridParser parser(ecl_filename, convert_to_SI);
|
|
|
|
std::cout << "\n Polymer fields\n\n";
|
|
|
|
if (parser.hasField("PLYVISC")) {
|
|
parser.getPLYVISC().write(std::cout);
|
|
}
|
|
if (parser.hasField("PLYROCK")) {
|
|
parser.getPLYROCK().write(std::cout);
|
|
}
|
|
if (parser.hasField("PLYADS")) {
|
|
parser.getPLYADS().write(std::cout);
|
|
}
|
|
if (parser.hasField("TLMIXPAR")) {
|
|
parser.getTLMIXPAR().write(std::cout);
|
|
}
|
|
if (parser.hasField("PLYMAX")) {
|
|
parser.getPLYMAX().write(std::cout);
|
|
}
|
|
if (parser.hasField("WPOLYMER")) {
|
|
parser.getWPOLYMER().write(std::cout);
|
|
}
|
|
|
|
}
|
|
|
|
|