Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
import ert.cwrap.clib as clib
# The libert_util library requires the libraries libz, libblas and
# liblapack. It is assumed that the library has been compiled with a
# suitable RPATH option (i.e. ERT_USE_RPATH has been set to True in
# the build process) and we 'just' load the final libert_util library
# directly. In principle it would be possible preload these libraries
# with calls like:
#
# clib.load("libz" , "libz.so.1")
# clib.load("libblas" , "libblas.so" , "libblas.so.3")
# clib.load("liblapack" , "liblapack.so")
UTIL_LIB = clib.ert_load("libert_util")
from .version import Version
from .enums import RngAlgTypeEnum, RngInitModeEnum, LLSQResultEnum
from .ctime import CTime
from .vector_template import VectorTemplate, PermutationVector
from .double_vector import DoubleVector
from .int_vector import IntVector
from .bool_vector import BoolVector
from .time_vector import TimeVector
from .stringlist import StringList
from .rng import RandomNumberGenerator
from .matrix import Matrix
from .stat import quantile, quantile_sorted, polyfit
import ert.ecl
import ert.cwrap.clib as clib
lib = clib.ert_load("libecl_well.so")
# (at your option) any later version.
#
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License at
# for more details.
import ert.util.libutil
import ert.ecl.libecl
import ert.job_queue.libjob_queue
import ert.rms.librms
import ert.cwrap.clib as clib
clib.ert_load("libsched.so")
clib.ert_load("libanalysis.so")
lib = clib.ert_load("libenkf.so")
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License at
# for more details.
"""
Simple package for working with 2D geometry.
"""
from ert.cwrap.metacwrap import Prototype
from ert.cwrap import clib
import ert.util
class GeoPrototype(Prototype):
lib = clib.ert_load("libert_geometry")
def __init__(self, prototype, bind=True):
super(GeoPrototype, self).__init__(GeoPrototype.lib, prototype, bind=bind)
from .cpolyline import CPolyline
from .cpolyline_collection import CPolylineCollection
from .polyline import Polyline
from .xyz_io import XYZIo
from .geometry_tools import GeometryTools
from .surface import Surface
# ERT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License at
# for more details.
import ctypes
import ert.cwrap.clib as clib
lib = clib.load("librms.so")
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License at
# for more details.
import ert.cwrap.clib as clib
from ert.ecl import ECL_LIB
lib = clib.ert_load("librms.so")
import ert.ecl
import ert.rms
import ert.analysis
import ert.sched
import ert.config
import ert.job_queue
class EnkfPrototype(Prototype):
lib = clib.ert_load("libenkf")
def __init__(self, prototype, bind=True):
super(EnkfPrototype, self).__init__(EnkfPrototype.lib, prototype, bind=bind)
ENKF_LIB = clib.ert_load("libenkf")
from .enums import *
from .node_id import NodeId
from .enkf_linalg import EnkfLinalg
from .util import TimeMap
from .state_map import StateMap
from .summary_key_set import SummaryKeySet
from .summary_key_matcher import SummaryKeyMatcher
from .custom_kw_config_set import CustomKWConfigSet
from .enkf_fs import EnkfFs
from .ert_workflow_list import ErtWorkflowList
from .active_list import ActiveList
from .config import *
import ert.cwrap.clib as clib
clib.load("libz" , "libz.so.1")
# Depending on the Fortran compiler which has been used to compile
# blas / lapack the there might be an additional dependency on libg2c:
try:
# First try to load without libg2c
clib.load("libblas.so" , "libblas.so.3")
clib.load("liblapack.so")
except:
# Then try to load with libg2c
clib.load("libg2c.so.0")
clib.load("libblas.so" , "libblas.so.3")
clib.load("liblapack.so")
lib = clib.load("libert_util.so")
if LSF_HOME:
setenv( "LSF_BINDIR" , "%s/bin" % LSF_HOME )
setenv( "LSF_LIBDIR" , "%s/lib" % LSF_HOME )
setenv( "XLSF_UIDDIR" , "%s/lib/uid" % LSF_HOME )
setenv( "LSF_SERVERDIR" , "%s/etc" % LSF_HOME)
setenv( "LSF_ENVDIR" , "%s/conf" % LSF_HOME) # This one might be too simple minded.
# 2: Loading the LSF libraries
LSF_LIBDIR = os.getenv("LSF_LIBDIR")
try:
clib.load("libnsl.so" , "libnsl.so.1")
clib.load("libnsl.so.1")
if LSF_LIBDIR:
clib.load("%s/liblsf.so" % LSF_LIBDIR)
clib.load("%s/libbat.so" % LSF_LIBDIR)
else:
clib.load( "liblsf.so" )
clib.load( "libbat.so" )
HAVE_LSF = True
except:
HAVE_LSF = False
# 3: Loading the libjob_queue library, which might (depending on the
# value of INCLUDE_LSF used when building) depend on the LSF
# libraries we tried to load at the previous step.
clib.ert_load("libconfig.so" )
try:
lib = clib.ert_load("libjob_queue.so")
except:
if HAVE_LSF == False:
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ERT is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.
#
# See the GNU General Public License at
# for more details.
from ert.cwrap import clib
import ert.ecl
import ert.util
import ert.geo
SCHED_LIB = clib.ert_load("libsched")
from .sched_file import SchedFile
from .history_source_enum import HistorySourceEnum
from .history import History