Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions timflow/steady/aquifer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

"""

import inspect # Used for storing the input

import numpy as np
import pandas as pd

Expand Down Expand Up @@ -132,9 +130,6 @@ def add_element(self, e):
def isinside(self, x, y):
raise Exception("Must overload AquiferData.isinside()")

def storeinput(self, frame):
self.inputargs, _, _, self.inputvalues = inspect.getargvalues(frame)

def findlayer(self, z):
"""Returns layer-number, layer-type and model-layer-number."""
if z > self.z[0]:
Expand Down
3 changes: 0 additions & 3 deletions timflow/steady/circareasink.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
CircAreaSink(ml, xc=0, yc=0, R=50, N=0.001, layer=0)
"""

import inspect # Used for storing the input

import numpy as np
from scipy.special import i0, i1, k0, k1

Expand Down Expand Up @@ -43,7 +41,6 @@ class CircAreaSink(Element):
def __init__(
self, model, xc=0, yc=0, R=1, N=0.001, layer=0, name="CircAreasink", label=None
):
self.storeinput(inspect.currentframe())
Element.__init__(
self, model, nparam=1, nunknowns=0, layers=layer, name=name, label=label
)
Expand Down
3 changes: 0 additions & 3 deletions timflow/steady/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
Constant(ml, xr=0, yr=0, hr=10.0, layer=0)
"""

import inspect # Used for storing the input

import numpy as np

from timflow.steady.element import Element
Expand Down Expand Up @@ -96,7 +94,6 @@ class Constant(ConstantBase, PotentialEquation):
"""

def __init__(self, model, xr=0, yr=0, hr=0.0, layer=0, label=None):
self.storeinput(inspect.currentframe())
ConstantBase.__init__(
self, model, xr=xr, yr=yr, hr=hr, layer=layer, name="Constant", label=label
)
Expand Down
22 changes: 0 additions & 22 deletions timflow/steady/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ def initialize(self):
pass
"""

import inspect # Used for storing the input

import numpy as np

__all__ = ["Element"]
Expand Down Expand Up @@ -140,9 +138,6 @@ def headinside(self):
def setparams(self, sol):
raise Exception("Must overload Element.setparams()")

def storeinput(self, frame):
self.inputargs, _, _, self.inputvalues = inspect.getargvalues(frame)

# def stoptrace(self, xyz, layer, ltype, step, direction):
# return False, 0

Expand All @@ -161,20 +156,3 @@ def qztop(self, x, y, aq):

def plot(self, **kwargs):
pass

def write(self):
rv = self.name + "(" + self.model.modelname + ",\n"
for key in self.inputargs[2:]: # The first two are ignored
if isinstance(self.inputvalues[key], np.ndarray):
rv += (
key
+ " = "
+ np.array2string(self.inputvalues[key], separator=",")
+ ",\n"
)
elif isinstance(self.inputvalues[key], str):
rv += key + " = '" + self.inputvalues[key] + "',\n"
else:
rv += key + " = " + str(self.inputvalues[key]) + ",\n"
rv += ")\n"
return rv
3 changes: 0 additions & 3 deletions timflow/steady/inhomogeneity.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
)
"""

import inspect # Used for storing the input
from warnings import warn

import numpy as np
Expand Down Expand Up @@ -218,7 +217,6 @@ def __init__(
assert topboundary[:4] == "conf", (
"Error: infiltration can only be added if topboundary='conf'"
)
self.storeinput(inspect.currentframe())
(
kaq,
c,
Expand Down Expand Up @@ -315,7 +313,6 @@ def __init__(
assert topboundary[:4] == "conf", (
"Error: infiltration can only be added if topboundary='conf'"
)
self.storeinput(inspect.currentframe())
kaq, kzoverkh, c, npor, ltype = param_3d(
kaq, z, kzoverkh, npor, topboundary, topres
)
Expand Down
3 changes: 0 additions & 3 deletions timflow/steady/inhomogeneity1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

"""

import inspect # user for storing the input
import warnings

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -354,7 +353,6 @@ def __init__(
c = []
if z is None:
z = [1, 0]
self.storeinput(inspect.currentframe())
(
kaq,
c,
Expand Down Expand Up @@ -433,7 +431,6 @@ def __init__(
):
if z is None:
z = [1, 0]
self.storeinput(inspect.currentframe())
(
kaq,
kzoverkh,
Expand Down
5 changes: 0 additions & 5 deletions timflow/steady/linedoublet.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
ImpLineDoublet(ml, x1=-10, y1=0, x2=10, y2=0, layers=0)
"""

import inspect # Used for storing the input
import warnings

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -228,7 +227,6 @@ def __init__(
label=None,
addtomodel=True,
):
self.storeinput(inspect.currentframe())
LineDoubletHoBase.__init__(
self,
model,
Expand Down Expand Up @@ -302,7 +300,6 @@ def __init__(
label=None,
addtomodel=True,
):
self.storeinput(inspect.currentframe())
LineDoubletHoBase.__init__(
self,
model,
Expand Down Expand Up @@ -454,7 +451,6 @@ class ImpermeableWallString(LineDoubletStringBase, DisvecEquation):
def __init__(self, model, xy=None, layers=0, order=0, label=None):
if xy is None:
xy = [(-1, 0), (1, 0)]
self.storeinput(inspect.currentframe())
LineDoubletStringBase.__init__(
self,
model,
Expand Down Expand Up @@ -507,7 +503,6 @@ class LeakyWallString(LineDoubletStringBase, LeakyWallEquation):
def __init__(self, model, xy=None, res=np.inf, layers=0, order=0, label=None):
if xy is None:
xy = [(-1, 0), (1, 0)]
self.storeinput(inspect.currentframe())
LineDoubletStringBase.__init__(
self,
model,
Expand Down
3 changes: 0 additions & 3 deletions timflow/steady/linedoublet1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

"""

import inspect # Used for storing the input
import warnings

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -127,7 +126,6 @@ class ImpermeableWall1D(LineDoublet1D, DisvecEquation):
"""Create 1D impermeable wall."""

def __init__(self, model, xld=0, layers=0, label=None):
self.storeinput(inspect.currentframe())
LineDoublet1D.__init__(
self,
model,
Expand Down Expand Up @@ -173,7 +171,6 @@ class LeakyWall1D(LineDoublet1D, LeakyWallEquation):
tiny = 1e-6

def __init__(self, model, xld=0, res=np.inf, layers=0, label=None):
self.storeinput(inspect.currentframe())
LineDoublet1D.__init__(
self,
model,
Expand Down
6 changes: 0 additions & 6 deletions timflow/steady/linesink.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
River(ml, x1=-10, y1=0, x2=10, y2=0, hls=5, layers=0)
"""

import inspect # Used for storing the input
import warnings

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -286,7 +285,6 @@ def __init__(
label=None,
addtomodel=True,
):
self.storeinput(inspect.currentframe())
LineSinkBase.__init__(
self,
model,
Expand Down Expand Up @@ -566,7 +564,6 @@ def __init__(
addtomodel=True,
):
"""Initialize a steady head-specified line-sink."""
self.storeinput(inspect.currentframe())
LineSinkHoBase.__init__(
self,
model,
Expand Down Expand Up @@ -672,7 +669,6 @@ def __init__(
addtomodel=True,
):
"""Initialize a steady discharge-specified line-sink."""
self.storeinput(inspect.currentframe())
River.__init__(
self,
model,
Expand Down Expand Up @@ -933,7 +929,6 @@ def __init__(
"""Initialize a steady string of head-specified line-sinks."""
if xy is None:
xy = [(-1, 0), (1, 0)]
self.storeinput(inspect.currentframe())
LineSinkStringBase2.__init__(
self,
model,
Expand Down Expand Up @@ -1086,7 +1081,6 @@ def __init__(
"""Initialize a steady string of discharge-specified line-sinks."""
if xy is None:
xy = [(-1, 0), (1, 0)]
self.storeinput(inspect.currentframe())
RiverString.__init__(
self,
model,
Expand Down
3 changes: 0 additions & 3 deletions timflow/steady/linesink1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
River1D(ml, xls=0, hls=1, layers=0)
"""

import inspect # Used for storing the input
import warnings

import matplotlib.pyplot as plt
Expand Down Expand Up @@ -171,7 +170,6 @@ class LineSink1D(LineSink1DBase, MscreenWellEquation):

def __init__(self, model, xls=0, sigls=1, layers=0, label=None):
"""Initialize a steady 1D line-sink with specified discharge per length."""
self.storeinput(inspect.currentframe())
LineSink1DBase.__init__(
self,
model,
Expand Down Expand Up @@ -228,7 +226,6 @@ class River1D(LineSink1DBase, HeadEquation):

def __init__(self, model, xls=0, hls=1, res=0, wh=1, layers=0, label=None):
"""Initialize a steady 1D line-sink with a specified head."""
self.storeinput(inspect.currentframe())
LineSink1DBase.__init__(
self,
model,
Expand Down
Loading