opm-core: make it work nicely with clang
This commit is contained in:
parent
ac5599bf6f
commit
2a79bb2fe2
@ -191,21 +191,7 @@ namespace {
|
||||
return us;
|
||||
}
|
||||
|
||||
inline std::string readKeyword(std::istream& is)
|
||||
{
|
||||
std::string keyword_candidate;
|
||||
while (!is.eof()) {
|
||||
is >> keyword_candidate;
|
||||
if(keyword_candidate.find("--") == 0) {
|
||||
is >> ignoreLine; // This line is a comment
|
||||
} else {
|
||||
return upcase(keyword_candidate);
|
||||
}
|
||||
}
|
||||
return "CONTINUE"; // Last line in included file is a comment
|
||||
}
|
||||
|
||||
inline bool readKeywordNew(std::istream& is, std::string& keyword)
|
||||
inline bool readKeyword(std::istream& is, std::string& keyword)
|
||||
{
|
||||
char buf[9];
|
||||
int i, j;
|
||||
@ -377,7 +363,7 @@ void EclipseGridParser::readImpl(istream& is)
|
||||
std::string keyword;
|
||||
while (is.good()) {
|
||||
is >> ignoreWhitespace;
|
||||
bool ok = readKeywordNew(is, keyword);
|
||||
bool ok = readKeyword(is, keyword);
|
||||
if (ok) {
|
||||
//#ifdef VERBOSE
|
||||
cout << "Keyword found: " << keyword << endl;
|
||||
|
@ -129,47 +129,47 @@ public:
|
||||
{ return dynamic_cast<const keyword&>(*getSpecialValue(#keyword)); }
|
||||
|
||||
// Support for special fields.
|
||||
SPECIAL_FIELD(SPECGRID);
|
||||
SPECIAL_FIELD(FAULTS);
|
||||
SPECIAL_FIELD(MULTFLT);
|
||||
SPECIAL_FIELD(TITLE);
|
||||
SPECIAL_FIELD(START);
|
||||
SPECIAL_FIELD(DATES);
|
||||
SPECIAL_FIELD(DENSITY);
|
||||
SPECIAL_FIELD(PVDG);
|
||||
SPECIAL_FIELD(PVDO);
|
||||
SPECIAL_FIELD(PVTG);
|
||||
SPECIAL_FIELD(PVTO);
|
||||
SPECIAL_FIELD(PVTW);
|
||||
SPECIAL_FIELD(SGOF);
|
||||
SPECIAL_FIELD(SWOF);
|
||||
SPECIAL_FIELD(ROCK);
|
||||
SPECIAL_FIELD(ROCKTAB);
|
||||
SPECIAL_FIELD(WELSPECS);
|
||||
SPECIAL_FIELD(COMPDAT);
|
||||
SPECIAL_FIELD(WCONINJE);
|
||||
SPECIAL_FIELD(WCONPROD);
|
||||
SPECIAL_FIELD(WELTARG);
|
||||
SPECIAL_FIELD(WELOPEN);
|
||||
SPECIAL_FIELD(EQUIL);
|
||||
SPECIAL_FIELD(PVCDO);
|
||||
SPECIAL_FIELD(TSTEP);
|
||||
SPECIAL_FIELD(PLYVISC);
|
||||
SPECIAL_FIELD(PLYROCK);
|
||||
SPECIAL_FIELD(PLYADS);
|
||||
SPECIAL_FIELD(PLYMAX);
|
||||
SPECIAL_FIELD(TLMIXPAR);
|
||||
SPECIAL_FIELD(WPOLYMER);
|
||||
SPECIAL_FIELD(GRUPTREE);
|
||||
SPECIAL_FIELD(GCONINJE);
|
||||
SPECIAL_FIELD(GCONPROD);
|
||||
SPECIAL_FIELD(WGRUPCON);
|
||||
SPECIAL_FIELD(SPECGRID)
|
||||
SPECIAL_FIELD(FAULTS)
|
||||
SPECIAL_FIELD(MULTFLT)
|
||||
SPECIAL_FIELD(TITLE)
|
||||
SPECIAL_FIELD(START)
|
||||
SPECIAL_FIELD(DATES)
|
||||
SPECIAL_FIELD(DENSITY)
|
||||
SPECIAL_FIELD(PVDG)
|
||||
SPECIAL_FIELD(PVDO)
|
||||
SPECIAL_FIELD(PVTG)
|
||||
SPECIAL_FIELD(PVTO)
|
||||
SPECIAL_FIELD(PVTW)
|
||||
SPECIAL_FIELD(SGOF)
|
||||
SPECIAL_FIELD(SWOF)
|
||||
SPECIAL_FIELD(ROCK)
|
||||
SPECIAL_FIELD(ROCKTAB)
|
||||
SPECIAL_FIELD(WELSPECS)
|
||||
SPECIAL_FIELD(COMPDAT)
|
||||
SPECIAL_FIELD(WCONINJE)
|
||||
SPECIAL_FIELD(WCONPROD)
|
||||
SPECIAL_FIELD(WELTARG)
|
||||
SPECIAL_FIELD(WELOPEN)
|
||||
SPECIAL_FIELD(EQUIL)
|
||||
SPECIAL_FIELD(PVCDO)
|
||||
SPECIAL_FIELD(TSTEP)
|
||||
SPECIAL_FIELD(PLYVISC)
|
||||
SPECIAL_FIELD(PLYROCK)
|
||||
SPECIAL_FIELD(PLYADS)
|
||||
SPECIAL_FIELD(PLYMAX)
|
||||
SPECIAL_FIELD(TLMIXPAR)
|
||||
SPECIAL_FIELD(WPOLYMER)
|
||||
SPECIAL_FIELD(GRUPTREE)
|
||||
SPECIAL_FIELD(GCONINJE)
|
||||
SPECIAL_FIELD(GCONPROD)
|
||||
SPECIAL_FIELD(WGRUPCON)
|
||||
|
||||
// The following fields only have a dummy implementation
|
||||
// that allows us to ignore them.
|
||||
SPECIAL_FIELD(SWFN);
|
||||
SPECIAL_FIELD(SOF2);
|
||||
SPECIAL_FIELD(TUNING);
|
||||
SPECIAL_FIELD(SWFN)
|
||||
SPECIAL_FIELD(SOF2)
|
||||
SPECIAL_FIELD(TUNING)
|
||||
|
||||
#undef SPECIAL_FIELD
|
||||
|
||||
|
@ -89,9 +89,9 @@ namespace Opm
|
||||
const RockCompressibility* rock_comp_;
|
||||
const Wells* wells_;
|
||||
const std::vector<double>& src_;
|
||||
const FlowBoundaryConditions* bcs_;
|
||||
const LinearSolverInterface& linsolver_;
|
||||
const double* gravity_;
|
||||
//const FlowBoundaryConditions* bcs_;
|
||||
//const LinearSolverInterface& linsolver_;
|
||||
//const double* gravity_;
|
||||
// Solvers
|
||||
IncompTpfa psolver_;
|
||||
TransportModelTwophase tsolver_;
|
||||
@ -207,9 +207,9 @@ namespace Opm
|
||||
rock_comp_(rock_comp),
|
||||
wells_(wells),
|
||||
src_(src),
|
||||
bcs_(bcs),
|
||||
linsolver_(linsolver),
|
||||
gravity_(gravity),
|
||||
//bcs_(bcs),
|
||||
//linsolver_(linsolver),
|
||||
//gravity_(gravity),
|
||||
psolver_(grid, props, rock_comp, linsolver,
|
||||
param.getDefault("nl_pressure_residual_tolerance", 0.0),
|
||||
param.getDefault("nl_pressure_change_tolerance", 1.0),
|
||||
|
@ -36,7 +36,7 @@ namespace Opm
|
||||
class SimulatorTimer;
|
||||
class TwophaseState;
|
||||
class WellState;
|
||||
class SimulatorReport;
|
||||
struct SimulatorReport;
|
||||
|
||||
/// Class collecting all necessary components for a two-phase simulation.
|
||||
class SimulatorTwophase
|
||||
|
@ -86,7 +86,7 @@ namespace Opm
|
||||
template<class Derived>
|
||||
static void addCreator(const std::string& type)
|
||||
{
|
||||
instance().doAddCreator<Derived>(type);
|
||||
instance().template doAddCreator<Derived>(type);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -73,7 +73,7 @@ class MonotCubicInterpolator {
|
||||
if (!read(datafilename)) {
|
||||
throw("Unable to constuct MonotCubicInterpolator from file.") ;
|
||||
} ;
|
||||
} ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@ -94,7 +94,7 @@ class MonotCubicInterpolator {
|
||||
if (!read(std::string(datafilename))) {
|
||||
throw("Unable to constuct MonotCubicInterpolator from file.") ;
|
||||
} ;
|
||||
} ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@ -110,7 +110,7 @@ class MonotCubicInterpolator {
|
||||
if (!read(std::string(datafilename),xColumn,fColumn)) {
|
||||
throw("Unable to constuct MonotCubicInterpolator from file.") ;
|
||||
} ;
|
||||
} ;
|
||||
}
|
||||
|
||||
/**
|
||||
@param datafilename data file
|
||||
@ -125,7 +125,7 @@ class MonotCubicInterpolator {
|
||||
if (!read(datafilename,xColumn,fColumn)) {
|
||||
throw("Unable to constuct MonotCubicInterpolator from file.") ;
|
||||
} ;
|
||||
} ;
|
||||
}
|
||||
|
||||
/**
|
||||
@param x vector of x values
|
||||
@ -144,7 +144,7 @@ class MonotCubicInterpolator {
|
||||
This object must be treated with care until
|
||||
populated.
|
||||
*/
|
||||
MonotCubicInterpolator() {;} ;
|
||||
MonotCubicInterpolator() { }
|
||||
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ class MonotCubicInterpolator {
|
||||
*/
|
||||
bool read(const std::string & datafilename) {
|
||||
return read(datafilename,1,2) ;
|
||||
} ;
|
||||
}
|
||||
|
||||
/**
|
||||
@param datafilename data file
|
||||
@ -188,7 +188,7 @@ class MonotCubicInterpolator {
|
||||
|
||||
@return f(x) for a given x
|
||||
*/
|
||||
double operator () (double x) const { return evaluate(x) ; } ;
|
||||
double operator () (double x) const { return evaluate(x) ; }
|
||||
|
||||
/**
|
||||
@param x x value
|
||||
@ -485,7 +485,7 @@ class MonotCubicInterpolator {
|
||||
*/
|
||||
void shrinkFlatAreas() {
|
||||
shrinkFlatAreas(1e-14);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user