Ejemplo n.º 1
0
    def setUp(self):
        # Funny setup to ensure that the 32 bit memory region is
        # exhausted. Then we do some (grid-based) pointer
        # dereferencing in the 64 bit memory region - this has been
        # problematic in the past.
        vecList = []
        for i in range(12500):
            vec = DoubleVector()
            vec[81920] = 0
            vecList.append(vec)

        self.grid1 = ecl.EclGrid(case)
        self.grid2 = ecl.EclGrid(case)
Ejemplo n.º 2
0
#  FITNESS FOR A PARTICULAR PURPOSE.
#
#  See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
#  for more details.

import random
import copy

from ert.util.tvector import DoubleVector
from ert.util.tvector import IntVector
from ert.util.tvector import BoolVector
from ert.util.stringlist import StringList
import ert.util.stat as stat
from ert.util.util_func import *

v = DoubleVector(0)
print v
v[0] = 77.25
v[1] = 123.25
v[2] = 66.25
v[3] = 56.25
v[4] = 111.25
v[5] = 99.25
v[12] = 12
v.printf()
v.clear()

for i in range(100000):
    r = random.random()
    v.append(r)
Ejemplo n.º 3
0
    zcorn = EclKW.read_grdecl(fileH, "ZCORN")
    coord = EclKW.read_grdecl(fileH, "COORD")
    actnum = EclKW.read_grdecl(fileH, "ACTNUM", ecl_type=ecl.ECL_INT_TYPE)

    grid = ecl.EclGrid.create(specgrid, zcorn, coord, actnum)
    return grid


init_file = EclFile("data/eclipse/case/ECLIPSE.INIT")
egrid_file = "data/eclipse/case/ECLIPSE.EGRID"
grid_file = "data/eclipse/case/ECLIPSE.GRID"
grdecl_file = "data/eclipse/case/include/example_grid_sim.GRDECL"

grid = load_grdecl(grdecl_file)
grid = load_grid(grid_file)
grid = load_egrid(egrid_file)

print "Thickness(10,11,12): %g" % grid.cell_dz(ijk=(10, 11, 12))

permx_column = DoubleVector(-999)
grid.load_column(init_file.iget_named_kw("PERMX", 0), 5, 5, permx_column)
permx_column.printf()

print "top2    : %g   depth(10,10,0)    : %g " % (grid.top(
    10, 10), grid.depth(ijk=(10, 10, 0)))
print "bottom2 : %g   depth(10,10,nz-1) : %g " % (grid.bottom(
    10, 10), grid.depth(ijk=(10, 10, grid.nz - 1)))

kw_list = init_file[1:7]
print kw_list