Formatting fixes.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-09-03 15:07:03 +02:00
parent b93bb4fcf9
commit 3e294a4a81
6 changed files with 25 additions and 28 deletions

View File

@ -39,7 +39,7 @@ namespace Opm
}
void BlackoilPvtProperties::init(const EclipseGridParser& deck,const int samples)
void BlackoilPvtProperties::init(const EclipseGridParser& deck, const int samples)
{
typedef std::vector<std::vector<std::vector<double> > > table_t;
// If we need multiple regions, this class and the SinglePvt* classes must change.

View File

@ -47,7 +47,7 @@ namespace Opm
BlackoilPvtProperties();
/// Initialize from deck.
void init(const EclipseGridParser& deck,const int samples = 16);
void init(const EclipseGridParser& deck, const int samples = 16);
/// Number of active phases.
int numPhases() const;

View File

@ -106,15 +106,13 @@ namespace Opm
double* output_B,
double* output_dBdp) const
{
//B(n, p, 0, output_B);
if (comp_) {
// #pragma omp parallel for
for (int i = 0; i < n; ++i) {
//output_dBdp[i] = -comp_*output_B[i];
double x = comp_*(p[i] - ref_press_);
double d= (1.0 + x + 0.5*x*x);
output_B[i] = ref_B_/d;//(1.0 + x + 0.5*x*x);
output_dBdp[i] = (- ref_B_/(d*d))*(1 + x) *comp_;
double d = (1.0 + x + 0.5*x*x);
output_B[i] = ref_B_/d;
output_dBdp[i] = (-ref_B_/(d*d))*(1 + x) * comp_;
}
} else {
std::fill(output_B, output_B + n, ref_B_);

View File

@ -33,7 +33,7 @@ namespace Opm
// Member functions
//-------------------------------------------------------------------------
/// Constructor
SinglePvtDead::SinglePvtDead(const table_t& pvd_table,const int samples)
SinglePvtDead::SinglePvtDead(const table_t& pvd_table, const int samples)
{
const int region_number = 0;
if (pvd_table.size() != 1) {

View File

@ -37,7 +37,7 @@ namespace Opm
{
public:
typedef std::vector<std::vector<std::vector<double> > > table_t;
SinglePvtDead(const table_t& pvd_table,const int samples = 16);
SinglePvtDead(const table_t& pvd_table, const int samples = 16);
virtual ~SinglePvtDead();
/// Viscosity as a function of p and z.

View File

@ -191,12 +191,11 @@ namespace Opm {
// Implements derivative consistent
// with ClosestValue policy for function
double value;
if(xparam > xmax_ || xparam < xmin_){
value=0.0;
}else{
if (xparam > xmax_ || xparam < xmin_) {
value = 0.0;
} else {
double x = std::min(xparam, xmax_);
x = std::max(x, xmin_);
// Lookup is easy since we are uniform in x.
double pos = (x - xmin_)/xdelta_;
double posi = std::floor(pos);