merge
This commit is contained in:
commit
cea5324e4e
@ -136,7 +136,6 @@ namespace Opm {
|
|||||||
|
|
||||||
if (gravity_) {
|
if (gravity_) {
|
||||||
store_.drho() = fluid_.density(0) - fluid_.density(1);
|
store_.drho() = fluid_.density(0) - fluid_.density(1);
|
||||||
//this->computeStaticGravity(g, gravity_);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int c = 0, i = 0; c < g.number_of_cells; ++c) {
|
for (int c = 0, i = 0; c < g.number_of_cells; ++c) {
|
||||||
@ -314,32 +313,37 @@ namespace Opm {
|
|||||||
void
|
void
|
||||||
initGravityTrans(const Grid& g ,
|
initGravityTrans(const Grid& g ,
|
||||||
const std::vector<double> & htrans) {
|
const std::vector<double> & htrans) {
|
||||||
// int n_hf =g.cell_facepos[ g.number_of_cells ];
|
|
||||||
if(htrans.size()>0){
|
assert (htrans.size() ==
|
||||||
for (int f = 0; f < g.number_of_faces; ++f) {
|
static_cast<std::vector<double>::size_type>(g.cell_facepos[ g.number_of_cells ]));
|
||||||
store_.trans(f)=0;
|
|
||||||
}
|
for (int f = 0; f < g.number_of_faces; ++f) {
|
||||||
for (int f = 0; f < g.number_of_faces; ++f) {
|
store_.trans(f) = 0.0;
|
||||||
for (int j=0;j < 2; ++j){
|
}
|
||||||
int hf=f2hf_[2*f+j];
|
|
||||||
if(!(hf==-1)){
|
for (int c = 0, i = 0; c < g.number_of_cells; ++c) {
|
||||||
assert(hf>=0);
|
for (; i < g.cell_facepos[c + 1]; ++i) {
|
||||||
store_.trans(f)+=1/htrans[hf];
|
int f = g.cell_faces[i];
|
||||||
}
|
|
||||||
}
|
assert (htrans[i] > 0.0);
|
||||||
}
|
|
||||||
for (int f = 0; f < g.number_of_faces; ++f) {
|
store_.trans(f) += 1.0 / htrans[i];
|
||||||
store_.trans(f)=1/store_.trans(f);
|
|
||||||
assert(store_.trans(f)>0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (int f = 0; f < g.number_of_faces; ++f) {
|
||||||
|
store_.trans(f) = 1.0 / store_.trans(f);
|
||||||
|
}
|
||||||
|
|
||||||
if (gravity_) {
|
if (gravity_) {
|
||||||
this->computeStaticGravity(g, gravity_);
|
this->computeStaticGravity(g);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
// Newton control
|
// Newton control
|
||||||
// -----------------------------------------------------------------
|
// -----------------------------------------------------------------
|
||||||
|
|
||||||
template <class ReservoirState,
|
template <class ReservoirState,
|
||||||
class Grid ,
|
class Grid ,
|
||||||
class JacobianSystem>
|
class JacobianSystem>
|
||||||
@ -494,8 +498,8 @@ namespace Opm {
|
|||||||
|
|
||||||
template <class Grid>
|
template <class Grid>
|
||||||
void
|
void
|
||||||
computeStaticGravity(const Grid& g ,
|
computeStaticGravity(const Grid& g) {
|
||||||
const double* grav ){
|
|
||||||
const int d = g.dimensions;
|
const int d = g.dimensions;
|
||||||
|
|
||||||
for (int c = 0, i = 0; c < g.number_of_cells; ++c) {
|
for (int c = 0, i = 0; c < g.number_of_cells; ++c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user